glibc/sysdeps/posix
Joseph Myers bef8fd6013 Fix qsort_r namespace (bug 17571).
qsort_r is defined in the same file as qsort, but is not an ISO C
function, so should be a weak alias for __qsort_r.  The uses in
getaddrinfo should also call __qsort_r, since getaddrinfo is a POSIX
function and qsort_r isn't.  This patch implements this.  Because nscd
uses the getaddrinfo sources outside libc, as do the tst-rfc3484
tests, a #define of __qsort_r to qsort_r is added there alongside the
similar defines for other libc-internal symbols used in getaddrinfo.

Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).

	[BZ #17571]
	* stdlib/msort.c (qsort_r): Rename to __qsort_r and define as weak
	alias of __qsort_r.
	(qsort): Call __qsort_r instead of qsort_r.
	* include/stdlib.h (qsort_r): Do not call libc_hidden_proto.
	(__qsort_r): Declare.  Call libc_hidden_proto.
	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Call __qsort_r
	instead of qsort_r.
	* nscd/gai.c (__qsort_r): Define to qsort_r.
	* posix/tst-rfc3484.c (__qsort_r): Likewise.
	* posix/tst-rfc3484-2.c (__qsort_r): Likewise.
	* posix/tst-rfc3484-3.c (__qsort_r): Likewise.
2014-11-12 22:33:41 +00:00
..
alarm.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
clock_getres.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
clock.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
closedir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ctermid.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cuserid.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dirfd.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dirstream.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dup2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dup.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
euidaccess.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fdopendir.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
flock.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fpathconf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gai_strerror-strs.h * sysdeps/posix/gai_strerror.c: Complete rewrite. Avoid relocations. 2005-12-20 17:53:00 +00:00
gai_strerror.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getaddrinfo.c Fix qsort_r namespace (bug 17571). 2014-11-12 22:33:41 +00:00
getcwd.c Fix __getcwd rewinddir namespace (bug 17584). 2014-11-12 16:24:16 +00:00
getdtsz.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gethostname.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
gettimeofday.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
isatty.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
isfdtype.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
killpg.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
libc_fatal.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Makefile 2006-02-27 Roland McGrath <roland@redhat.com> 2006-02-28 07:05:34 +00:00
mkfifo.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mkfifoat.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
nice.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
open64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
opendir.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
pathconf.c Use statvfs64() for pathconf(_PC_NAME_MAX). 2014-04-09 20:09:56 +02:00
pause.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
posix_fallocate64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
posix_fallocate.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pread64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pread.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
preadv64.c * misc/Makefile (routines): Add preadv, preadv64, pwritev, pwritev64. 2009-04-03 19:57:16 +00:00
preadv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
profil.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pwrite64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pwrite.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pwritev64.c * misc/Makefile (routines): Add preadv, preadv64, pwritev, pwritev64. 2009-04-03 19:57:16 +00:00
pwritev.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
raise.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
readdir_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
readdir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
readv.c Remove __libc_readv and __libc_writev function names. 2014-10-30 20:56:34 +00:00
remove.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rename.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rewinddir.c Fix __getcwd rewinddir namespace (bug 17584). 2014-11-12 16:24:16 +00:00
seekdir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
shm_open.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
shm_unlink.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sigblock.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sigignore.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sigintr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
signal.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sigpause.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sigset.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sigsetmask.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sigsuspend.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sigvec.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sigwait.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sleep.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
spawni.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sprofil.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sysconf.c Remove _POSIX_REGEX_VERSION 2014-09-15 10:16:14 +05:30
system.c Do not enable asynchronous cancellation in system. Fixes bug 14782. 2014-01-15 18:39:21 +01:00
sysv_signal.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
telldir.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tempname.c sysdeps/posix/tempname.c: Merge from gnulib 2014-06-25 10:52:51 +01:00
time.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
timespec_get.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
truncate.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ttyname_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ttyname.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ulimit.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
utime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
utimes.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wait3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wait.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
waitid.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
writev.c Remove __libc_readv and __libc_writev function names. 2014-10-30 20:56:34 +00:00