This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.14-162-gf9ddf08


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  f9ddf089f124279836930692b9cd7bc807e60088 (commit)
      from  07df30d99565f1b4dd6d9abf4a1c169bbd9aa3be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f9ddf089f124279836930692b9cd7bc807e60088

commit f9ddf089f124279836930692b9cd7bc807e60088
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sat Aug 13 12:21:10 2011 -0400

    Fix compile problem
    
    l10nflist compiles for localedef now.  Optimize a bit.

diff --git a/ChangeLog b/ChangeLog
index a5ad9e3..c4abdcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-13  Ulrich Drepper  <drepper@gmail.com>
+
+	* intl/l10nflist.c (_nl_normalize_codeset): Make it compile outside
+	of libc.  Make tolower call locale-independent.  Optimize a bit by
+	using isdigit instead of isalnum.
+	* locale/Makefile (locale-CPPFLAGS): Add -DNOT_IN_libc.
+
 2011-08-12  Ulrich Drepper  <drepper@gmail.com>
 
 	* elf/dl-load.c (_dl_map_object): Show in debug output whether a DSO
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
index 82af263..df91f3d 100644
--- a/intl/l10nflist.c
+++ b/intl/l10nflist.c
@@ -334,13 +334,18 @@ _nl_normalize_codeset (codeset, name_len)
   char *retval;
   char *wp;
   size_t cnt;
+#ifdef NOT_IN_libc
+  locale_t locale = newlocale (0, "C", NULL);
+#else
+# define locale _nl_C_locobj_ptr
+#endif
 
   for (cnt = 0; cnt < name_len; ++cnt)
-    if (__isalnum_l ((unsigned char) codeset[cnt], _nl_C_locobj_ptr))
+    if (__isalnum_l ((unsigned char) codeset[cnt], locale))
       {
 	++len;
 
-	if (__isalpha_l ((unsigned char) codeset[cnt], _nl_C_locobj_ptr))
+	if (! __isdigit_l ((unsigned char) codeset[cnt], locale))
 	  only_digit = 0;
       }
 
@@ -348,15 +353,14 @@ _nl_normalize_codeset (codeset, name_len)
 
   if (retval != NULL)
     {
+      wp = retval;
       if (only_digit)
-	wp = stpcpy (retval, "iso");
-      else
-	wp = retval;
+	wp = stpcpy (wp, "iso");
 
       for (cnt = 0; cnt < name_len; ++cnt)
-	if (__isalpha_l ((unsigned char) codeset[cnt], _nl_C_locobj_ptr))
-	  *wp++ = tolower ((unsigned char) codeset[cnt]);
-	else if (__isdigit_l ((unsigned char) codeset[cnt], _nl_C_locobj_ptr))
+	if (__isalpha_l ((unsigned char) codeset[cnt], locale))
+	  *wp++ = __tolower_l ((unsigned char) codeset[cnt], locale);
+	else if (__isdigit_l ((unsigned char) codeset[cnt], locale))
 	  *wp++ = codeset[cnt];
 
       *wp = '\0';
diff --git a/locale/Makefile b/locale/Makefile
index 2dbd8dc..87c29a5 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -1,4 +1,5 @@
-# Copyright (C) 1991,1992,1995-2003,2005,2009 Free Software Foundation, Inc.
+# Copyright (C) 1991,1992,1995-2003,2005,2009,2011
+# Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -96,7 +97,7 @@ locale-CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
 		   -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
 		   -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
 		   -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
-		   -Iprograms
+		   -Iprograms -DNOT_IN_libc
 
 CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
 CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    7 +++++++
 intl/l10nflist.c |   20 ++++++++++++--------
 locale/Makefile  |    5 +++--
 3 files changed, 22 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]