summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-06-03 13:57:40 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-06-03 13:57:40 +0000
commitaca6ea6586fb2368e6659388f55ba3d374913a86 (patch)
tree5c260dd187f8733f706798009b340355d509ab34 /posix
parent1a1a6bde63e0af0d5f2f3465ba45338e7513c4e4 (diff)
downloadglibc-aca6ea6586fb2368e6659388f55ba3d374913a86.tar.gz
glibc-aca6ea6586fb2368e6659388f55ba3d374913a86.tar.xz
glibc-aca6ea6586fb2368e6659388f55ba3d374913a86.zip
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.
Diffstat (limited to 'posix')
-rw-r--r--posix/fnmatch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
index 7480ec7f00..760cceae6b 100644
--- a/posix/fnmatch.c
+++ b/posix/fnmatch.c
@@ -245,7 +245,7 @@ __wcschrnul (s, c)
 #  define STRLEN(S) __wcslen (S)
 #  define STRCAT(D, S) __wcscat (D, S)
 #  define MEMPCPY(D, S, N) __wmempcpy (D, S, N)
-#  define MEMCHR(S, C, N) wmemchr (S, C, N)
+#  define MEMCHR(S, C, N) __wmemchr (S, C, N)
 #  define STRCOLL(S1, S2) wcscoll (S1, S2)
 #  define WIDE_CHAR_VERSION 1
 /* Change the name the header defines so it doesn't conflict with