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:
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;