From e95a7a795522165a2d022dbb4df281d6be661c83 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 24 Feb 2023 16:37:44 +0100 Subject: Cygwin: convert Windows locale handling from LCID to ISO5646 strings Since Windows Vista, locale handling is converted from using numeric locale identifiers (LCID) to using ISO5646 locale strings. In the meantime Windows introduced new locales which don't even have a LCID attached. Those were unusable in Cygwin because locale information for these locales required to call the new locale functions taking a locale string. Convert Cygwin to drop LCIDs and use Windows ISO5646 locales instead. The last place using LCIDs is the __set_charset_from_locale function. Checking numerically is easier and uslay faster than checking strings. However, this function is clearly a TODO --- newlib/libc/locale/setlocale.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'newlib/libc') diff --git a/newlib/libc/locale/setlocale.h b/newlib/libc/locale/setlocale.h index 3530ec6..7abf92f 100644 --- a/newlib/libc/locale/setlocale.h +++ b/newlib/libc/locale/setlocale.h @@ -46,7 +46,7 @@ __BEGIN_DECLS #ifdef __CYGWIN__ struct lc_collate_T { - __uint32_t lcid; + wchar_t win_locale[ENCODING_LEN + 1]; int (*mbtowc) (struct _reent *, wchar_t *, const char *, size_t, mbstate_t *); char codeset[ENCODING_LEN + 1]; -- cgit v1.1