In mintlib, those 2 macros are defined to 1, however the wctomb() style of functions produce up to 4 bytes. I wonder whether we need to change those definitions?
Also, the functions in the multibyte directory were originally taken from musl. There (as in most implementations) sizeof(wchar_t) is 4. I'm not entirely sure whether that implementation also works for our case where sizeof(wchar_t) == 2. There are at least some dubious tests like
and
|
} else if ((unsigned)wc-0x10000 < 0x100000) { |
In mintlib, those 2 macros are defined to
1, however the wctomb() style of functions produce up to 4 bytes. I wonder whether we need to change those definitions?Also, the functions in the multibyte directory were originally taken from musl. There (as in most implementations) sizeof(wchar_t) is 4. I'm not entirely sure whether that implementation also works for our case where sizeof(wchar_t) == 2. There are at least some dubious tests like
mintlib/multibyte/mbrtowc.c
Line 40 in 1fcfd35
mintlib/multibyte/wcrtomb.c
Line 29 in 1fcfd35