summaryrefslogtreecommitdiff
path: root/string/memmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/memmem.c')
-rw-r--r--string/memmem.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/string/memmem.c b/string/memmem.c
index b2842fe57f..bafac03df9 100644
--- a/string/memmem.c
+++ b/string/memmem.c
@@ -26,6 +26,7 @@
#ifndef _LIBC
# define __builtin_expect(expr, val) (expr)
+# define __memmem memmem
#endif
#define RETURN_TYPE void *
@@ -38,8 +39,8 @@
if NEEDLE_LEN is 0, otherwise NULL if NEEDLE is not found in
HAYSTACK. */
void *
-memmem (const void *haystack_start, size_t haystack_len,
- const void *needle_start, size_t needle_len)
+__memmem (const void *haystack_start, size_t haystack_len,
+ const void *needle_start, size_t needle_len)
{
/* Abstract memory is considered to be an array of 'unsigned char' values,
not an array of 'char' values. See ISO C 99 section 6.2.6.1. */
@@ -73,6 +74,8 @@ memmem (const void *haystack_start, size_t haystack_len,
else
return two_way_long_needle (haystack, haystack_len, needle, needle_len);
}
-libc_hidden_def (memmem)
+libc_hidden_def (__memmem)
+weak_alias (__memmem, memmem)
+libc_hidden_weak (memmem)
#undef LONG_NEEDLE_THRESHOLD