--Qtzb1h6tVL0ohdDu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sun, Apr 11, 2004 at 12:17:03AM +0200, Klaus Heinz wrote:
| Hi,
|=20
| the configure script for tnftp tries to determine whether the OS=20
| supports RFC 2553 in netdb.h. If AI_NUMERICHOST cannot be found the
| package will supply its own version of getaddrinfo() _if the system
| alread has_ getaddrinfo():
|=20
| if test $ac_cv_func_getaddrinfo =3D yes; then
| LIBOBJS=3D"$LIBOBJS getaddrinfo.o"
| echo "$ac_t""no - using local version" 1>&6
| else
| echo "$ac_t""using local version" 1>&6
| fi
|=20
| Is this the way it is supposed to work?
Yes.
There's three scenarios that ./configure is trying to support:
a) getaddrinfo() present and AI_NUMERICHOST available;
use the system getaddrinfo() since it should work
b) getaddrinfo() present and AI_NUMERICHOST missing;
use our getaddrinfo() because the system's is broken.
We need to specifically add getaddrinfo.o to LIBOBJS
so that the local replacement is compiled
c) getaddrinfo() missing
getaddrinfo.o will already be added to LIBOBJS
by AC_REPLACE_FUNCS()
| I would have expected the two clauses to be chosen vice versa, ie use
| the getaddrinfo() from the system if available and only compile
| getaddrinfo.c if the system does not supply it. The resulting strings
| ("no - using local version" vs. "using local version") don't make much
| sense to me, either.
Well, that's why the checking message is:
Checking for working getaddrinfo():
we already know if getaddrinfo() is present, we want a _working_ and
functional getaddrinfo().
| As it is, it fails on SCO Unixware which only seems to support RFC 2133:
|=20
| ...
| gcc -DUNIXWARE -I. -I./.. -I.. -I./../libedit -I./../libnetbsd -g -O2=
-c getaddrinfo.c
| getaddrinfo.c:270: redefinition of `getaddrinfo'
| /usr/include/netdb.h:248: `getaddrinfo' previously defined here
| *** Error code 1 (bu21)
| UX:make: ERROR: fatal error.
Ok, so we need to provide a separate prototype check for getaddrinfo()
(independant of whether it's replaced or not). That is a bug in the
configure stuff.
What is the function signature on UNIXware for getaddrinfo()?
Cheers,
Luke.
--Qtzb1h6tVL0ohdDu
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
iD8DBQFAe7KgpBhtmn8zJHIRAp6YAJ0dhchdQ4sI8VsQYgObmaNXJ47wswCfUbXl
AWAP7fdkkCnNIdHffaH5D2g=
=3N/S
-----END PGP SIGNATURE-----
--Qtzb1h6tVL0ohdDu--