glibc/sysdeps/powerpc/powerpc64/multiarch
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
..
Makefile powerpc: Add powerpc64 strpbrk optimization 2014-12-02 13:34:02 -05:00
bcopy-ppc64.c PowerPC: optimized memmove for POWER7/PPC64 2014-07-07 15:41:21 -05:00
bcopy.c PowerPC: optimized memmove for POWER7/PPC64 2014-07-07 15:41:21 -05:00
bzero.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
ifunc-impl-list.c powerpc: Add powerpc64 strpbrk optimization 2014-12-02 13:34:02 -05:00
init-arch.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memchr-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memchr-ppc64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memchr.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memcmp-power4.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcmp-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcmp-ppc64.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memcmp.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memcpy-a2.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcpy-cell.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcpy-power4.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcpy-power6.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcpy-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcpy-ppc64.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memcpy.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memmove-power7.S PowerPC: optimized memmove for POWER7/PPC64 2014-07-07 15:41:21 -05:00
memmove-ppc64.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memmove.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
mempcpy-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mempcpy-ppc64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mempcpy.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memrchr-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memrchr-ppc64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memrchr.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memset-power4.S PowerPC: multiarch bzero cleanup for PPC64 2014-09-10 07:39:46 -04:00
memset-power6.S PowerPC: multiarch bzero cleanup for PPC64 2014-09-10 07:39:46 -04:00
memset-power7.S PowerPC: multiarch bzero cleanup for PPC64 2014-09-10 07:39:46 -04:00
memset-power8.S PowerPC: memset optimization for POWER8/PPC64 2014-09-10 07:39:46 -04:00
memset-ppc64.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memset.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
rawmemchr-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rawmemchr-ppc64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rawmemchr.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
rtld-memset.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rtld-strchr.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stpcpy-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stpcpy-ppc64.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
stpcpy.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
stpncpy-power7.S PowerPC: strncpy/stpncpy optimization for PPC64/POWER7 2014-05-06 09:54:25 -05:00
stpncpy-ppc64.c PowerPC: strncpy/stpncpy optimization for PPC64/POWER7 2014-05-06 09:54:25 -05:00
stpncpy.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strcasecmp-power7.S PowerPC: Fix compiler warnings 2014-01-03 13:29:10 -06:00
strcasecmp.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strcasecmp_l-power7.S PowerPC: Fix compiler warnings 2014-01-03 13:29:10 -06:00
strcasecmp_l.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strcat-power7.c PowerPC: Fix compiler warnings 2014-07-08 09:16:12 -05:00
strcat-ppc64.c PowerPC: strcat optimization for PPC64/POWER7 2014-07-02 14:04:21 -05:00
strcat.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strchr-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strchr-ppc64.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strchr.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strchrnul-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strchrnul-ppc64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strchrnul.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strcmp-power7.S PowerPC: Optimized strcmp for PPC64/POWER7 2014-06-11 08:39:31 -05:00
strcmp-ppc64.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strcmp.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strcpy-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcpy-ppc64.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strcpy.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strlen-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strlen-ppc64.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strlen.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strncase-power7.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncase.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strncase_l-power7.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncase_l.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strncat-power7.S PowerPC: strncat optimization for PPC64 2014-03-10 07:25:09 -05:00
strncat-ppc64.c PowerPC: strncat optimization for PPC64 2014-03-10 07:25:09 -05:00
strncat.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strncmp-power4.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncmp-power7.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncmp-ppc64.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strncmp.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strncpy-power7.S PowerPC: strncpy/stpncpy optimization for PPC64/POWER7 2014-05-06 09:54:25 -05:00
strncpy-ppc64.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strncpy.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strnlen-power7.S PowerPC: Fix compiler warnings 2014-01-03 13:29:10 -06:00
strnlen-ppc64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strnlen.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strrchr-power7.S PowerPC: strrchr optimization for POWER7/PPC64 2014-03-03 08:06:41 -06:00
strrchr-ppc64.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strrchr.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wcschr-power6.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcschr-power7.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcschr-ppc64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcschr.c Fix strftime wcschr namespace (bug 17634). 2014-12-10 16:59:02 +00:00
wcscpy-power6.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscpy-power7.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscpy-ppc64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscpy.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wcsrchr-power6.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsrchr-power7.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsrchr-ppc64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsrchr.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wordcopy-power6.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wordcopy-power7.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wordcopy-ppc64.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wordcopy.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30