glibc/sysdeps/powerpc/powerpc64
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
..
970 powerpc: Re-work the Implies structure 2010-06-30 09:57:38 -07:00
a2 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bits powerpc: Fix missing barriers in atomic_exchange_and_add_{acq,rel} 2014-11-26 07:06:28 -05:00
cell Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fpu Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
multiarch Fix strftime wcschr namespace (bug 17634). 2014-12-10 16:59:02 +00:00
power4 PowerPC: multiarch bzero cleanup for PPC64 2014-09-10 07:39:46 -04:00
power5 Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
power5+ PowerPC: Fix --disable-multi-arch builds 2014-04-09 06:22:53 -05:00
power6 Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
power6x Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
power7 powerpc: Add powerpc64 strpbrk optimization 2014-12-02 13:34:02 -05:00
power8 Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
Implies Revert "Use ieee754/dbl-64/wordsize-64 on powerpc64" 2013-01-10 10:44:05 +01:00
Makefile Remove HP_TIMING_DIFF_INIT and dl_hp_timing_overhead 2014-07-03 08:38:25 -07:00
__longjmp-common.S Remove IS_IN_rtld 2014-11-24 11:41:48 +05:30
__longjmp.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
addmul_1.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
backtrace.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bsd-_setjmp.S PowerPC64 ABI fixes 2010-08-12 09:19:19 -07:00
bsd-setjmp.S PowerPC64 ABI fixes 2010-08-12 09:19:19 -07:00
bzero.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
configure rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
configure.ac rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
crti.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
crtn.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-dtprocnum.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-irel.h Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
dl-machine.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-machine.h Remove INTDEF / INTUSE / INTVARDEF (bug 14132). 2014-11-05 23:35:36 +00:00
dl-trampoline.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
entry.h PowerPC: Fix gprof entry point for LE 2014-07-30 09:01:25 -03:00
ffsll.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
hp-timing.h Always provide HP_SMALL_TIMING_AVAIL 2014-07-03 08:38:36 -07:00
lshift.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcpy.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memset.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mul_1.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ppc-mcount.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
register-dump.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rtld-memset.c powerpc: Use generic memset for RTLD for ppc32/64 2010-09-29 12:21:14 -04:00
setjmp-common.S Remove IS_IN_rtld 2014-11-24 11:41:48 +05:30
setjmp.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
stackguard-macros.h PowerPC: Fix POINTER_CHK_GUARD thread register for PPC64 2013-09-25 13:43:04 -05:00
start.S Fix reference to toc symbol. 2014-04-02 13:40:21 +10:30
stpcpy.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strchr.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcpy.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcspn.S powerpc: Add powerpc64 strcspn optimization 2014-12-02 07:16:24 -05:00
strlen.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strpbrk.S powerpc: Add powerpc64 strpbrk optimization 2014-12-02 13:34:02 -05:00
strspn.S powerpc: Add powerpc64 strspn optimization 2014-12-02 07:15:58 -05:00
strtok.S powerpc: strtok{_r} optimization for powerpc64 2014-12-01 09:03:58 -05:00
strtok_r.S powerpc: strtok{_r} optimization for powerpc64 2014-12-01 09:03:58 -05:00
submul_1.S 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
tls-macros.h Split tls-macros.h in sysdeps directories. 2012-07-19 17:04:04 -03:00
tst-audit.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00