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>2009-10-07 20:45:23 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-10-07 20:45:23 +0400
commit8bd7bd3bc0987bb562fca5d8a361462c24235cbf (patch)
treea4a858f9b358c5d5b038b0d081df02d47a8c7c73 /newlib/libc/locale/nl_langinfo.c
parentdc4e4aabba2e502205eb6fd4c6e12f5a88df4983 (diff)
* libc/locale/nl_langinfo.c (nl_langinfo): Just return current locale
charset on Cygwin.
Diffstat (limited to 'newlib/libc/locale/nl_langinfo.c')
-rw-r--r--newlib/libc/locale/nl_langinfo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/newlib/libc/locale/nl_langinfo.c b/newlib/libc/locale/nl_langinfo.c
index b2923bd65..8e60c6b21 100644
--- a/newlib/libc/locale/nl_langinfo.c
+++ b/newlib/libc/locale/nl_langinfo.c
@@ -37,10 +37,14 @@
#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;