glibc/sysdeps/powerpc/powerpc32
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
..
405 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
440 Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
464 Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
476 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10: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
e500/nofpu Define __GI_fegetenv for e500 libm 2014-09-02 21:39:04 +00:00
fpu Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
power4 Fix strftime wcschr namespace (bug 17634). 2014-12-10 16:59:02 +00:00
power5 Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
power5+ Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
power6 Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
power6x PowerPC: Fix --disable-multi-arch builds 2014-04-09 06:22:53 -05:00
power7 Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
power8 PowerPC: Adjust multiarch Implies for PowerPC32 2013-12-06 05:47:05 -06:00
Implies 2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> 2006-01-28 00:15:15 +00:00
Makefile Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
Versions Move __mcount_internal from GLIBC_PRIVATE to GLIBC_2.16 2012-06-02 21:21:15 +02:00
__longjmp-common.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
__longjmp.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
add_n.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
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 Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
bsd-setjmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bzero.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
compat-ppc-mcount.S Fix missing _mcount@GLIBC_2.0 on powerpc32 2012-07-06 23:43:56 +02: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 * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_runtime_setup): 2005-06-17 23:11:35 +00:00
dl-irel.h Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
dl-machine.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
dl-machine.h Fix Wundef warning for ELF_MACHINE_NO_RELA 2014-06-26 22:30:40 +05:30
dl-start.S Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
dl-trampoline.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gprrest0.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gprrest1.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gprsave0.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gprsave1.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
libgcc-compat.S Don't use INTDEF for powerpc32 compat symbols (bug 14132). 2014-10-23 21:43:41 +00:00
lshift.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mcount.c PowerPC ugly symbol versioning 2013-10-04 10:38:28 +09:30
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
rshift.S 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 BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
start.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
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
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
sub_n.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10: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