zsh-workers
 help / color / mirror / code / Atom feed
* Compile problem on AIX 3
@ 1999-11-30 10:36 Oliver Kiddle
  1999-11-30 11:43 ` Zefram
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 1999-11-30 10:36 UTC (permalink / raw)
  To: Zsh workers

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. 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 but I haven't got a clue what any of these
functions do so I may well be wrong there.

Oliver


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Compile problem on AIX 3
  1999-11-30 10:36 Compile problem on AIX 3 Oliver Kiddle
@ 1999-11-30 11:43 ` Zefram
  0 siblings, 0 replies; 2+ messages in thread
From: Zefram @ 1999-11-30 11:43 UTC (permalink / raw)
  To: Oliver Kiddle; +Cc: zsh-workers

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-30 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-30 10:36 Compile problem on AIX 3 Oliver Kiddle
1999-11-30 11:43 ` Zefram

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).