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
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-02-09 11:58:38 +0300
committerCorinna Vinschen <corinna@vinschen.de>2010-02-09 11:58:38 +0300
commit1cea6189a33dafcd77d5668a2a623ed01a4dfe1c (patch)
tree3dd1112dbd48f83637aa7ac13fddd746d6cf7b43 /newlib/libc/locale/locale.c
parent2f27950afb0fe1ffad9a2c25dcdbf282bbe4577b (diff)
* libc/locale/lmessages.c (__messages_load_locale): Take additional
parameters for wide char to multibyte conversion. Call __set_lc_messages_from_win on Cygwin. * libc/locale/lmessages.h: Make C++-safe. (__messages_load_locale): Change declaration. * libc/locale/lmonetary.c (__monetary_load_locale): Use _monetary_locale_buf as buffer pointer. * libc/locale/lnumeric.c (__numeric_load_locale): Use _numeric_locale_buf as buffer pointer. * libc/locale/timelocal.c (__time_load_locale): Use time_locale_buf as buffer pointer. * libc/locale/locale.c (loadlocale): Enable loading LC_MESSAGES data on Cygwin.
Diffstat (limited to 'newlib/libc/locale/locale.c')
-rw-r--r--newlib/libc/locale/locale.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 2b1f6dd33..8444be961 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -817,7 +817,13 @@ restart:
|| strncmp (locale, "zh", 2) == 0));
}
else if (category == LC_MESSAGES)
- strcpy (lc_message_charset, charset);
+ {
+#ifdef __CYGWIN__
+ ret = __messages_load_locale (locale, (void *) l_wctomb, charset);
+ if (!ret)
+#endif
+ strcpy (lc_message_charset, charset);
+ }
#ifdef __CYGWIN__
else if (category == LC_COLLATE)
ret = __collate_load_locale (locale, (void *) l_mbtowc, charset);