[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] Re: [patch] Handle alternative getnameinfo() prototype
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] Re: [patch] Handle alternative getnameinfo() prototype |
Date: |
Mon, 18 Sep 2006 22:25:18 +0200 |
User-agent: |
KMail/1.9.1 |
Paul Eggert wrote:
> It's a bit weird, though, that Tru64 has getnameinfo declared but
> getaddrinfo is not defined. Is that correct, or am I missing
> something?
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.
Bruno