diff options
author | Thomas Fitzsimmons <fitzsim@redhat.com> | 2002-04-24 20:53:30 +0000 |
---|---|---|
committer | Thomas Fitzsimmons <fitzsim@redhat.com> | 2002-04-24 20:53:30 +0000 |
commit | eaa75b70e31aed8ba2823c7b37ff92230dd8c451 (patch) | |
tree | 255a744fbdffc3197c3f971ed1edae29c71a6134 /newlib/libc/locale/locale.c | |
parent | b9f9f699372fae9f3b7926fa165d07fe68a949fb (diff) | |
download | cygnal-eaa75b70e31aed8ba2823c7b37ff92230dd8c451.tar.gz cygnal-eaa75b70e31aed8ba2823c7b37ff92230dd8c451.tar.bz2 cygnal-eaa75b70e31aed8ba2823c7b37ff92230dd8c451.zip |
* Makefile.am (check-DEJAGNU): New target.
(site.exp): Likewise.
* acinclude.m4 (NEWLIB_CONFIGURE): Replace AC_CANONICAL_HOST
with AC_CANONICAL_SYSTEM. Remove AC_CANONICAL_BUILD.
* libc/locale/locale.c (_setlocale_r): Add UTF-8 support.
* libc/stdlib/mbtowc_r.c (_mbtowc_r): Likewise.
* libc/stdlib/wctomb_r.c (_wctomb_r): Likewise.
* testsuite: New directory.
* testsuite/config: Likewise.
* testsuite/lib: Likewise.
* testsuite/newlib.locale: Likewise.
* testsuite/newlib.string: Likewise.
* testsuite/config/default.exp: New file.
* testsuite/lib/checkoutput.exp: New file.
* testsuite/lib/newlib.exp: New file.
* testsuite/lib/passfail.exp: New file.
* testsuite/newlib.locale/UTF-8.c: New file.
* testsuite/newlib.locale/UTF-8.exp: New file.
* testsuite/newlib.locale/locale.exp: New file.
* testsuite/newlib.string/string.exp: New file.
* testsuite/newlib.string/tstring.c: New file.
Diffstat (limited to 'newlib/libc/locale/locale.c')
-rw-r--r-- | newlib/libc/locale/locale.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c index e1f45335a..4487f7d47 100644 --- a/newlib/libc/locale/locale.c +++ b/newlib/libc/locale/locale.c @@ -140,13 +140,16 @@ _DEFUN(_setlocale_r, (p, category, locale), { if (strcmp (locale, "C") && strcmp (locale, "") && strcmp (locale, "C") && strcmp (locale, "C-JIS") && - strcmp (locale, "C-EUCJP") && strcmp (locale, "C-SJIS")) + strcmp (locale, "C-EUCJP") && strcmp (locale, "C-SJIS") && + strcmp (locale, "UTF-8")) return 0; strcpy (last_lc_ctype, lc_ctype); strcpy (lc_ctype, locale); - if (!strcmp (locale, "C-JIS")) + if (!strcmp (locale, "UTF-8")) + __mb_cur_max = 6; + else if (!strcmp (locale, "C-JIS")) __mb_cur_max = 8; else if (strlen (locale) > 1) __mb_cur_max = 2; |