From ca2df4878c2539c6a66553df182758a01ebcdcb8 Mon Sep 17 00:00:00 2001 From: q66 Date: Fri, 15 Dec 2023 23:09:31 +0100 Subject: Move wctomb to stdlib.h and disable it for now --- include/wchar.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'include/wchar.h') diff --git a/include/wchar.h b/include/wchar.h index 7a2a192..e7e3db6 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -224,21 +224,6 @@ _FORTIFY_FN(wcsrtombs) size_t wcsrtombs(char * _FORTIFY_POS0 __d, return __r; } -#ifdef MB_CUR_MAX -#undef wctomb -#if __has_builtin(__builtin_wctomb) -__diagnose_as_builtin(__builtin_wctomb, 1, 2) -#endif -_FORTIFY_FN(wctomb) int wctomb(char * _FORTIFY_POS0 __s, wchar_t __w) -{ - __fh_size_t __b = __bos(__s, 0); - - if (__s && 16 > __b && MB_CUR_MAX > __b) - __builtin_trap(); - return __orig_wctomb(__s, __w); -} -#endif // MB_CUR_MAX - #if __has_builtin(__builtin_wmemcpy) __diagnose_as_builtin(__builtin_wmemcpy, 1, 2, 3) #endif -- cgit v1.3