From 309ce1f19f774f592d790e89de900dd81300c90b Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Thu, 19 Sep 2002 17:30:05 +0000 Subject: Hide my personal #warning reminders. Add __wcschrnul, rename strchrnul to __strchrnul, and add weak aliases for them. --- libc/string/wstring.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libc/string/wstring.c') 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))); -- cgit v1.2.3