|
|
b40826 |
2011-08-14 Roland McGrath <roland@hack.frob.com>
|
|
|
b40826 |
|
|
|
b40826 |
* locale/Makefile (locale-CPPFLAGS): Renamed CPPFLAGS-locale-programs.
|
|
|
b40826 |
(locale-CPPFLAGS): New variable; put LOCALEDIR, LOCALE_ALIAS_PATH and
|
|
|
b40826 |
-Iprograms here.
|
|
|
b40826 |
(cppflags-iterator.mk sequence): Use locale-programs in place of nonlib.
|
|
|
b40826 |
(localedef-modules): Add localedef.
|
|
|
b40826 |
(locale-modules): Add locale.
|
|
|
b40826 |
|
|
|
b40826 |
2011-08-13 Ulrich Drepper <drepper@gmail.com>
|
|
|
b40826 |
|
|
|
b40826 |
* intl/l10nflist.c (_nl_normalize_codeset): Make it compile outside
|
|
|
b40826 |
of libc. Make tolower call locale-independent. Optimize a bit by
|
|
|
b40826 |
using isdigit instead of isalnum.
|
|
|
b40826 |
* locale/Makefile (locale-CPPFLAGS): Add -DNOT_IN_libc.
|
|
|
b40826 |
|
|
|
b40826 |
2011-08-11 Ulrich Drepper <drepper@gmail.com>
|
|
|
b40826 |
|
|
|
b40826 |
* intl/l10nflist.c (_nl_make_l10nflist): Use locale-independent
|
|
|
b40826 |
classification.
|
|
|
b40826 |
|
|
|
b40826 |
Index: glibc-2.12-2-gc4ccff1/intl/l10nflist.c
|
|
|
b40826 |
===================================================================
|
|
|
b40826 |
--- glibc-2.12-2-gc4ccff1.orig/intl/l10nflist.c
|
|
|
b40826 |
+++ glibc-2.12-2-gc4ccff1/intl/l10nflist.c
|
|
|
b40826 |
@@ -332,13 +332,18 @@ _nl_normalize_codeset (codeset, name_len
|
|
|
b40826 |
char *retval;
|
|
|
b40826 |
char *wp;
|
|
|
b40826 |
size_t cnt;
|
|
|
b40826 |
+#ifdef NOT_IN_libc
|
|
|
b40826 |
+ locale_t locale = newlocale (0, "C", NULL);
|
|
|
b40826 |
+#else
|
|
|
b40826 |
+# define locale _nl_C_locobj_ptr
|
|
|
b40826 |
+#endif
|
|
|
b40826 |
|
|
|
b40826 |
for (cnt = 0; cnt < name_len; ++cnt)
|
|
|
b40826 |
- if (isalnum ((unsigned char) codeset[cnt]))
|
|
|
b40826 |
+ if (__isalnum_l ((unsigned char) codeset[cnt], locale))
|
|
|
b40826 |
{
|
|
|
b40826 |
++len;
|
|
|
b40826 |
|
|
|
b40826 |
- if (isalpha ((unsigned char) codeset[cnt]))
|
|
|
b40826 |
+ if (! __isdigit_l ((unsigned char) codeset[cnt], locale))
|
|
|
b40826 |
only_digit = 0;
|
|
|
b40826 |
}
|
|
|
b40826 |
|
|
|
b40826 |
@@ -346,15 +351,14 @@ _nl_normalize_codeset (codeset, name_len
|
|
|
b40826 |
|
|
|
b40826 |
if (retval != NULL)
|
|
|
b40826 |
{
|
|
|
b40826 |
+ wp = retval;
|
|
|
b40826 |
if (only_digit)
|
|
|
b40826 |
- wp = stpcpy (retval, "iso");
|
|
|
b40826 |
- else
|
|
|
b40826 |
- wp = retval;
|
|
|
b40826 |
+ wp = stpcpy (wp, "iso");
|
|
|
b40826 |
|
|
|
b40826 |
for (cnt = 0; cnt < name_len; ++cnt)
|
|
|
b40826 |
- if (isalpha ((unsigned char) codeset[cnt]))
|
|
|
b40826 |
- *wp++ = tolower ((unsigned char) codeset[cnt]);
|
|
|
b40826 |
- else if (isdigit ((unsigned char) codeset[cnt]))
|
|
|
b40826 |
+ if (__isalpha_l ((unsigned char) codeset[cnt], locale))
|
|
|
b40826 |
+ *wp++ = __tolower_l ((unsigned char) codeset[cnt], locale);
|
|
|
b40826 |
+ else if (__isdigit_l ((unsigned char) codeset[cnt], locale))
|
|
|
b40826 |
*wp++ = codeset[cnt];
|
|
|
b40826 |
|
|
|
b40826 |
*wp = '\0';
|
|
|
b40826 |
Index: glibc-2.12-2-gc4ccff1/locale/Makefile
|
|
|
b40826 |
===================================================================
|
|
|
b40826 |
--- glibc-2.12-2-gc4ccff1.orig/locale/Makefile
|
|
|
b40826 |
+++ glibc-2.12-2-gc4ccff1/locale/Makefile
|
|
|
b40826 |
@@ -59,10 +59,11 @@ vpath %.c programs ../crypt
|
|
|
b40826 |
vpath %.h programs
|
|
|
b40826 |
vpath %.gperf programs
|
|
|
b40826 |
|
|
|
b40826 |
-localedef-modules := $(categories:%=ld-%) charmap linereader locfile \
|
|
|
b40826 |
+localedef-modules := localedef $(categories:%=ld-%) \
|
|
|
b40826 |
+ charmap linereader locfile \
|
|
|
b40826 |
repertoire locarchive
|
|
|
b40826 |
localedef-aux := md5
|
|
|
b40826 |
-locale-modules := locale-spec
|
|
|
b40826 |
+locale-modules := locale locale-spec
|
|
|
b40826 |
lib-modules := charmap-dir simple-hash xmalloc xstrdup
|
|
|
b40826 |
|
|
|
b40826 |
|
|
|
b40826 |
@@ -90,22 +91,27 @@ endif
|
|
|
b40826 |
|
|
|
b40826 |
localepath = "$(localedir):$(i18ndir)"
|
|
|
b40826 |
|
|
|
b40826 |
-locale-CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
|
|
|
b40826 |
- -DLOCALEDIR='"$(localedir)"' \
|
|
|
b40826 |
- -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
|
|
|
b40826 |
- -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
|
|
|
b40826 |
- -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
|
|
|
b40826 |
- -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
|
|
|
b40826 |
- -Iprograms
|
|
|
b40826 |
+# -Iprograms doesn't really belong here, but this gets it at the head
|
|
|
b40826 |
+# of the list instead of the tail, where CPPFLAGS-$(lib) gets added.
|
|
|
b40826 |
+# We need it before the standard -I's to see programs/config.h first.
|
|
|
b40826 |
+locale-CPPFLAGS = -DLOCALEDIR='"$(localedir)"' \
|
|
|
b40826 |
+ -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
|
|
|
b40826 |
+ -Iprograms
|
|
|
b40826 |
+
|
|
|
b40826 |
+CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \
|
|
|
b40826 |
+ -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
|
|
|
b40826 |
+ -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
|
|
|
b40826 |
+ -DLOCSRCDIR='"$(i18ndir)/locales"' \
|
|
|
b40826 |
+ -DHAVE_CONFIG_H -DNOT_IN_libc
|
|
|
b40826 |
|
|
|
b40826 |
CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
|
|
|
b40826 |
CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
|
|
|
b40826 |
CFLAGS-charmap-dir.c = -Wno-write-strings
|
|
|
b40826 |
|
|
|
b40826 |
-# This makes sure -DNOT_IN_libc is passed for all these modules.
|
|
|
b40826 |
+# This makes sure -DNOT_IN_libc et al are passed for all these modules.
|
|
|
b40826 |
cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
|
|
|
b40826 |
$(locale-modules) $(lib-modules))
|
|
|
b40826 |
-lib := nonlib
|
|
|
b40826 |
+lib := locale-programs
|
|
|
b40826 |
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
|
|
|
b40826 |
|
|
|
b40826 |
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|