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>2010-01-23 17:32:25 +0300
committerCorinna Vinschen <corinna@vinschen.de>2010-01-23 17:32:25 +0300
commitc631824a8ec1b453e485813c36850ad87372254b (patch)
treed862f296e7565ce8a21ba877e5ca353164896c2a /newlib
parent7351076e17a7af3528900150d590f32eb6fbc914 (diff)
* libc/locale/locale.c (loadlocale): Disable JIS entirely on Cygwin.
Allow TIS620 and TIS-620 as aliases for CP874 on Cygwin.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/locale/locale.c15
2 files changed, 19 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 396d0c3ee..6b482e547 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Disable JIS entirely on Cygwin.
+ Allow TIS620 and TIS-620 as aliases for CP874 on Cygwin.
+
2010-01-22 Corinna Vinschen <corinna@vinschen.de>
* libc/locale/lmonetary.c (__monetary_load_locale): Take additional
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 4dd773463..1cbfa4074 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -83,7 +83,7 @@ dash, <<"EUC-JP">> and <<"EUC-KR">>.
corresponding LC_* environment variables and $LANG according to POSIX rules.
Under Cygwin, this implementation additionally supports the charsets
-<<"GBK">>, <<"eucKR">>, and <<"Big5">>.
+<<"GBK">>, <<"eucKR">>, <<"Big5">>, and <<"TIS-620">>.
This implementation also supports a single modifier, <<"cjknarrow">>.
Any other modifier is ignored. <<"cjknarrow">>, in conjunction with one
@@ -547,6 +547,7 @@ loadlocale(struct _reent *p, int category)
l_mbtowc = __utf8_mbtowc;
#endif
break;
+#ifndef __CYGWIN__
case 'J':
case 'j':
if (strcasecmp (charset, "JIS"))
@@ -558,6 +559,7 @@ loadlocale(struct _reent *p, int category)
l_mbtowc = __jis_mbtowc;
#endif
break;
+#endif
case 'E':
case 'e':
if (!strcasecmp (charset, "EUCJP") || !strcasecmp (charset, "EUC-JP"))
@@ -716,6 +718,17 @@ loadlocale(struct _reent *p, int category)
l_mbtowc = __big5_mbtowc;
#endif
break;
+ case 'T':
+ case 't':
+ if (strcasecmp (charset, "TIS620") && strcasecmp (charset, "TIS-620"))
+ return NULL;
+ strcpy (charset, "CP874");
+ mbc_max = 1;
+#ifdef _MB_CAPABLE
+ l_wctomb = __cp_wctomb;
+ l_mbtowc = __cp_mbtowc;
+#endif
+ break;
#endif /* __CYGWIN__ */
default:
return NULL;