summaryrefslogtreecommitdiff
path: root/conform
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-12-16 18:18:49 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-12-16 18:18:49 +0000
commit9a44d530c464d081e925b1c1af2b8bbe6e7b3207 (patch)
treea426306b1967ad948ba3a7351f87fa177aba019a /conform
parentd003ada20e8015df173c06f3292acacc7b148632 (diff)
downloadglibc-9a44d530c464d081e925b1c1af2b8bbe6e7b3207.tar.gz
Fix resolver if_* namespace (bug 17717).
Resolver code, brought in by pthreads (at least), uses if_* interfaces that weren't in POSIX before 2001, resulting in linknamespace failures. This patch changes those interfaces to be weak aliases of __if_* and makes the resolver use __if_* directly. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by this patch). [BZ #17717] * inet/if_index.c (if_nametoindex): Rename to __if_nametoindex and define as weak alias of __if_nametoindex. Use libc_hidden_weak. (if_indextoname): Rename to __if_indextoname and define as weak alias of __if_indextoname. Use libc_hidden_weak. (if_freenameindex): Rename to __if_freenameindex and define as weak alias of __if_freenameindex. (if_nameindex): Rename to __if_nameindex and define as weak alias of __if_nameindex. * sysdeps/mach/hurd/if_index.c (if_nametoindex): Rename to __if_nametoindex and define as weak alias of __if_nametoindex. Use libc_hidden_weak. (if_freenameindex): Rename to __if_freenameindex and define as weak alias of __if_freenameindex. (if_nameindex): Rename to __if_nameindex and define as weak alias of __if_nameindex. (if_indextoname): Rename to __if_indextoname and define as weak alias of __if_indextoname. Use libc_hidden_weak. * sysdeps/unix/sysv/linux/if_index.c (if_nametoindex): Rename to __if_nametoindex and define as weak alias of __if_nametoindex. Use libc_hidden_weak. (if_freenameindex): Rename to __if_freenameindex and define as weak alias of __if_freenameindex. Use libc_hidden_weak. (if_nameindex_netlink): Use __if_freenameindex instead of if_freenameindex. (if_nameindex): Rename to __if_nameindex and define as weak alias of __if_nameindex. Use libc_hidden_weak. (if_indextoname): Rename to __if_indextoname and define as weak alias of __if_indextoname. Use libc_hidden_weak. * include/net/if.h [!_ISOMAC] (__if_nametoindex): Declare and use libc_hidden_proto. [!_ISOMAC] (__if_freenameindex): Likewise. * resolv/res_init.c (__res_vinit): Use __if_nametoindex instead of if_nametoindex. * conform/Makefile (test-xfail-XPG4/grp.h/linknamespace): Remove variable. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise.
Diffstat (limited to 'conform')
-rw-r--r--conform/Makefile8
1 files changed, 0 insertions, 8 deletions
diff --git a/conform/Makefile b/conform/Makefile
index 19335656b4..e0412de1a4 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -359,10 +359,8 @@ test-xfail-XPG4/ctype.h/linknamespace = yes
test-xfail-XPG4/fmtmsg.h/linknamespace = yes
test-xfail-XPG4/fnmatch.h/linknamespace = yes
test-xfail-XPG4/glob.h/linknamespace = yes
-test-xfail-XPG4/grp.h/linknamespace = yes
test-xfail-XPG4/libgen.h/linknamespace = yes
test-xfail-XPG4/netdb.h/linknamespace = yes
-test-xfail-XPG4/pwd.h/linknamespace = yes
test-xfail-XPG4/regex.h/linknamespace = yes
test-xfail-XPG4/search.h/linknamespace = yes
test-xfail-XPG4/stdio.h/linknamespace = yes
@@ -381,24 +379,18 @@ test-xfail-POSIX/semaphore.h/linknamespace = yes
test-xfail-POSIX/time.h/linknamespace = yes
test-xfail-POSIX/unistd.h/linknamespace = yes
test-xfail-POSIX/wordexp.h/linknamespace = yes
-test-xfail-UNIX98/aio.h/linknamespace = yes
test-xfail-UNIX98/ctype.h/linknamespace = yes
test-xfail-UNIX98/fmtmsg.h/linknamespace = yes
test-xfail-UNIX98/fnmatch.h/linknamespace = yes
test-xfail-UNIX98/glob.h/linknamespace = yes
-test-xfail-UNIX98/grp.h/linknamespace = yes
test-xfail-UNIX98/libgen.h/linknamespace = yes
test-xfail-UNIX98/mqueue.h/linknamespace = yes
test-xfail-UNIX98/netdb.h/linknamespace = yes
-test-xfail-UNIX98/pthread.h/linknamespace = yes
-test-xfail-UNIX98/pwd.h/linknamespace = yes
test-xfail-UNIX98/regex.h/linknamespace = yes
-test-xfail-UNIX98/sched.h/linknamespace = yes
test-xfail-UNIX98/search.h/linknamespace = yes
test-xfail-UNIX98/stdio.h/linknamespace = yes
test-xfail-UNIX98/stdlib.h/linknamespace = yes
test-xfail-UNIX98/syslog.h/linknamespace = yes
-test-xfail-UNIX98/time.h/linknamespace = yes
test-xfail-UNIX98/unistd.h/linknamespace = yes
test-xfail-UNIX98/wchar.h/linknamespace = yes
test-xfail-UNIX98/wordexp.h/linknamespace = yes