diff options
Diffstat (limited to 'libc/misc/wchar')
| -rw-r--r-- | libc/misc/wchar/wchar.c | 13 | ||||
| -rw-r--r-- | libc/misc/wchar/wstdio.c | 3 |
2 files changed, 6 insertions, 10 deletions
diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c index 1a16fc9d6..2535b5fff 100644 --- a/libc/misc/wchar/wchar.c +++ b/libc/misc/wchar/wchar.c @@ -260,10 +260,11 @@ int wctob(wint_t c) /**********************************************************************/ #ifdef L_mbsinit -int mbsinit(const mbstate_t *ps) +int attribute_hidden __mbsinit(const mbstate_t *ps) { return !ps || !ps->__mask; } +strong_alias(__mbsinit,mbsinit) #endif /**********************************************************************/ @@ -787,10 +788,7 @@ size_t attribute_hidden __mbsnrtowcs(wchar_t *__restrict dst, const char **__res } return len - count; } - -size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src, - size_t NMC, size_t len, mbstate_t *__restrict ps) - __attribute__ ((__weak__, __alias__("__mbsnrtowcs"))); +weak_alias(__mbsnrtowcs,mbsnrtowcs) #endif /**********************************************************************/ @@ -909,10 +907,7 @@ size_t attribute_hidden __wcsnrtombs(char *__restrict dst, const wchar_t **__res } return len - count; } - -size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src, - size_t NWC, size_t len, mbstate_t *__restrict ps) - __attribute__ ((__weak__, __alias__("__wcsnrtombs"))); +weak_alias(__wcsnrtombs,wcsnrtombs) #endif /**********************************************************************/ diff --git a/libc/misc/wchar/wstdio.c b/libc/misc/wchar/wstdio.c index 91917683a..55e7fef6b 100644 --- a/libc/misc/wchar/wstdio.c +++ b/libc/misc/wchar/wstdio.c @@ -53,6 +53,7 @@ #define wcsrtombs __wcsrtombs #define mbrtowc __mbrtowc #define wcrtomb __wcrtomb +#define fflush_unlocked __fflush_unlocked #define _GNU_SOURCE #include <stdio.h> @@ -288,7 +289,7 @@ UNLOCKED(wchar_t *,fgetws,(wchar_t *__restrict ws, int n, wint_t wi; while ((n > 1) - && ((wi = fgetwc_unlocked(stream)) != WEOF) + && ((wi = __fgetwc_unlocked(stream)) != WEOF) && ((*p++ = wi) != '\n') ) { --n; |
