summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/misc/regex/regex.c1
-rw-r--r--libc/misc/wchar/wstdio.c1
-rw-r--r--libc/stdio/fputws.c2
-rw-r--r--libc/stdio/scanf.c1
-rw-r--r--libc/stdio/vfprintf.c2
-rw-r--r--libc/string/wcsdup.c4
-rw-r--r--libc/string/wcstok.c4
-rw-r--r--libc/string/wstring.c6
8 files changed, 17 insertions, 4 deletions
diff --git a/libc/misc/regex/regex.c b/libc/misc/regex/regex.c
index 5f2e90da3..0d4cabe83 100644
--- a/libc/misc/regex/regex.c
+++ b/libc/misc/regex/regex.c
@@ -26,6 +26,7 @@
#define memcmp __memcmp
#define strcmp __strcmp
#define strlen __strlen
+#define wcslen __wcslen
/* for some reason this does not work */
#define memcpy __memcpy
diff --git a/libc/misc/wchar/wstdio.c b/libc/misc/wchar/wstdio.c
index b49494f35..55acc7187 100644
--- a/libc/misc/wchar/wstdio.c
+++ b/libc/misc/wchar/wstdio.c
@@ -49,6 +49,7 @@
* Should auto_wr_transition init the mbstate object?
*/
+#define wcslen __wcslen
#define _GNU_SOURCE
#include <stdio.h>
diff --git a/libc/stdio/fputws.c b/libc/stdio/fputws.c
index aa5a514cb..e83cc9fcb 100644
--- a/libc/stdio/fputws.c
+++ b/libc/stdio/fputws.c
@@ -5,6 +5,8 @@
* Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
*/
+#define wcslen __wcslen
+
#include "_stdio.h"
extern int __fputws_unlocked(const wchar_t *__restrict ws,
diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c
index 80a8821e7..a320a2d31 100644
--- a/libc/stdio/scanf.c
+++ b/libc/stdio/scanf.c
@@ -43,6 +43,7 @@
* standards and from an official C standard defect report.
*/
+#define wcslen __wcslen
#define _ISOC99_SOURCE /* for LLONG_MAX primarily... */
#define _GNU_SOURCE
diff --git a/libc/stdio/vfprintf.c b/libc/stdio/vfprintf.c
index 2adcefde5..bb8815416 100644
--- a/libc/stdio/vfprintf.c
+++ b/libc/stdio/vfprintf.c
@@ -90,6 +90,8 @@
#define _uintmaxtostr __libc__uintmaxtostr
#define strnlen __strnlen
+#define wcslen __wcslen
+#define wcsnlen __wcsnlen
#define _ISOC99_SOURCE /* for ULLONG primarily... */
#define _GNU_SOURCE
diff --git a/libc/string/wcsdup.c b/libc/string/wcsdup.c
index f1af0d683..25043ced1 100644
--- a/libc/string/wcsdup.c
+++ b/libc/string/wcsdup.c
@@ -10,8 +10,8 @@
#undef Wstrlen
#undef Wstrcpy
-#define Wstrlen wcslen
-#define Wstrcpy wcscpy
+#define Wstrlen __wcslen
+#define Wstrcpy __wcscpy
#include "wstring.c"
diff --git a/libc/string/wcstok.c b/libc/string/wcstok.c
index 2afbd9f22..625ee65e8 100644
--- a/libc/string/wcstok.c
+++ b/libc/string/wcstok.c
@@ -9,9 +9,9 @@
#define Wstrtok_r __wcstok
#undef Wstrspn
-#define Wstrspn wcsspn
+#define Wstrspn __wcsspn
#undef Wstrpbrk
-#define Wstrpbrk wcspbrk
+#define Wstrpbrk __wcspbrk
#include "wstring.c"
diff --git a/libc/string/wstring.c b/libc/string/wstring.c
index 1223929ff..ccbb886d4 100644
--- a/libc/string/wstring.c
+++ b/libc/string/wstring.c
@@ -72,6 +72,12 @@ extern size_t __strnlen (__const char *__string, size_t __maxlen) attribute_hidd
extern char *__strpbrk (__const char *__s, __const char *__accept) attribute_hidden;
extern size_t __strspn (__const char *__s, __const char *__accept) attribute_hidden;
extern char *__strsignal (int __sig) attribute_hidden;
+extern wchar_t *__wcsdup (__const wchar_t *__s) attribute_hidden;
+extern size_t __wcslen (__const wchar_t *__s) attribute_hidden;
+extern wchar_t *__wcscpy (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src) attribute_hidden;
+extern size_t __wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) attribute_hidden;
+extern wchar_t *__wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept) attribute_hidden;
/**********************************************************************/
/* NOTE: If we ever do internationalized syserr messages, this will