acadia-newlib/newlib/libc
Corinna Vinschen 8d138c3f66 Cygwin: fix LC_CTYPE in global locale to be a real C.UTF-8 locale
https://cygwin.com/pipermail/cygwin/2022-December/252571.html

Cygwin's default locale is "C.UTF-8" as far as LC_CTYPE settings
are concerned.  However, while __global_locale contains fixed
mbtowc and wctomb pointers, the lc_ctype_T pointer is still pointing
to _C_ctype_locale, representing the standard "C" locale.

The problem with this is that the codeset name as well as MB_CUR_MAX
is wrong.

Fix this by introducing a new lc_ctype_T structure called
_C_utf8_ctype_locale, setting the default codeset to "UTF-8" and
MB_CUR_MAX to 6.  Use this as lc_ctype_T pointer in __global_locale
by default on Cygwin.

Fixes: a6a477fa81 ("POSIX-1.2008 per-thread locales, groundwork part 1")
Co-Authored-By: Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-03 16:16:30 +01:00
..
argz newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
ctype Add _REENT_ERRNO(ptr) 2022-07-13 06:55:41 +02:00
errno Add --enable-newlib-reent-thread-local option 2022-07-13 06:55:46 +02:00
iconv Add _REENT_ERRNO(ptr) 2022-07-13 06:55:41 +02:00
include Generally make all 'long double complex' methods available in <complex.h> 2022-11-08 21:38:08 +01:00
locale Cygwin: fix LC_CTYPE in global locale to be a real C.UTF-8 locale 2022-12-03 16:16:30 +01:00
machine amdgcn: Use __builtin_gcn_ in libc/machine/amdgcn/getreent.c 2022-11-22 18:05:34 -05:00
misc Remove __sinit_locks / __sinit_recursive_mutex 2022-05-13 12:31:56 +02:00
posix Fix some Coverity Scan errors. 2022-08-31 15:18:08 -04:00
reent Add --enable-newlib-reent-thread-local option 2022-07-13 06:55:46 +02:00
search newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
signal Add --enable-newlib-reent-thread-local option 2022-07-13 06:55:46 +02:00
ssp newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
stdio Fix some Coverity Scan errors. 2022-08-31 15:18:08 -04:00
stdio64 Add _REENT_ERRNO(ptr) 2022-07-13 06:55:41 +02:00
stdlib Implement sysconf for Arm 2022-09-19 15:35:55 -04:00
string Add --enable-newlib-reent-thread-local option 2022-07-13 06:55:46 +02:00
sys amdgcn: Replace asm("s8") by __builtin_gcn_kernarg_ptr if existing 2022-11-21 13:10:29 +01:00
syscalls newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
time strftime/wcsftime: use STRLEN, not strlen 2022-10-29 20:15:58 +02:00
unix newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
xdr newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
Makefile.inc Silence xsltproc when writing manpages 2022-05-04 17:05:52 -04:00
Makefile.unidata
acinclude.m4 newlib: drop phoenix support 2022-03-28 23:17:06 -04:00
libc.in.xml Generate manpages for functions in chapter sys.tex 2022-05-04 17:06:19 -04:00
libc.texi
sys.tex