glibc/sysdeps/i386
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
..
fpu Update x86 ULPs 2014-08-27 13:36:02 +10:00
i486 Add arch-specific configuration for C11 atomics support. 2014-11-20 11:57:38 +01:00
i586 Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
i686 Fix strftime wcschr namespace (bug 17634). 2014-12-10 16:59:02 +00:00
i786
nptl NPTL: Clean up THREAD_SYSINFO macros. 2014-10-17 15:03:00 -07:00
sys Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Implies Use x86-64 bits/byteswap.h for both i386 and x86_64 2012-05-30 14:13:18 -07:00
Makefile Support crti.S and crtn.S provided directly by architectures. 2012-02-08 01:45:26 +00:00
Versions Merge sysdeps/i386/elf/Versions into sysdeps/i386/Versions. 2012-03-19 21:02:40 +01:00
____longjmp_chk.S
__longjmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
abort-instr.h
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
asm-syntax.h 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 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bsd-setjmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bzero.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
configure Enable AVX2 optimized memset only if -mavx2 works 2014-07-14 07:58:27 -07:00
configure.ac Enable AVX2 optimized memset only if -mavx2 works 2014-07-14 07:58:27 -07: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-irel.h Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
dl-lookupcfg.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-machine.h Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
dl-procinfo.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-procinfo.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-tls.h Remove IS_IN_rtld 2014-11-24 11:41:48 +05:30
dl-tlsdesc.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-tlsdesc.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-trampoline.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ffs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gccframe.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gmp-mparam.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
htonl.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
htons.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
i386-mcount.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
jmpbuf-offsets.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
jmpbuf-unwind.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ldbl2mpn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ldsodefs.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
lshift.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
machine-gmon.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memchr.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcopy.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memset.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memusage.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mp_clz_tab.c
mul_1.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
preconfigure Move base_machine and machine settings from configure.ac to sysdeps preconfigure fragments. 2014-06-25 17:52:56 +00:00
rawmemchr.S 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
setfpucw.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
setjmp.S Remove IS_IN_rtld 2014-11-24 11:41:48 +05:30
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
stackinfo.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10: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
stpncpy.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
strchrnul.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcspn.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
string-inlines.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strlen.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strpbrk.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strrchr.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strspn.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtok.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtok_r.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00: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 into sysdeps directories. 2012-07-17 11:30:58 +00:00
tlsdesc.c Fix -Wundef warnings for SHARED 2014-07-09 09:26:07 +01:00
tlsdesc.sym
tst-audit.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-stack-align.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00