8737be8064
netdb.h declares interfaces such as getaddrinfo if __USE_POSIX, i.e. POSIX.1:1990 or later. However, these interfaces were new in the 2001 edition of POSIX, although the header was in XPG4 and UNIX98, so they should not be declared for XPG4 or UNIX98. (This produces spurious linknamespace test failures, although there are other failures for this header as well for the same standards so this patch doesn't remove any XFAILs.) This patch corrects the condition, and the conform/ test expectations which were similarly wrong. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #18529] * resolv/netdb.h [__USE_POSIX]: Change condition to [__USE_XOPEN2K]. * conform/data/netdb.h-data [XPG4 || UNIX98] (struct addrinfo): Do not expect. [XPG4 || UNIX98] (AI_PASSIVE): Likewise. [XPG4 || UNIX98] (AI_CANONNAME): Likewise. [XPG4 || UNIX98] (AI_NUMERICHOST): Likewise. [XPG4 || UNIX98] (AI_V4MAPPED): Likewise. [XPG4 || UNIX98] (AI_ALL): Likewise. [XPG4 || UNIX98] (AI_ADDRCONFIG): Likewise. [XPG4 || UNIX98] (AI_NUMERICSERV): Likewise. [XPG4 || UNIX98] (NI_NOFQDN): Likewise. [XPG4 || UNIX98] (NI_NUMERICHOST): Likewise. [XPG4 || UNIX98] (NI_NAMEREQD): Likewise. [XPG4 || UNIX98] (NI_NUMERICSERV): Likewise. [XPG4 || UNIX98] (NI_DGRAM): Likewise. [XPG4 || UNIX98] (EAI_AGAIN): Likewise. [XPG4 || UNIX98] (EAI_BADFLAGS): Likewise. [XPG4 || UNIX98] (EAI_FAIL): Likewise. [XPG4 || UNIX98] (EAI_FAMILY): Likewise. [XPG4 || UNIX98] (EAI_MEMORY): Likewise. [XPG4 || UNIX98] (EAI_NONAME): Likewise. [XPG4 || UNIX98] (EAI_SERVICE): Likewise. [XPG4 || UNIX98] (EAI_SOCKTYPE): Likewise. [XPG4 || UNIX98] (EAI_SYSTEM): Likewise. [XPG4 || UNIX98] (EAI_SYSTEM): Likewise. [XPG4 || UNIX98] (freeaddrinfo): Likewise. [XPG4 || UNIX98] (gai_strerror): Likewise. [XPG4 || UNIX98] (getaddrinfo): Likewise. [XPG4 || UNIX98] (getnameinfo): Likewise.
118 lines
3.2 KiB
Plaintext
118 lines
3.2 KiB
Plaintext
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
|
|
optional-type in_port_t
|
|
optional-type in_addr_t
|
|
|
|
type {struct hostent}
|
|
|
|
element {struct hostent} {char*} h_name
|
|
element {struct hostent} {char**} h_aliases
|
|
element {struct hostent} int h_addrtype
|
|
element {struct hostent} int h_length
|
|
element {struct hostent} {char**} h_addr_list
|
|
|
|
type {struct netent}
|
|
|
|
element {struct netent} {char*} n_name
|
|
element {struct netent} {char**} n_aliases
|
|
element {struct netent} int n_addrtype
|
|
element {struct netent} uint32_t n_net
|
|
|
|
type uint32_t
|
|
|
|
type {struct protoent}
|
|
|
|
element {struct protoent} {char*} p_name
|
|
element {struct protoent} {char**} p_aliases
|
|
element {struct protoent} int p_proto
|
|
|
|
type {struct servent}
|
|
|
|
element {struct servent} {char*} s_name
|
|
element {struct servent} {char**} s_aliases
|
|
element {struct servent} int s_port
|
|
element {struct servent} {char*} s_proto
|
|
|
|
macro IPPORT_RESERVED
|
|
|
|
#if !defined XOPEN2K8 && !defined POSIX2008
|
|
// variable int h_errno
|
|
allow h_errno
|
|
|
|
macro HOST_NOT_FOUND
|
|
macro NO_DATA
|
|
macro NO_RECOVERY
|
|
macro TRY_AGAIN
|
|
#endif
|
|
|
|
#if !defined XPG4 && !defined UNIX98
|
|
type {struct addrinfo}
|
|
element {struct addrinfo} int ai_flags
|
|
element {struct addrinfo} int ai_family
|
|
element {struct addrinfo} int ai_socktype
|
|
element {struct addrinfo} int ai_protocol
|
|
element {struct addrinfo} socklen_t ai_addrlen
|
|
element {struct addrinfo} {struct sockaddr*} ai_addr
|
|
element {struct addrinfo} {char*} ai_canonname
|
|
element {struct addrinfo} {struct addrinfo*} ai_next
|
|
|
|
macro AI_PASSIVE
|
|
macro AI_CANONNAME
|
|
macro AI_NUMERICHOST
|
|
macro AI_V4MAPPED
|
|
macro AI_ALL
|
|
macro AI_ADDRCONFIG
|
|
macro AI_NUMERICSERV
|
|
|
|
macro NI_NOFQDN
|
|
macro NI_NUMERICHOST
|
|
macro NI_NAMEREQD
|
|
macro NI_NUMERICSERV
|
|
macro NI_DGRAM
|
|
|
|
macro EAI_AGAIN
|
|
macro EAI_BADFLAGS
|
|
macro EAI_FAIL
|
|
macro EAI_FAMILY
|
|
macro EAI_MEMORY
|
|
macro EAI_NONAME
|
|
macro EAI_SERVICE
|
|
macro EAI_SOCKTYPE
|
|
macro EAI_SYSTEM
|
|
macro EAI_OVERFLOW
|
|
#endif
|
|
|
|
function void endhostent (void)
|
|
function void endnetent (void)
|
|
function void endprotoent (void)
|
|
function void endservent (void)
|
|
#if !defined XPG4 && !defined UNIX98
|
|
function void freeaddrinfo (struct addrinfo*)
|
|
function {const char*} gai_strerror (int)
|
|
function int getaddrinfo (const char*, const char*, const struct addrinfo*, struct addrinfo**)
|
|
#endif
|
|
function {struct hostent*} gethostbyaddr (const void*, socklen_t, int)
|
|
function {struct hostent*} gethostbyname (const char*)
|
|
function {struct hostent*} gethostent (void)
|
|
#if !defined XPG4 && !defined UNIX98
|
|
function int getnameinfo (const struct sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, int)
|
|
#endif
|
|
function {struct netent*} getnetbyaddr (uint32_t, int)
|
|
function {struct netent*} getnetbyname (const char*)
|
|
function {struct netent*} getnetent (void)
|
|
function {struct protoent*} getprotobyname (const char *)
|
|
function {struct protoent*} getprotobynumber (int)
|
|
function {struct protoent*} getprotoent (void)
|
|
function {struct servent*} getservbyname (const char*, const char*)
|
|
function {struct servent*} getservbyport (int, const char*)
|
|
function {struct servent*} getservent (void)
|
|
function void sethostent (int)
|
|
function void setnetent (int)
|
|
function void setprotoent (int)
|
|
function void setservent (int)
|
|
|
|
type socklen_t
|
|
|
|
allow-header netinet/in.h
|
|
allow-header inttypes.h
|
|
#endif
|