glibc/string
Joseph Myers 9975e3d37d Fix locale memmem namespace (bug 17585).
Locale code, brought in by ISO C functions, calls memmem, which is not
an ISO C function.  This isn't an ISO C conformance bug, because all
mem* names are reserved, but glibc practice is not to rely on that
reservation (thus, memmem is only declared in string.h if __USE_GNU
even though ISO C would allow it to be declared unconditionally, for
example).  This patch changes that code to use __memmem.

Note: there are uses of memmem elsewhere in glibc that I didn't
change, although it may turn out some of those also need to use
__memmem.

Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by this patch).

	[BZ #17585]
	* string/memmem.c [!_LIBC] (__memmem): Define to memmem.
	(memmem): Rename to __memmem and define as weak alias of
	__memmem.  Use libc_hidden_weak.
	(__memmem): Use libc_hidden_def.
	* include/string.h (__memmem): Declare.  Use libc_hidden_proto.
	* locale/findlocale.c (valid_locale_name): Use __memmem instead of
	memmem.
2014-11-12 22:41:03 +00:00
..
bits Update feature guard for strdup/strndup in <bits/string2.h> 2014-06-16 10:21:31 +02:00
_strerror.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-addsep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-append.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-count.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-create.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-ctsep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-delete.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-extract.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-insert.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-next.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-replace.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-stringify.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
basename.c string: Cosmetic cleanup of string functions 2014-04-07 09:44:02 +01:00
bcopy.c PowerPC: optimized memmove for POWER7/PPC64 2014-07-07 15:41:21 -05:00
bug-envz1.c
bug-strcoll1.c
bug-strncat1.c
bug-strpbrk1.c
bug-strspn1.c
bug-strtok1.c
byteswap.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bzero.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Depend
endian.h Combine __USE_BSD and __USE_SVID into __USE_MISC. 2014-02-12 23:41:01 +00:00
envz.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
envz.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ffs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ffsll.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
inl-tester.c
Makefile Remove redundant C locale settings. 2014-06-07 19:58:36 +00:00
memccpy.c string: Cosmetic cleanup of string functions 2014-04-07 09:44:02 +01:00
memchr.c string/memchr.c: Merge from gnulib 2014-07-04 09:23:21 +01:00
memcmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcpy.c Fix -Wundef warning on PAGE_COPY_THRESHOLD 2014-07-03 01:49:43 +05:30
memfrob.c string: Cosmetic cleanup of string functions 2014-04-07 09:44:02 +01:00
memmem.c Fix locale memmem namespace (bug 17585). 2014-11-12 22:41:03 +00:00
memmove.c Fix -Wundef warning on PAGE_COPY_THRESHOLD 2014-07-03 01:49:43 +05:30
memory.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mempcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memrchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memset.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
noinl-tester.c
rawmemchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stpcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stpncpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
str-two-way.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stratcliff.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcasecmp_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcasecmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcasestr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcat.c This patch improves strcat performance by using strlen and strcpy. Strlen has a fast C 2014-10-24 16:08:42 +00:00
strchr.c string: Cosmetic cleanup of string functions 2014-04-07 09:44:02 +01:00
strchrnul.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcmp.c string: Cosmetic cleanup of string functions 2014-04-07 09:44:02 +01:00
strcoll_l.c Fix up incorrect formatting in last commit 2014-10-17 15:52:46 +05:30
strcoll.c string: Cosmetic cleanup of string functions 2014-04-07 09:44:02 +01:00
strcpy.c string: Cosmetic cleanup of string functions 2014-04-07 09:44:02 +01:00
strcspn.c PowerPC: optimized strcspn for PPC64/POWER7 2014-03-20 11:24:52 -05:00
strdup.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strerror_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strerror.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
strfry.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
string-inlines.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
string.h Complete _BSD_SOURCE / _SVID_source followup cleanup. 2014-02-21 21:45:26 +00:00
strings.h Combine __USE_BSD and __USE_SVID into __USE_MISC. 2014-02-12 23:41:01 +00:00
strlen.c string: Cosmetic cleanup of string functions 2014-04-07 09:44:02 +01:00
strncase_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncase.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncat.c This patch improves strncat performance by using strlen. Strlen has a fast C implementation, so 2014-10-24 16:12:12 +00:00
strncmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strndup.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strnlen.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
strpbrk.c PowerPC: optimized strpbrk for POWER7 2014-03-20 19:46:13 -05:00
strrchr.c PowerPC: strrchr optimization for POWER7/PPC64 2014-03-03 08:06:41 -06:00
strsep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strsignal.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strspn.c PowerPC: strspn optimization for PPC64/POWER7 2014-03-11 08:54:33 -05:00
strstr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtok_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtok.c string: Cosmetic cleanup of string functions 2014-04-07 09:44:02 +01:00
strverscmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strxfrm_l.c Move findidx nested functions to top-level. 2014-09-11 16:02:17 -07:00
strxfrm.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
swab.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-bcopy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-bzero.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-ffs.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
test-memccpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memcmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memmem.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
test-memmove.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-mempcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memrchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memset.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-rawmemchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-stpcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-stpncpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcasecmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcasestr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcat.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strchrnul.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcmp.c Fix v9/64-bit strcmp when string ends in multiple zero bytes. 2014-05-01 12:15:06 -07:00
test-strcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcspn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-string.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strlen.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strncasecmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strncat.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strncmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strncpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strnlen.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strpbrk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strrchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strspn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strstr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
testcopy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tester.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-bswap.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-endian.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
tst-inlcall.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-strcoll-overflow.c Fix tst-strcoll-overflow returning before timeout (BZ #17506) 2014-11-12 17:10:21 +05:30
tst-strfry.c
tst-strlen.c
tst-strtok_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-strtok.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-strxfrm2.c
tst-strxfrm.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-svc2.c
tst-svc.c
tst-svc.expect
tst-svc.input
Versions Sort Versions files 2013-02-17 16:34:04 +01:00
wordcopy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
xpg-strerror.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00