diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-01-17 09:39:06 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-01-17 09:39:06 +0000 |
commit | 32cb8c8cfe21f747b507ec34aa81f717b766c38f (patch) | |
tree | 0c489516abdeadd11a2917f5cddc0582e48d01fe | |
parent | e6bda0234606184f8816c99d0eae011ac3bcd790 (diff) | |
download | cygnal-32cb8c8cfe21f747b507ec34aa81f717b766c38f.tar.gz cygnal-32cb8c8cfe21f747b507ec34aa81f717b766c38f.tar.bz2 cygnal-32cb8c8cfe21f747b507ec34aa81f717b766c38f.zip |
* 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.
-rw-r--r-- | newlib/ChangeLog | 10 | ||||
-rw-r--r-- | newlib/libc/locale/locale.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdlib/mbtowc_r.c | 1 | ||||
-rw-r--r-- | newlib/libc/stdlib/wctomb_r.c | 1 |
4 files changed, 14 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index cd9b52457..1df8968d3 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -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> * libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT. diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c index 311a43820..8a74034d0 100644 --- a/newlib/libc/locale/locale.c +++ b/newlib/libc/locale/locale.c @@ -242,7 +242,7 @@ static const char *__get_locale_env(struct _reent *, int); #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_message_charset[ENCODING_LEN + 1] = "UTF-8"; #else @@ -450,7 +450,7 @@ loadlocale(struct _reent *p, int category) if (!strcmp (locale, "POSIX")) strcpy (locale, "C"); if (!strcmp (locale, "C")) /* Default "C" locale */ -#ifdef __CYGWIN__ +#if 0 /*def __CYGWIN__ TODO: temporarily(?) disable C == UTF-8 */ strcpy (charset, "UTF-8"); #else strcpy (charset, "ASCII"); diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c index f161385ed..7c6be69ea 100644 --- a/newlib/libc/stdlib/mbtowc_r.c +++ b/newlib/libc/stdlib/mbtowc_r.c @@ -10,6 +10,7 @@ int (*__mbtowc) (struct _reent *, wchar_t *, const char *, size_t, const char *, mbstate_t *) #ifdef __CYGWIN__ + /* Cygwin starts up in UTF-8 mode. */ = __utf8_mbtowc; #else = __ascii_mbtowc; diff --git a/newlib/libc/stdlib/wctomb_r.c b/newlib/libc/stdlib/wctomb_r.c index d1ee4978d..98a0b74c0 100644 --- a/newlib/libc/stdlib/wctomb_r.c +++ b/newlib/libc/stdlib/wctomb_r.c @@ -9,6 +9,7 @@ int (*__wctomb) (struct _reent *, char *, wchar_t, const char *charset, mbstate_t *) #ifdef __CYGWIN__ + /* Cygwin starts up in UTF-8 mode. */ = __utf8_wctomb; #else = __ascii_wctomb; |