summaryrefslogtreecommitdiff
path: root/libc/string/wstring.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2002-09-19 17:30:05 +0000
committerManuel Novoa III <mjn3@codepoet.org>2002-09-19 17:30:05 +0000
commit309ce1f19f774f592d790e89de900dd81300c90b (patch)
tree9032c728cb6d98dd9f3490b748cf1bab5857e475 /libc/string/wstring.c
parentdd3c72e1fabd08b2f03ab6a4f008609f62769373 (diff)
Hide my personal #warning reminders. Add __wcschrnul, rename strchrnul
to __strchrnul, and add weak aliases for them.
Diffstat (limited to 'libc/string/wstring.c')
-rw-r--r--libc/string/wstring.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libc/string/wstring.c b/libc/string/wstring.c
index 8a8206364..ab6bd4169 100644
--- a/libc/string/wstring.c
+++ b/libc/string/wstring.c
@@ -366,7 +366,7 @@ const char *const sys_errlist[] = {
#endif
#if EWOULDBLOCK != EAGAIN
-#warning EWOULDBLOCK does not equal EAGAIN
+#error EWOULDBLOCK does not equal EAGAIN
#endif
/* For now, ignore the other arch-specific errors. glibc only maps EPROCLIM. */
@@ -628,7 +628,9 @@ int Wmemcmp(const Wvoid *s1, const Wvoid *s2, size_t n)
#ifdef L_strcmp
#ifndef L_wcscmp
+#ifdef __UCLIBC_MJN3_ONLY__
#warning implement strcoll and remove weak alias (or enable for C locale only)
+#endif
weak_alias(strcmp,strcoll);
#endif
@@ -1750,14 +1752,19 @@ char *strsep(char ** __restrict s1, const char * __restrict s2)
/**********************************************************************/
#ifdef L_wcschrnul
#define L_strchrnul
+#define __Wstrchrnul __wcschrnul
#define Wstrchrnul wcschrnul
#else
+#define __Wstrchrnul __strchrnul
#define Wstrchrnul strchrnul
#endif
#ifdef L_strchrnul
-Wchar *Wstrchrnul(register const Wchar *s, Wint c)
+extern Wchar *__Wstrchrnul(register const Wchar *s, Wint c);
+weak_alias(__Wstrchrnul, Wstrchrnul);
+
+Wchar *__Wstrchrnul(register const Wchar *s, Wint c)
{
--s;
while (*++s && (*s != ((Wchar)c)));