zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@fysh.org>
To: opk@u.genie.co.uk (Oliver Kiddle)
Cc: zsh-workers@sunsite.auc.dk
Subject: Re: Compile problem on AIX 3
Date: Tue, 30 Nov 1999 11:43:33 +0000 (GMT)	[thread overview]
Message-ID: <E11slh0-0006Ug-00@crucigera.fysh.org> (raw)
In-Reply-To: <3843A8CB.F28355B@u.genie.co.uk> from Oliver Kiddle at "Nov 30, 1999 10:36:59 am"

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


      reply	other threads:[~1999-11-30 13:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-30 10:36 Oliver Kiddle
1999-11-30 11:43 ` Zefram [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E11slh0-0006Ug-00@crucigera.fysh.org \
    --to=zefram@fysh.org \
    --cc=opk@u.genie.co.uk \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).