]> sourceware.org Git - newlib-cygwin.git/commitdiff
* libc/locale/nl_langinfo.c (nl_langinfo): Just return current locale
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 7 Oct 2009 16:45:23 +0000 (16:45 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 7 Oct 2009 16:45:23 +0000 (16:45 +0000)
charset on Cygwin.

newlib/ChangeLog
newlib/libc/locale/nl_langinfo.c

index 8714a397d52651992bb4ec1dd5d2bbf2551c279e..43563837d9127893fba8b7ba9010c778337ea4e6 100644 (file)
@@ -1,3 +1,8 @@
+2009-10-07  Corinna Vinschen  <corinna@vinschen.de>
+
+       * libc/locale/nl_langinfo.c (nl_langinfo): Just return current locale
+       charset on Cygwin.
+
 2009-10-03  Corinna Vinschen  <corinna@vinschen.de>
 
        * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Allow CESU-8 surrogate
index b2923bd65cddff0889b602bd8739300a71b72f8b..8e60c6b210bb1b2e935d6088967b9741eb43c3cc 100644 (file)
 #include "lmonetary.h"
 #include "lmessages.h"
 
+#ifndef __CYGWIN__
 #define TRANSITION_PERIOD_HACK
+#endif
 
 #define _REL(BASE) ((int)item-BASE)
 
+extern char *__locale_charset ();
+
 char *
 _DEFUN(nl_langinfo, (item), 
        nl_item item) {
@@ -54,6 +58,9 @@ _DEFUN(nl_langinfo, (item),
 
    switch (item) {
        case CODESET:
+#ifdef __CYGWIN__
+               ret = __locale_charset ();
+#else
                ret = "";
                if ((s = setlocale(LC_CTYPE, NULL)) != NULL) {
                        if ((cs = strchr(s, '.')) != NULL) {
@@ -92,6 +99,7 @@ _DEFUN(nl_langinfo, (item),
                                  )
                                ret = "US-ASCII";
                }
+#endif /* __CYGWIN__ */
                break;
        case D_T_FMT:
                ret = (char *) __get_current_time_locale()->c_fmt;
This page took 0.047856 seconds and 5 git commands to generate.