From a58d484bcfa8a8581fda771e2f60aa0307534590 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 27 Sep 2009 12:21:16 +0000 Subject: * libc/locale/locale.c (lc_ctype_charset): Set to "UTF-8" on Cygwin. (lc_message_charset): Ditto. (loadlocale): Set charset of the "C" locale to "UTF-8" on Cygwin. * libc/stdlib/mbtowc_r.c (__mbtowc): Default to __utf8_mbtowc on Cygwin. * libc/stdlib/wctomb_r.c (__wctomb): Default to __utf8_wctomb on Cygwin. --- newlib/libc/stdlib/mbtowc_r.c | 4 ++++ newlib/libc/stdlib/wctomb_r.c | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'newlib/libc/stdlib') diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c index 4e80c51b1..a791692be 100644 --- a/newlib/libc/stdlib/mbtowc_r.c +++ b/newlib/libc/stdlib/mbtowc_r.c @@ -9,7 +9,11 @@ int (*__mbtowc) (struct _reent *, wchar_t *, const char *, size_t, const char *, mbstate_t *) +#ifdef __CYGWIN__ + = __utf8_mbtowc; +#else = __ascii_mbtowc; +#endif int _DEFUN (_mbtowc_r, (r, pwc, s, n, state), diff --git a/newlib/libc/stdlib/wctomb_r.c b/newlib/libc/stdlib/wctomb_r.c index 95a04069c..207221a7e 100644 --- a/newlib/libc/stdlib/wctomb_r.c +++ b/newlib/libc/stdlib/wctomb_r.c @@ -8,7 +8,11 @@ int (*__wctomb) (struct _reent *, char *, wchar_t, const char *charset, mbstate_t *) +#ifdef __CYGWIN__ + = __utf8_wctomb; +#else = __ascii_wctomb; +#endif int _DEFUN (_wctomb_r, (r, s, wchar, state), -- cgit v1.2.3