On 2/6/07, Stephen Deasey <[EMAIL PROTECTED]> wrote:
On 2/6/07, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> On Linux HAVE_INET_NTOP is defined, i assume on OpenBSD not and
> the part with the union is not working


It should be defined, because it seems to have it:

  http://www.openbsd.org/cgi-bin/man.cgi?query=inet_ntop


Anyway, our custom test for this seems a bit over the top. Maybe it's
not correct?  Other people seem to be just using AC_CHECK_FUNCS():

  http://www.google.com/codesearch?q=file%3Aconfigure%5C.ac+inet_ntop

When I change include/Makefile.global from:

   DEFS             = -DHAVE_CONFIG_H

to:

   DEFS             = -DHAVE_CONFIG_H -DHAVE_INET_NTOP

and recompile I get correct IP addresses reported by [ns_conn
peeraddr].  Also Vlad's a.c program reports 127.0.0.1 instead of
0.0.0.0 too.

So the check for inet_ntop() doesn't work right on OpenBSD/sparc64.
The union alternative in reentrant.c works on 32-bit & 64-bit little
endian OpenBSD it appears.

The check fails because u_int8_t, and others, are undefined.  On
OpenBSD they are defined in sys/types.h but the check only includes
sys/socket.h and arpa/inet.h.

Thanks for all the help!

Michael

Reply via email to