2cfbdb9a27
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. |
||
---|---|---|
.. | ||
bits | ||
btowc.c | ||
c16rtomb.c | ||
Depend | ||
isoc99_fwscanf.c | ||
isoc99_swscanf.c | ||
isoc99_vfwscanf.c | ||
isoc99_vswscanf.c | ||
isoc99_vwscanf.c | ||
isoc99_wscanf.c | ||
Makefile | ||
mbrlen.c | ||
mbrtoc16.c | ||
mbrtowc.c | ||
mbsinit.c | ||
mbsnrtowcs.c | ||
mbsrtowcs_l.c | ||
mbsrtowcs.c | ||
test-wcschr.c | ||
test-wcscmp.c | ||
test-wcscpy.c | ||
test-wcslen.c | ||
test-wcsrchr.c | ||
test-wmemcmp.c | ||
tst-btowc.c | ||
tst-c16c32-1.c | ||
tst-mbrtowc2.c | ||
tst-mbrtowc.c | ||
tst-mbsrtowcs.c | ||
tst-wchar-h.c | ||
tst-wcpncpy.c | ||
tst-wcrtomb.c | ||
tst-wcsnlen.c | ||
tst-wcstof.c | ||
uchar.h | ||
Versions | ||
wchar.h | ||
wcpcpy.c | ||
wcpncpy.c | ||
wcrtomb.c | ||
wcsatcliff.c | ||
wcscasecmp_l.c | ||
wcscasecmp.c | ||
wcscat.c | ||
wcschr.c | ||
wcschrnul.c | ||
wcscmp.c | ||
wcscoll_l.c | ||
wcscoll.c | ||
wcscpy.c | ||
wcscspn.c | ||
wcsdup.c | ||
wcslen.c | ||
wcsmbs-tst1.c | ||
wcsmbsload.c | ||
wcsmbsload.h | ||
wcsncase_l.c | ||
wcsncase.c | ||
wcsncat.c | ||
wcsncmp.c | ||
wcsncpy.c | ||
wcsnlen.c | ||
wcsnrtombs.c | ||
wcspbrk.c | ||
wcsrchr.c | ||
wcsrtombs.c | ||
wcsspn.c | ||
wcsstr.c | ||
wcstod_l.c | ||
wcstod.c | ||
wcstof_l.c | ||
wcstof.c | ||
wcstok.c | ||
wcstol_l.c | ||
wcstol.c | ||
wcstold_l.c | ||
wcstold.c | ||
wcstoll_l.c | ||
wcstoll.c | ||
wcstoul_l.c | ||
wcstoul.c | ||
wcstoull_l.c | ||
wcstoull.c | ||
wcswidth.c | ||
wcsxfrm_l.c | ||
wcsxfrm.c | ||
wctob.c | ||
wcwidth.c | ||
wcwidth.h | ||
wmemchr.c | ||
wmemcmp.c | ||
wmemcpy.c | ||
wmemmove.c | ||
wmempcpy.c | ||
wmemset.c |