Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2023-02-24 18:37:44 +0300
committerCorinna Vinschen <corinna@vinschen.de>2023-02-24 18:40:58 +0300
commite95a7a795522165a2d022dbb4df281d6be661c83 (patch)
tree458b4e5435409dc77a8dc85870ada6afc4c158ae /newlib
parent89eb4bce152f93a9ace37bb7c67941a0e3bf19ae (diff)
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')
-rw-r--r--newlib/libc/locale/setlocale.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/locale/setlocale.h b/newlib/libc/locale/setlocale.h
index 3530ec664..7abf92f7e 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];