about summary refs log tree commit diff
path: root/conform/Makefile
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-06-17 20:08:22 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-06-17 20:08:22 +0000
commit17c199ee92e4ca8a34a47c42924608a25a444eb2 (patch)
treeeb24c1f1561542b1540162636d5c55cb48462cbb /conform/Makefile
parentc10b9b13f7471b08273effc8cd7e51b119df9348 (diff)
downloadglibc-17c199ee92e4ca8a34a47c42924608a25a444eb2.tar.gz
glibc-17c199ee92e4ca8a34a47c42924608a25a444eb2.tar.xz
glibc-17c199ee92e4ca8a34a47c42924608a25a444eb2.zip
Fix gethostbyaddr in6addr_any, in6addr_loopback namespace (bug 18532).
gethostbyaddr brings in references to in6addr_any and thereby
in6addr_loopback, which aren't in all the standards containing
gethostbyaddr (gethostbyaddr is in XPG4 and UNIX98, in6addr_any and
in6addr_loopback are new in POSIX.1:2001).  This patch fixes this by
making those symbols into weak aliases (safe in this case, unlike for
most data symbols, because these data symbols are const).

Tested for x86_64 and x86 (testsuite, and comparison of disassembly of
installed stripped shared libraries).  Disassembly is unchanged for
x86_64; for x86, I see some changes of stack offsets, but no other
code generation changes or code size differences.

	[BZ #18532]
	* inet/in6_addr.c (in6addr_any): Rename to __in6addr_any and
	define as weak alias of __in6addr_any.  Use libc_hidden_data_weak.
	(in6addr_loopback): Rename to __in6addr_loopback and define as
	weak alias of __in6addr_loopback.  Use libc_hidden_data_weak.
	* include/netinet/in.h (__in6addr_loopback): Declare.  Use
	libc_hidden_proto.
	(__in6addr_any): Likewise.
	* inet/gethstbyad_r.c (PREPROCESS): Use __in6addr_any instead of
	in6addr_any.
	* conform/Makefile (test-xfail-XPG4/netdb.h/linknamespace): Remove
	variable.
	(test-xfail-UNIX98/netdb.h/linknamespace): Likewise.
Diffstat (limited to 'conform/Makefile')
-rw-r--r--conform/Makefile2
1 files changed, 0 insertions, 2 deletions
diff --git a/conform/Makefile b/conform/Makefile
index 522249ad6a..9ad760187d 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -346,14 +346,12 @@ test-xfail-XOPEN2K8/ndbm.h/linknamespace = yes
 # Unsorted expected failures.
 test-xfail-XPG3/unistd.h/linknamespace = yes
 test-xfail-XPG4/fmtmsg.h/linknamespace = yes
-test-xfail-XPG4/netdb.h/linknamespace = yes
 test-xfail-XPG4/syslog.h/linknamespace = yes
 test-xfail-XPG4/unistd.h/linknamespace = yes
 test-xfail-POSIX/mqueue.h/linknamespace = yes
 test-xfail-POSIX/semaphore.h/linknamespace = yes
 test-xfail-UNIX98/fmtmsg.h/linknamespace = yes
 test-xfail-UNIX98/mqueue.h/linknamespace = yes
-test-xfail-UNIX98/netdb.h/linknamespace = yes
 test-xfail-UNIX98/syslog.h/linknamespace = yes
 test-xfail-UNIX98/unistd.h/linknamespace = yes
 test-xfail-UNIX98/wchar.h/linknamespace = yes