Subject: net/tnftp and rfc 2553 compatibility
To: None <>
From: Klaus Heinz <>
List: tech-pkg
Date: 04/11/2004 00:17:03

the configure script for tnftp tries to determine whether the OS 
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():

      if test $ac_cv_func_getaddrinfo = yes; then
              LIBOBJS="$LIBOBJS getaddrinfo.o"
              echo "$ac_t""no - using local version" 1>&6
              echo "$ac_t""using local version" 1>&6

Is this the way it is supposed to work?
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.

As it is, it fails on SCO Unixware which only seems to support RFC 2133:

  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.