From aca6ea6586fb2368e6659388f55ba3d374913a86 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 3 Jun 2015 13:57:40 +0000 Subject: Fix fnmatch wmemchr namespace (bug 18468). fnmatch brings in references to wmemchr, which isn't in all the standards that contain fnmatch, resulting in linknamespace test failures. This patch fixes this in the usual way, making wmemchr into a weak alias for __wmemchr. Tested for x86_64 and x86 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #18468] * wcsmbs/wmemchr.c (wmemchr): Rename to __wmemchr and define as weak alias of __wmemchr. Use libc_hidden_weak. * include/wchar.h (__wmemchr): Declare. Use libc_hidden_proto. * posix/fnmatch.c [HANDLE_MULTIBYTE] (MEMCHR): Use __wmemchr instead of wmemchr. --- wcsmbs/wmemchr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'wcsmbs') diff --git a/wcsmbs/wmemchr.c b/wcsmbs/wmemchr.c index 5c74d93258..266950c84b 100644 --- a/wcsmbs/wmemchr.c +++ b/wcsmbs/wmemchr.c @@ -19,7 +19,7 @@ #include wchar_t * -wmemchr (s, c, n) +__wmemchr (s, c, n) const wchar_t *s; wchar_t c; size_t n; @@ -59,4 +59,6 @@ wmemchr (s, c, n) return NULL; } -libc_hidden_def (wmemchr) +libc_hidden_def (__wmemchr) +weak_alias (__wmemchr, wmemchr) +libc_hidden_weak (wmemchr) -- cgit v1.2.1