Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@redhat.com>2002-04-25 00:53:30 +0400
committerThomas Fitzsimmons <fitzsim@redhat.com>2002-04-25 00:53:30 +0400
commiteaa75b70e31aed8ba2823c7b37ff92230dd8c451 (patch)
tree255a744fbdffc3197c3f971ed1edae29c71a6134 /newlib/libc/locale
parentb9f9f699372fae9f3b7926fa165d07fe68a949fb (diff)
* 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')
-rw-r--r--newlib/libc/locale/Makefile.in4
-rw-r--r--newlib/libc/locale/locale.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/newlib/libc/locale/Makefile.in b/newlib/libc/locale/Makefile.in
index dbc53800e..f65881e64 100644
--- a/newlib/libc/locale/Makefile.in
+++ b/newlib/libc/locale/Makefile.in
@@ -58,8 +58,12 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
AR = @AR@
AS = @AS@
CC = @CC@
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;