diff options
| author | q66 | 2023-12-15 23:09:31 +0100 |
|---|---|---|
| committer | Julien Voisin | 2023-12-15 23:32:37 +0100 |
| commit | ca2df4878c2539c6a66553df182758a01ebcdcb8 (patch) | |
| tree | 239e5b86a4e8577c1819413d2a380aa93c69a85a /include/wchar.h | |
| parent | 8d090c8a1a86408fa8b54029b97fccd17f9d35d5 (diff) | |
Move wctomb to stdlib.h and disable it for now
Diffstat (limited to 'include/wchar.h')
| -rw-r--r-- | include/wchar.h | 15 |
1 files changed, 0 insertions, 15 deletions
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, | |||
| 224 | return __r; | 224 | return __r; |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | #ifdef MB_CUR_MAX | ||
| 228 | #undef wctomb | ||
| 229 | #if __has_builtin(__builtin_wctomb) | ||
| 230 | __diagnose_as_builtin(__builtin_wctomb, 1, 2) | ||
| 231 | #endif | ||
| 232 | _FORTIFY_FN(wctomb) int wctomb(char * _FORTIFY_POS0 __s, wchar_t __w) | ||
| 233 | { | ||
| 234 | __fh_size_t __b = __bos(__s, 0); | ||
| 235 | |||
| 236 | if (__s && 16 > __b && MB_CUR_MAX > __b) | ||
| 237 | __builtin_trap(); | ||
| 238 | return __orig_wctomb(__s, __w); | ||
| 239 | } | ||
| 240 | #endif // MB_CUR_MAX | ||
| 241 | |||
| 242 | #if __has_builtin(__builtin_wmemcpy) | 227 | #if __has_builtin(__builtin_wmemcpy) |
| 243 | __diagnose_as_builtin(__builtin_wmemcpy, 1, 2, 3) | 228 | __diagnose_as_builtin(__builtin_wmemcpy, 1, 2, 3) |
| 244 | #endif | 229 | #endif |
