summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdlib/wctomb_r.c
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-09-27 12:21:16 +0000
committerCorinna Vinschen <corinna@vinschen.de>2009-09-27 12:21:16 +0000
commita58d484bcfa8a8581fda771e2f60aa0307534590 (patch)
treee41c24a615f73ed496d51f89d71c44df612ccf08 /newlib/libc/stdlib/wctomb_r.c
parent7677a6b206265ca4dde7b93a04b15f602fcac0af (diff)
downloadcygnal-a58d484bcfa8a8581fda771e2f60aa0307534590.tar.gz
cygnal-a58d484bcfa8a8581fda771e2f60aa0307534590.tar.bz2
cygnal-a58d484bcfa8a8581fda771e2f60aa0307534590.zip
* 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.
Diffstat (limited to 'newlib/libc/stdlib/wctomb_r.c')
-rw-r--r--newlib/libc/stdlib/wctomb_r.c4
1 files changed, 4 insertions, 0 deletions
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),