From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29893 invoked from network); 30 Nov 1999 13:30:38 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Nov 1999 13:30:38 -0000 Received: (qmail 28596 invoked by alias); 30 Nov 1999 11:43:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8811 Received: (qmail 28588 invoked from network); 30 Nov 1999 11:43:50 -0000 Subject: Re: Compile problem on AIX 3 In-Reply-To: <3843A8CB.F28355B@u.genie.co.uk> from Oliver Kiddle at "Nov 30, 1999 10:36:59 am" To: opk@u.genie.co.uk (Oliver Kiddle) Date: Tue, 30 Nov 1999 11:43:33 +0000 (GMT) Cc: zsh-workers@sunsite.auc.dk X-Mailer: ELM [version 2.4ME+ PL48 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Oliver Kiddle wrote: >inet_aton cannot be resolved (AIX 3.2.5 but not 4.2). This is due to >changes from 8764 (IPv6 support in zftp). inet_ntoa does exist so there >isn't a problem with that. *sigh* inet_aton() converts an IPv4 address from text to binary form, and inet_ntoa() does the reverse. inet_pton() and inet_ntop() are the newer, preferred, interfaces, which support IPv6 as well as IPv4. The problem here is that inet_aton() didn't alway exist -- there is an older inet_addr(), which does the same job, but has a flawed interface. zftp used to use inet_addr(), but I changed it to use inet_pton(); of course, inet_pton() doesn't exist everywhere, so I wrote an IPv4-only version for IPv4-only systems. (I prefer this approach to multiple possible interfaces, to avoid cluttering the main code with conditionals.) In writing this inet_pton(), it never occurred to me that there would be systems without inet_aton(). > I suspect that the correct fix would be to do >a configure test for inet_aton and have the inet_pton function return -1 >if inet_aton doesn't exist No. We ned the functionality of inet_aton(). This can be done either by implementing inet_aton() manually, or by defining it as a wrapper for inet_addr(). Patch to follow. -zefram