bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] Re: [patch] Handle alternative getnameinfo() prototype


From: Paul Eggert
Subject: Re: [bug-gnulib] Re: [patch] Handle alternative getnameinfo() prototype
Date: Mon, 18 Sep 2006 15:36:56 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Bruno Haible <address@hidden> writes:

> OSF/1 4.0 declares neither getnameinfo nor getaddrinfo.
>
> OSF/1 5.1 declares both in <netdb.h> but has this:
>
> #if defined (_SOCKADDR_LEN) || defined (_XOPEN_SOURCE_EXTENDED)
> #define getaddrinfo ngetaddrinfo
> #else
> #define getaddrinfo ogetaddrinfo
> #endif
>
> $ nm /shlib/libc.so | grep getaddrinfo
> __ngetaddrinfo                   | 0004395900724800 | T | 0000000000000008
> __ogetaddrinfo                   | 0004395900725760 | T | 0000000000000008
> ngetaddrinfo                     | 0004395900724800 | T | 0000000000000008
> ogetaddrinfo                     | 0004395900725760 | T | 0000000000000008
>
> So, you need to #include <netdb.h> in order to test whether getaddrinfo
> exists.

Thanks for the info.  This indicates that m4/getaddrinfo.m4 requires
some surgery, and that my simple patch was wrong.  getaddrinfo.m4
currently does not find the OSF/1 5.1 getaddrinfo, since it doesn't
include <netdb.h>.

I'd have some qualms about writing this code myself; I hope Simon can
take a look at it.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]