diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-06-12 22:35:07 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-06-12 22:35:07 +0000 |
commit | 8737be806407be51f046b358d8824c4c968912de (patch) | |
tree | 11c6eeb4637ff4e67ca80b9a0105a334f1373f0f /resolv/netdb.h | |
parent | b400fdefc71ccc2a118ddfa78d3658d3ea3af7a2 (diff) | |
download | glibc-8737be806407be51f046b358d8824c4c968912de.tar.gz glibc-8737be806407be51f046b358d8824c4c968912de.tar.xz glibc-8737be806407be51f046b358d8824c4c968912de.zip |
Fix netdb.h addrinfo namespace (bug 18529).
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.
Diffstat (limited to 'resolv/netdb.h')
-rw-r--r-- | resolv/netdb.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/resolv/netdb.h b/resolv/netdb.h index fe8f3ba1e5..44cf6923b2 100644 --- a/resolv/netdb.h +++ b/resolv/netdb.h @@ -561,8 +561,8 @@ extern int rresvport_af (int *__alport, sa_family_t __af); #endif -/* Extension from POSIX.1g. */ -#ifdef __USE_POSIX +/* Extension from POSIX.1:2001. */ +#ifdef __USE_XOPEN2K /* Structure to contain information about address of a service provider. */ struct addrinfo { |