Fix fnmatch strnlen namespace (bug 18470).
commitf014e87eff1c9935a8bd9f7b7ab66ff5ef562ee9
authorJoseph Myers <joseph@codesourcery.com>
Wed, 3 Jun 2015 13:58:58 +0000 (3 13:58 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 3 Jun 2015 13:58:58 +0000 (3 13:58 +0000)
tree845ee9a11c80d7f9683c2c88eb107ac88ed5f9f2
parentaca6ea6586fb2368e6659388f55ba3d374913a86
Fix fnmatch strnlen namespace (bug 18470).

fnmatch brings in references to strnlen, which isn't in all the
standards that contain fnmatch (not added until the 2008 edition of
POSIX), resulting in linknamespace test failures.  (This is contrary
to glibc conventions, rather than a standards conformance issue,
because of the str* reservation.)  This patch fixes this in the usual
way, using __strnlen instead of strnlen.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

[BZ #18470]
* posix/fnmatch.c (fnmatch) [_LIBC]: Call __strnlen instead of
strnlen.
* conform/Makefile (test-xfail-XPG3/fnmatch.h/linknamespace):
Remove variable.
(test-xfail-XPG4/fnmatch.h/linknamespace): Likewise.
(test-xfail-POSIX/fnmatch.h/linknamespace): Likewise.
(test-xfail-POSIX/glob.h/linknamespace): Likewise.
(test-xfail-POSIX/wordexp.h/linknamespace): Likewise.
(test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise.
(test-xfail-UNIX98/glob.h/linknamespace): Likewise.
(test-xfail-UNIX98/wordexp.h/linknamespace): Likewise.
(test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise.
(test-xfail-XOPEN2K/glob.h/linknamespace): Likewise.
(test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise.
ChangeLog
NEWS
conform/Makefile
posix/fnmatch.c