glibc/wcsmbs
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
..
bits Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
btowc.c Complete the removal of __gconv_translit_find 2014-09-12 09:17:32 +02:00
c16rtomb.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Depend Update. 2000-09-06 22:15:07 +00:00
isoc99_fwscanf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
isoc99_swscanf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
isoc99_vfwscanf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
isoc99_vswscanf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
isoc99_vwscanf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
isoc99_wscanf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Makefile Remove TEST_IFUNC, tests-ifunc and *-ifunc.c tests. 2014-11-26 12:53:36 +00:00
mbrlen.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mbrtoc16.c Complete the removal of __gconv_translit_find 2014-09-12 09:17:32 +02:00
mbrtowc.c Complete the removal of __gconv_translit_find 2014-09-12 09:17:32 +02:00
mbsinit.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mbsnrtowcs.c Complete the removal of __gconv_translit_find 2014-09-12 09:17:32 +02:00
mbsrtowcs_l.c Complete the removal of __gconv_translit_find 2014-09-12 09:17:32 +02:00
mbsrtowcs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-wcschr.c Add wcschr test cases 2011-10-23 14:14:26 -04:00
test-wcscmp.c Move wide char tests to wcsmbs directory 2011-09-08 18:01:07 -04:00
test-wcscpy.c Add tests for wcsrchr and wcscpy 2011-12-17 14:14:58 -05:00
test-wcslen.c Add wcslen test cases 2011-10-23 14:11:50 -04:00
test-wcsrchr.c Add tests for wcsrchr and wcscpy 2011-12-17 14:14:58 -05:00
test-wmemcmp.c Move wide char tests to wcsmbs directory 2011-09-08 18:01:07 -04:00
tst-btowc.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-c16c32-1.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
tst-mbrtowc2.c * wcsmbs/tst-mbrtowc2.c: Use de_DE.UTF-8 instead of en_US.UTF-8. 2005-10-15 15:38:52 +00:00
tst-mbrtowc.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-mbsrtowcs.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-wchar-h.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-wcpncpy.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-wcrtomb.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-wcsnlen.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-wcstof.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
uchar.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Versions Sort Versions files 2013-02-17 16:34:04 +01:00
wchar.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcpcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcpncpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcrtomb.c Complete the removal of __gconv_translit_find 2014-09-12 09:17:32 +02:00
wcsatcliff.c Fix handling of tail bytes of buffer in SSE2/SSSE3 x86-64 version strn{,case}cmp 2010-10-03 22:10:30 -04:00
wcscasecmp_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscasecmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscat.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
wcschrnul.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscoll_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscoll.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscspn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsdup.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcslen.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsmbs-tst1.c Update. 2003-07-31 19:26:38 +00:00
wcsmbsload.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wcsmbsload.h Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wcsncase_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsncase.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsncat.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsncmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsncpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsnlen.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsnrtombs.c Complete the removal of __gconv_translit_find 2014-09-12 09:17:32 +02:00
wcspbrk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsrchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsrtombs.c Complete the removal of __gconv_translit_find 2014-09-12 09:17:32 +02:00
wcsspn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsstr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstod_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstod.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstof_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstof.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstok.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstol_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstol.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstold_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstold.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstoll_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstoll.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstoul_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstoul.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstoull_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstoull.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcswidth.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsxfrm_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsxfrm.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wctob.c Complete the removal of __gconv_translit_find 2014-09-12 09:17:32 +02:00
wcwidth.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcwidth.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wmemchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wmemcmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wmemcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wmemmove.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wmempcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wmemset.c Fix __printf_fp wmemset namespace (bug 17574). 2014-11-12 22:38:11 +00:00