glibc/sysdeps/mach
Joseph Myers 9a44d530c4 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.
2014-12-16 18:18:49 +00:00
..
bits Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
hurd Fix resolver if_* namespace (bug 17717). 2014-12-16 18:18:49 +00:00
i386 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sys * hurd/hurdmalloc.c: Remove $ tag $ magic. 2005-12-06 01:24:30 +00:00
Makefile Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Subdirs * Makefile (subdir-target-args): New variable. 2006-02-28 07:11:04 +00:00
_strerror.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
adjtime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
configure Require autoconf 2.69 2014-09-29 07:53:36 -07:00
configure.ac rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
getloadavg.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getpagesize.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getsysstats.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gettimeofday.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mprotect.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
msync.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
munmap.c hurd: Do not allow unmapping address 0 2014-04-16 23:16:15 +02:00
nanosleep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pagecopy.h Fix -Wundef warning on PAGE_COPY_THRESHOLD 2014-07-03 01:49:43 +05:30
readonly-area.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sched_yield.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sleep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strerror_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sysdep.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
thread_state.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
usleep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
xpg-strerror.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00