diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2023-02-24 16:37:44 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-02-24 16:40:58 +0100 |
commit | e95a7a795522165a2d022dbb4df281d6be661c83 (patch) | |
tree | 458b4e5435409dc77a8dc85870ada6afc4c158ae /newlib/libc/locale | |
parent | 89eb4bce152f93a9ace37bb7c67941a0e3bf19ae (diff) | |
download | newlib-e95a7a795522165a2d022dbb4df281d6be661c83.zip newlib-e95a7a795522165a2d022dbb4df281d6be661c83.tar.gz newlib-e95a7a795522165a2d022dbb4df281d6be661c83.tar.bz2 |
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
Diffstat (limited to 'newlib/libc/locale')
-rw-r--r-- | newlib/libc/locale/setlocale.h | 2 |
1 files changed, 1 insertions, 1 deletions
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]; |