* libc/locale/nl_langinfo.c (nl_langinfo): Just return current locale
charset on Cygwin.
This commit is contained in:
parent
dc4e4aabba
commit
8bd7bd3bc0
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue