summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/string/wstring.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libc/string/wstring.c b/libc/string/wstring.c
index f41281357..ed9ebb232 100644
--- a/libc/string/wstring.c
+++ b/libc/string/wstring.c
@@ -923,13 +923,17 @@ Wchar *Wstrstr(const Wchar *s1, const Wchar *s2)
#define Wstrspn wcsspn
#define Wstrpbrk wcspbrk
#else
-#define Wstrtok_r strtok_r
+#define Wstrtok_r __strtok_r
#define Wstrspn strspn
#define Wstrpbrk strpbrk
#endif
#ifdef L_strtok_r
+#ifndef L_wcstok
+weak_alias(__strtok_r,strtok_r);
+#endif
+
Wchar *Wstrtok_r(Wchar * __restrict s1, const Wchar * __restrict s2,
Wchar ** __restrict next_start)
{
@@ -976,7 +980,7 @@ Wchar *Wstrtok_r(Wchar * __restrict s1, const Wchar * __restrict s2,
#ifdef L_strtok
#define Wstrtok strtok
-#define Wstrtok_r strtok_r
+#define Wstrtok_r __strtok_r
Wchar *Wstrtok(Wchar * __restrict s1, const Wchar * __restrict s2)
{
@@ -1616,14 +1620,13 @@ void *memmem(const void *haystack, size_t haystacklen,
#define L_mempcpy
#define Wmempcpy wmempcpy
#else
-#define Wmempcpy mempcpy
+#define Wmempcpy __mempcpy
#endif
#ifdef L_mempcpy
#ifndef L_wmempcpy
-/* uClibc's old string implementation did this to cater to some app. */
-weak_alias(mempcpy,__mempcpy);
+weak_alias(__mempcpy,mempcpy);
#endif
Wvoid *Wmempcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)