* libc/locale/locale.c (lc_ctype_charset): Disable defaulting to
"UTF-8" on Cygwin. (lc_message_charset): Ditto. (loadlocale): Disable setting charset of the "C" locale to "UTF-8" on Cygwin. * libc/stdlib/mbtowc_r.c (__mbtowc): Add Cygwin-specific comment. * libc/stdlib/wctomb_r.c (__wctomb): Ditto.
This commit is contained in:
parent
e6bda02346
commit
32cb8c8cfe
|
@ -1,3 +1,13 @@
|
||||||
|
2010-01-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* libc/locale/locale.c (lc_ctype_charset): Disable defaulting to
|
||||||
|
"UTF-8" on Cygwin.
|
||||||
|
(lc_message_charset): Ditto.
|
||||||
|
(loadlocale): Disable setting charset of the "C" locale to "UTF-8" on
|
||||||
|
Cygwin.
|
||||||
|
* libc/stdlib/mbtowc_r.c (__mbtowc): Add Cygwin-specific comment.
|
||||||
|
* libc/stdlib/wctomb_r.c (__wctomb): Ditto.
|
||||||
|
|
||||||
2010-01-14 Corinna Vinschen <corinna@vinschen.de>
|
2010-01-14 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT.
|
* libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT.
|
||||||
|
|
|
@ -242,7 +242,7 @@ static const char *__get_locale_env(struct _reent *, int);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#if 0 /*def __CYGWIN__ TODO: temporarily(?) disable C == UTF-8 */
|
||||||
static char lc_ctype_charset[ENCODING_LEN + 1] = "UTF-8";
|
static char lc_ctype_charset[ENCODING_LEN + 1] = "UTF-8";
|
||||||
static char lc_message_charset[ENCODING_LEN + 1] = "UTF-8";
|
static char lc_message_charset[ENCODING_LEN + 1] = "UTF-8";
|
||||||
#else
|
#else
|
||||||
|
@ -450,7 +450,7 @@ loadlocale(struct _reent *p, int category)
|
||||||
if (!strcmp (locale, "POSIX"))
|
if (!strcmp (locale, "POSIX"))
|
||||||
strcpy (locale, "C");
|
strcpy (locale, "C");
|
||||||
if (!strcmp (locale, "C")) /* Default "C" locale */
|
if (!strcmp (locale, "C")) /* Default "C" locale */
|
||||||
#ifdef __CYGWIN__
|
#if 0 /*def __CYGWIN__ TODO: temporarily(?) disable C == UTF-8 */
|
||||||
strcpy (charset, "UTF-8");
|
strcpy (charset, "UTF-8");
|
||||||
#else
|
#else
|
||||||
strcpy (charset, "ASCII");
|
strcpy (charset, "ASCII");
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
int (*__mbtowc) (struct _reent *, wchar_t *, const char *, size_t,
|
int (*__mbtowc) (struct _reent *, wchar_t *, const char *, size_t,
|
||||||
const char *, mbstate_t *)
|
const char *, mbstate_t *)
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
|
/* Cygwin starts up in UTF-8 mode. */
|
||||||
= __utf8_mbtowc;
|
= __utf8_mbtowc;
|
||||||
#else
|
#else
|
||||||
= __ascii_mbtowc;
|
= __ascii_mbtowc;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
int (*__wctomb) (struct _reent *, char *, wchar_t, const char *charset,
|
int (*__wctomb) (struct _reent *, char *, wchar_t, const char *charset,
|
||||||
mbstate_t *)
|
mbstate_t *)
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
|
/* Cygwin starts up in UTF-8 mode. */
|
||||||
= __utf8_wctomb;
|
= __utf8_wctomb;
|
||||||
#else
|
#else
|
||||||
= __ascii_wctomb;
|
= __ascii_wctomb;
|
||||||
|
|
Loading…
Reference in New Issue