glibc/sysdeps
Joseph Myers 2cfbdb9a27 Fix strftime wcschr namespace (bug 17634).
Use of strftime, a C90 function, ends up bringing in wcschr, which is
not a C90 function.  Although not a conformance bug (C90 reserves
wcs*), this is still contrary to glibc practice of avoiding relying on
those reservations; this patch arranges for the internal uses to use
__wcschr instead, with wcschr being a weak alias.  This is more
complicated than some such patches because of the various IFUNC
definitions of wcschr (which include code redefining libc_hidden_def
in a way that involves creating __GI_wcschr manually and so also needs
to create __GI___wcschr after the change of internal uses to use
__wcschr).

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

2014-12-10  Joseph Myers  <joseph@codesourcery.com>
	    Adhemerval Zanella  <azanella@linux.vnet.ibm.com>

	[BZ #17634]
	* wcsmbs/wcschr.c [!WCSCHR] (wcschr): Define as __wcschr.
	Undefine after defining function.  Define as weak alias of
	__wcschr.  Use libc_hidden_weak.
	* include/wchar.h (__wcschr): Declare.  Use libc_hidden_proto.
	* sysdeps/i386/i686/multiarch/wcschr-c.c [IS_IN (libc) && SHARED]
	(libc_hidden_def): Also define __GI___wcschr alias.
	* sysdeps/i386/i686/multiarch/wcschr.S (wcschr): Rename to
	__wcschr and define as weak alias of __wcschr.
	* sysdeps/powerpc/power6/wcschr.c [!WCSCHR] (WCSCHR): Define as
	__wcschr.
	[!WCSCHR] (DEFAULT_WCSCHR): Define.
	[DEFAULT_WCSCHR] (__wcschr): Use libc_hidden_def.
	[DEFAULT_WCSCHR] (wcschr): Define as weak alias of __wcschr.  Use
	libc_hidden_weak.  Do not use libc_hidden_def.
	* sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
	[IS_IN (libc) && SHARED] (libc_hidden_def): Also define
	__GI___wcschr alias.
	* sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c
	[IS_IN (libc)] (wcschr): Define as macro expanding to
	__redirect_wcschr.
	[IS_IN (libc)] (__wcschr_ppc): Use __redirect_wcschr in typeof.
	[IS_IN (libc)] (__wcschr_power6): Likewise.
	[IS_IN (libc)] (__wcschr_power7): Likewise.
	[IS_IN (libc)] (__libc_wcschr): New.  Define with libc_ifunc
	instead of wcschr.
	[IS_IN (libc)] (wcschr): Undefine and define as weak alias of
	__libc_wcschr.
	[!IS_IN (libc)] (libc_hidden_def): Do not undefine and redefine.
	* sysdeps/powerpc/powerpc64/multiarch/wcschr.c (wcschr): Rename to
	__wcschr and define as weak alias of __wcschr.  Use
	libc_hidden_builtin_def.
	* sysdeps/x86_64/wcschr.S (wcschr): Rename to __wcschr and define
	as weak alias of __wcschr.  Use libc_hidden_weak.
	* time/alt_digit.c (_nl_get_walt_digit): Use __wcschr instead of
	wcschr.
	* time/era.c (_nl_init_era_entries): Likewise.
	* conform/Makefile (test-xfail-ISO/time.h/linknamespace): Remove
	variable.
	(test-xfail-XPG3/time.h/linknamespace): Likewise.
	(test-xfail-XPG4/time.h/linknamespace): Likewise.
2014-12-10 16:59:02 +00:00
..
aarch64 [AArch64] Fix strchrnul clobbering v15 2014-12-10 09:54:09 +00:00
alpha Remove IS_IN_rtld 2014-11-24 11:41:48 +05:30
arm Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
generic Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
gnu Fix getifaddrs, freeifaddrs namespace (bug 17668). 2014-12-02 23:11:09 +00:00
hppa Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
i386 Fix strftime wcschr namespace (bug 17634). 2014-12-10 16:59:02 +00:00
ia64 Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
ieee754 FIx ldbl-128ibm frexpl for 32-bit systems (bug 16619, bug 16740). 2014-11-26 13:54:55 +00:00
init_array
m68k Remove IS_IN_rtld 2014-11-24 11:41:48 +05:30
mach Fix pthreads getrlimit, gettimeofday namespace (bug 17682). 2014-12-06 23:40:48 +00:00
microblaze microblaze: 64b atomic operations are not supported. 2014-11-21 14:09:21 +01:00
mips mips: Do not use jal to reach __libc_start_main 2014-12-02 23:04:43 +00:00
nptl Don't touch user-controlled stdio locks in forked child (bug 12847) 2014-12-10 15:58:22 +01:00
posix Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
powerpc Fix strftime wcschr namespace (bug 17634). 2014-12-10 16:59:02 +00:00
pthread Fix pthreads getrlimit, gettimeofday namespace (bug 17682). 2014-12-06 23:40:48 +00:00
s390 Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
sh Remove IS_IN_rtld 2014-11-24 11:41:48 +05:30
sparc Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
tile Add arch-specific configuration for C11 atomics support. 2014-11-20 11:57:38 +01:00
unix Remove custom pthread_once implementation on sh. 2014-12-09 14:32:29 +01:00
wordsize-32 Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wordsize-64
x86 Recognize recent x86 CPUs in string.h 2014-11-27 17:21:12 +01:00
x86_64 Fix strftime wcschr namespace (bug 17634). 2014-12-10 16:59:02 +00:00