glibc/wctype
Joseph Myers bb4acb522c Fix fnmatch towlower namespace (bug 18469).
fnmatch brings in references to towlower (and thereby towupper), which
isn't in all the standards that contain fnmatch, resulting in
linknamespace test failures.  (This is contrary to glibc conventions,
rather than a standards conformance issue, because of the to*
reservation.)  This patch fixes this in the usual way, making those
functions into weak aliases.

Tested for x86_64 and x86 (testsuite, and that disassembly of
installed shared libraries is unchanged by the patch).  This is on top
of <https://sourceware.org/ml/libc-alpha/2015-06/msg00019.html>, but
the two patches should be independent.

(The __attribute_pure__ on the declarations in include/wctype.h comes
from GCC's built-in attributes for towlower and towupper, and is
needed to get the same code generation for fnmatch before and after
the patch.  It seems likely there are cases where the declaration of
__foo in the internal headers is missing attributes from foo in the
public headers, built-in to GCC or both, but I don't know a good way
to detect such missing attributes.)

	[BZ #18469]
	* wctype/wcfuncs.c (towlower): Rename to __towlower and define as
	weak alias of __towlower.  Use libc_hidden_weak.
	(towupper): Rename to __towupper and define as weak alias of
	__towupper.  Use libc_hidden_weak.
	* include/wctype.h (__towlower): Declare.  Use libc_hidden_proto.
	(__towupper): Likewise.
	* posix/fnmatch.c [HANDLE_MULTIBYTE && _LIBC] (FOLD): Use
	__towlower instead of towlower.
2015-06-02 20:23:09 +00:00
..
bug-wctypeh.c * wctype/wctype.h: Get wint_t definition directly from <stddef.h>. 2008-12-29 23:21:21 +00:00
iswctype_l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
iswctype.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Makefile Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
test_wcfuncs.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
test_wctype.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
towctrans_l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
towctrans.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Versions Update. 1998-07-04 10:39:13 +00:00
wcfuncs_l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wcfuncs.c Fix fnmatch towlower namespace (bug 18469). 2015-06-02 20:23:09 +00:00
wchar-lookup.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wctrans_l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wctrans.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wctype_l.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wctype.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wctype.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00