glibc/nscd
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
..
Depend Don't mention linuxthreads in Depend files. 2014-05-21 16:53:11 +00:00
Makefile Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
aicache.c Consolidate code to initialize nscd dataset header 2014-04-30 11:57:09 +05:30
cache.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
connections.c Fix Wundef warning for SEPARATE_KEY 2014-06-26 22:30:35 +05:30
dbg_log.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dbg_log.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gai.c Fix qsort_r namespace (bug 17571). 2014-11-12 22:33:41 +00:00
getgrgid_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getgrnam_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gethstbyad_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gethstbynm3_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getpwnam_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getpwuid_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getsrvbynm_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getsrvbypt_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
grpcache.c Consolidate code to initialize nscd dataset header 2014-04-30 11:57:09 +05:30
hstcache.c Consolidate code to initialize nscd dataset header 2014-04-30 11:57:09 +05:30
initgrcache.c Consolidate code to initialize nscd dataset header 2014-04-30 11:57:09 +05:30
mem.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
netgroupcache.c Rework some nscd code not to use variable-length struct types. 2014-10-22 14:28:51 -07:00
nscd-client.h Fix implicit declaration 2014-05-01 22:02:27 +02:00
nscd.c Rework some nscd code not to use variable-length struct types. 2014-10-22 14:28:51 -07:00
nscd.conf Implement caching of nscd 2011-10-07 10:06:31 -04:00
nscd.h nscd: Improved support for tracking startup failure in nscd service (BZ #16639) 2014-03-03 23:18:31 +05:30
nscd.init . 2007-07-31 13:33:18 +00:00
nscd.service nscd: also invalidate netgroup cache on reload 2014-03-19 14:45:10 +01:00
nscd.tmpfiles Add systemd unit file for nscd 2013-12-16 11:22:01 +10:00
nscd_conf.c BZ#17460: Fix buffer overrun in nscd --help. 2014-10-08 15:36:12 -07:00
nscd_getai.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
nscd_getgr_r.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
nscd_gethst_r.c Define _STRING_ARCH_unaligned unconditionally 2014-04-09 15:05:36 -05:00
nscd_getpw_r.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
nscd_getserv_r.c Define _STRING_ARCH_unaligned unconditionally 2014-04-09 15:05:36 -05:00
nscd_helper.c Rework some nscd code not to use variable-length struct types. 2014-10-22 14:28:51 -07:00
nscd_initgroups.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
nscd_netgroup.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
nscd_proto.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
nscd_setup_thread.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
nscd_stat.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pwdcache.c Consolidate code to initialize nscd dataset header 2014-04-30 11:57:09 +05:30
res_hconf.c [BZ #4814] 2007-08-22 03:14:29 +00:00
selinux.c Fix typo in nscd/selinux.c 2014-05-07 14:09:24 +02:00
selinux.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
servicescache.c Consolidate code to initialize nscd dataset header 2014-04-30 11:57:09 +05:30