[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r24085 - in /fsf/trunk/libc: ./ csu/ elf/ locale/ localedata/ localedata/locales/ manual/ ports/ ports/sysdeps/ia64/ ports/s...



Author: eglibc
Date: Tue Sep 24 00:02:14 2013
New Revision: 24085

Log:
Import glibc-mainline for 2013-09-24

Added:
    fsf/trunk/libc/elf/tst-ptrguard1-static.c
    fsf/trunk/libc/elf/tst-ptrguard1.c
    fsf/trunk/libc/localedata/locales/lzh_TW
    fsf/trunk/libc/localedata/locales/nan_TW
    fsf/trunk/libc/string/tst-strcoll-overflow.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/csu/libc-start.c
    fsf/trunk/libc/elf/Makefile
    fsf/trunk/libc/locale/hashval.h
    fsf/trunk/libc/localedata/ChangeLog
    fsf/trunk/libc/localedata/SUPPORTED
    fsf/trunk/libc/localedata/locales/as_IN
    fsf/trunk/libc/localedata/locales/ast_ES
    fsf/trunk/libc/localedata/locales/ayc_PE
    fsf/trunk/libc/localedata/locales/az_AZ
    fsf/trunk/libc/localedata/locales/be_BY
    fsf/trunk/libc/localedata/locales/bem_ZM
    fsf/trunk/libc/localedata/locales/bg_BG
    fsf/trunk/libc/localedata/locales/bho_IN
    fsf/trunk/libc/localedata/locales/bn_BD
    fsf/trunk/libc/localedata/locales/bn_IN
    fsf/trunk/libc/localedata/locales/bo_CN
    fsf/trunk/libc/localedata/locales/bo_IN
    fsf/trunk/libc/localedata/locales/br_FR
    fsf/trunk/libc/localedata/locales/brx_IN
    fsf/trunk/libc/localedata/locales/bs_BA
    fsf/trunk/libc/localedata/locales/ca_AD
    fsf/trunk/libc/localedata/locales/ca_ES
    fsf/trunk/libc/localedata/locales/ca_FR
    fsf/trunk/libc/localedata/locales/ca_IT
    fsf/trunk/libc/localedata/locales/crh_UA
    fsf/trunk/libc/localedata/locales/csb_PL
    fsf/trunk/libc/localedata/locales/cv_RU
    fsf/trunk/libc/localedata/locales/da_DK
    fsf/trunk/libc/localedata/locales/de_AT
    fsf/trunk/libc/localedata/locales/de_BE
    fsf/trunk/libc/localedata/locales/de_CH
    fsf/trunk/libc/localedata/locales/de_DE
    fsf/trunk/libc/localedata/locales/de_LU
    fsf/trunk/libc/localedata/locales/doi_IN
    fsf/trunk/libc/localedata/locales/dv_MV
    fsf/trunk/libc/localedata/locales/dz_BT
    fsf/trunk/libc/localedata/locales/el_CY
    fsf/trunk/libc/localedata/locales/el_GR
    fsf/trunk/libc/localedata/locales/en_AG
    fsf/trunk/libc/localedata/locales/en_AU
    fsf/trunk/libc/localedata/locales/en_BW
    fsf/trunk/libc/localedata/locales/en_CA
    fsf/trunk/libc/localedata/locales/en_DK
    fsf/trunk/libc/localedata/locales/en_GB
    fsf/trunk/libc/localedata/locales/en_HK
    fsf/trunk/libc/localedata/locales/en_IE
    fsf/trunk/libc/localedata/locales/en_IN
    fsf/trunk/libc/localedata/locales/en_NG
    fsf/trunk/libc/localedata/locales/en_NZ
    fsf/trunk/libc/localedata/locales/en_PH
    fsf/trunk/libc/localedata/locales/en_SG
    fsf/trunk/libc/localedata/locales/en_US
    fsf/trunk/libc/localedata/locales/en_ZA
    fsf/trunk/libc/localedata/locales/en_ZM
    fsf/trunk/libc/localedata/locales/en_ZW
    fsf/trunk/libc/localedata/locales/es_AR
    fsf/trunk/libc/localedata/locales/es_BO
    fsf/trunk/libc/localedata/locales/es_CL
    fsf/trunk/libc/localedata/locales/es_CO
    fsf/trunk/libc/localedata/locales/es_CR
    fsf/trunk/libc/localedata/locales/es_CU
    fsf/trunk/libc/localedata/locales/es_DO
    fsf/trunk/libc/localedata/locales/es_EC
    fsf/trunk/libc/localedata/locales/es_ES
    fsf/trunk/libc/localedata/locales/es_GT
    fsf/trunk/libc/localedata/locales/es_HN
    fsf/trunk/libc/localedata/locales/es_MX
    fsf/trunk/libc/localedata/locales/es_NI
    fsf/trunk/libc/localedata/locales/es_PA
    fsf/trunk/libc/localedata/locales/es_PE
    fsf/trunk/libc/localedata/locales/es_PR
    fsf/trunk/libc/localedata/locales/es_PY
    fsf/trunk/libc/localedata/locales/es_SV
    fsf/trunk/libc/localedata/locales/es_US
    fsf/trunk/libc/localedata/locales/es_UY
    fsf/trunk/libc/localedata/locales/es_VE
    fsf/trunk/libc/localedata/locales/eu_ES
    fsf/trunk/libc/manual/threads.texi
    fsf/trunk/libc/ports/ChangeLog.ia64
    fsf/trunk/libc/ports/ChangeLog.mips
    fsf/trunk/libc/ports/ChangeLog.tile
    fsf/trunk/libc/ports/sysdeps/ia64/stackguard-macros.h
    fsf/trunk/libc/ports/sysdeps/mips/bits/atomic.h
    fsf/trunk/libc/ports/sysdeps/mips/fpu/fegetround.c
    fsf/trunk/libc/ports/sysdeps/mips/fpu/fesetround.c
    fsf/trunk/libc/ports/sysdeps/mips/fpu_control.h
    fsf/trunk/libc/ports/sysdeps/mips/math_private.h
    fsf/trunk/libc/ports/sysdeps/tile/stackguard-macros.h
    fsf/trunk/libc/string/Makefile
    fsf/trunk/libc/string/strcoll_l.c
    fsf/trunk/libc/sysdeps/generic/stackguard-macros.h
    fsf/trunk/libc/sysdeps/i386/stackguard-macros.h
    fsf/trunk/libc/sysdeps/powerpc/powerpc32/stackguard-macros.h
    fsf/trunk/libc/sysdeps/powerpc/powerpc64/stackguard-macros.h
    fsf/trunk/libc/sysdeps/s390/s390-32/stackguard-macros.h
    fsf/trunk/libc/sysdeps/s390/s390-64/stackguard-macros.h
    fsf/trunk/libc/sysdeps/sparc/sparc32/stackguard-macros.h
    fsf/trunk/libc/sysdeps/sparc/sparc64/stackguard-macros.h
    fsf/trunk/libc/sysdeps/x86_64/stackguard-macros.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Sep 24 00:02:14 2013
@@ -1,3 +1,63 @@
+2013-09-23  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* locale/hashval.h (compute_hashval): Interpret bytes of key as
+	unsigned char.
+
+2013-09-23  Maciej W. Rozycki  <macro@xxxxxxxxxxxxxxxx>
+
+	* manual/threads.texi (POSIX Threads): Fix a typo.
+
+2013-09-23  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #14547]
+	* string/tst-strcoll-overflow.c: New test case.
+	* string/Makefile (xtests): Add tst-strcoll-overflow.
+	* string/strcoll_l.c (STRCOLL): Skip allocating memory for
+	cache if string sizes may cause integer overflow.
+
+	[BZ #14547]
+	* string/strcoll_l.c (coll_seq): New members rule, idx,
+	save_idx and back_us.
+	(get_next_seq_nocache): New function.
+	(do_compare_nocache): New function.
+	(STRCOLL): Use get_next_seq_nocache and do_compare_nocache
+	when malloc fails.
+
+2013-09-23  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	[BZ #15754]
+	* sysdeps/generic/stackguard-macros.h: If PTRGUARD_LOCAL use
+	__pointer_chk_guard_local, otherwise __pointer_chk_guard.
+	* elf/Makefile: Define CFLAGS-tst-ptrguard1-static.c.
+
+	[BZ #15754]
+	* elf/Makefile (tests): Add tst-ptrguard1.
+	(tests-static): Add tst-ptrguard1-static.
+	(tst-ptrguard1-ARGS): Define.
+	(tst-ptrguard1-static-ARGS): Define.
+	* elf/tst-ptrguard1.c: New file.
+	* elf/tst-ptrguard1-static.c: New file.
+	* sysdeps/x86_64/stackguard-macros.h: Define POINTER_CHK_GUARD.
+	* sysdeps/i386/stackguard-macros.h: Likewise.
+	* sysdeps/powerpc/powerpc32/stackguard-macros.h: Likewise.
+	* sysdeps/powerpc/powerpc64/stackguard-macros.h: Likewise.
+	* sysdeps/s390/s390-32/stackguard-macros.h: Likewise.
+	* sysdeps/s390/s390-64/stackguard-macros.h: Likewise.
+	* sysdeps/sparc/sparc32/stackguard-macros.h: Likewise.
+	* sysdeps/sparc/sparc64/stackguard-macros.h: Likewise.
+
+2013-09-23  Hector Marco  <hecmargi@xxxxxx>
+	    Ismael Ripoll  <iripoll@xxxxxxxxxxxx>
+	    Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	[BZ #15754]
+	* sysdeps/generic/stackguard-macros.h: Define
+	__pointer_chk_guard_local and POINTER_CHK_GUARD.
+	* csu/libc-start.c [!SHARED && !THREAD_SET_POINTER_GUARD]:
+	Define __pointer_chk_guard_local.
+	(LIBC_START_MAIN) [!SHARED]: Call _dl_setup_pointer_guard.
+	Use THREAD_SET_POINTER_GUARD or set __pointer_chk_guard_local.
+
 2013-09-15  Vinitha Vijayan <vinitha.vijayann@xxxxxxxxx>
 
 	[BZ #15859]

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Tue Sep 24 00:02:14 2013
@@ -9,10 +9,28 @@
 
 * The following bugs are resolved with this release:
 
-  13985, 14155, 14699, 15427, 15522, 15531, 15532, 15640, 15736, 15748,
-  15749, 15797, 15844, 15849, 15855, 15856, 15857, 15859, 15867, 15886,
-  15887, 15890, 15892, 15893, 15895, 15897, 15905, 15909, 15919, 15921,
-  15923, 15939, 15963, 15966.
+  13985, 14155, 14547, 14699, 15427, 15522, 15531, 15532, 15608, 15640,
+  15681, 15736, 15748, 15749, 15754, 15797, 15844, 15849, 15855, 15856,
+  15857, 15859, 15867, 15886, 15887, 15890, 15892, 15893, 15895, 15897,
+  15905, 15909, 15919, 15921, 15923, 15939, 15963, 15966.
+
+* CVE-2012-4412 The strcoll implementation caches indices and rules for
+  large collation sequences to optimize multiple passes.  This cache
+  computation may overflow for large collation sequences and may cause a
+  stack or buffer overflow.  This is now fixed to use a slower algorithm
+  which does not use a cache if there is an integer overflow.
+
+* CVE-2012-4424 The strcoll implementation uses malloc to cache indices and
+  rules for large collation sequences to optimize multiple passes and falls
+  back to alloca if malloc fails, resulting in a possible stack overflow.
+  The implementation now falls back to an uncached collation sequence lookup
+  if malloc fails.
+
+* CVE-2013-4788 The pointer guard used for pointer mangling was not
+  initialized for static applications resulting in the security feature
+  being disabled. The pointer guard is now correctly initialized to a
+  random value for static applications. Existing static applications need
+  to be recompiled to take advantage of the fix (bug 15754).
 
 * CVE-2013-4237 The readdir_r function could write more than NAME_MAX bytes
   to the d_name member of struct dirent, or omit the terminating NUL
@@ -23,7 +41,7 @@
   heap when passed very large allocation size values (Bugzilla #15855,
   #15856, #15857).
 
-* New locales: quz_PE, ak_GH.
+* New locales: ak_GH, lzh_TW, nan_TW, quz_PE.
 
 * The LC_ADDRESS field was updated to support country_car for almost all
   supported locales.

Modified: fsf/trunk/libc/csu/libc-start.c
==============================================================================
--- fsf/trunk/libc/csu/libc-start.c (original)
+++ fsf/trunk/libc/csu/libc-start.c Tue Sep 24 00:02:14 2013
@@ -36,6 +36,12 @@
 /* Only exported for architectures that don't store the stack guard canary
    in thread local area.  */
 uintptr_t __stack_chk_guard attribute_relro;
+# endif
+# ifndef  THREAD_SET_POINTER_GUARD
+/* Only exported for architectures that don't store the pointer guard
+   value in thread local area.  */
+uintptr_t __pointer_chk_guard_local
+	attribute_relro attribute_hidden __attribute__ ((nocommon));
 # endif
 #endif
 
@@ -195,6 +201,16 @@
 # else
   __stack_chk_guard = stack_chk_guard;
 # endif
+
+  /* Set up the pointer guard value.  */
+  uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random,
+							 stack_chk_guard);
+# ifdef THREAD_SET_POINTER_GUARD
+  THREAD_SET_POINTER_GUARD (pointer_chk_guard);
+# else
+  __pointer_chk_guard_local = pointer_chk_guard;
+# endif
+
 #endif
 
   /* Register the destructor of the dynamic linker if there is any.  */

Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Tue Sep 24 00:02:14 2013
@@ -121,7 +121,8 @@
 tests = tst-tls1 tst-tls2 tst-tls9 tst-leaks1 \
 	tst-array1 tst-array2 tst-array3 tst-array4 tst-array5
 tests-static = tst-tls1-static tst-tls2-static tst-stackguard1-static \
-	       tst-leaks1-static tst-array1-static tst-array5-static
+	       tst-leaks1-static tst-array1-static tst-array5-static \
+	       tst-ptrguard1-static
 ifeq (yes,$(build-shared))
 tests-static += tst-tls9-static
 tst-tls9-static-ENV = \
@@ -145,7 +146,8 @@
 	 tst-audit1 tst-audit2 tst-audit8 \
 	 tst-stackguard1 tst-addr1 tst-thrlock \
 	 tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
-	 tst-initorder tst-initorder2 tst-relsort1 tst-null-argv
+	 tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \
+	 tst-ptrguard1
 #	 reldep9
 test-srcs = tst-pathopt
 selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
@@ -1016,6 +1018,12 @@
 tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child"
 tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
 
+tst-ptrguard1-ARGS = --command "$(host-test-program-cmd) --child"
+# When built statically, the pointer guard interface uses
+# __pointer_chk_guard_local.
+CFLAGS-tst-ptrguard1-static.c = -DPTRGUARD_LOCAL
+tst-ptrguard1-static-ARGS = --command "$(objpfx)tst-ptrguard1-static --child"
+
 $(objpfx)tst-leaks1: $(libdl)
 $(objpfx)tst-leaks1-mem: $(objpfx)tst-leaks1.out
 	$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@

Added: fsf/trunk/libc/elf/tst-ptrguard1-static.c
==============================================================================
--- fsf/trunk/libc/elf/tst-ptrguard1-static.c (added)
+++ fsf/trunk/libc/elf/tst-ptrguard1-static.c Tue Sep 24 00:02:14 2013
@@ -1,0 +1,1 @@
+#include "tst-ptrguard1.c"

Added: fsf/trunk/libc/elf/tst-ptrguard1.c
==============================================================================
--- fsf/trunk/libc/elf/tst-ptrguard1.c (added)
+++ fsf/trunk/libc/elf/tst-ptrguard1.c Tue Sep 24 00:02:14 2013
@@ -1,0 +1,202 @@
+/* Copyright (C) 2013 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <stackguard-macros.h>
+#include <tls.h>
+#include <unistd.h>
+
+#ifndef POINTER_CHK_GUARD
+extern uintptr_t __pointer_chk_guard;
+# define POINTER_CHK_GUARD __pointer_chk_guard
+#endif
+
+static const char *command;
+static bool child;
+static uintptr_t ptr_chk_guard_copy;
+static bool ptr_chk_guard_copy_set;
+static int fds[2];
+
+static void __attribute__ ((constructor))
+con (void)
+{
+  ptr_chk_guard_copy = POINTER_CHK_GUARD;
+  ptr_chk_guard_copy_set = true;
+}
+
+static int
+uintptr_t_cmp (const void *a, const void *b)
+{
+  if (*(uintptr_t *) a < *(uintptr_t *) b)
+    return 1;
+  if (*(uintptr_t *) a > *(uintptr_t *) b)
+    return -1;
+  return 0;
+}
+
+static int
+do_test (void)
+{
+  if (!ptr_chk_guard_copy_set)
+    {
+      puts ("constructor has not been run");
+      return 1;
+    }
+
+  if (ptr_chk_guard_copy != POINTER_CHK_GUARD)
+    {
+      puts ("POINTER_CHK_GUARD changed between constructor and do_test");
+      return 1;
+    }
+
+  if (child)
+    {
+      write (2, &ptr_chk_guard_copy, sizeof (ptr_chk_guard_copy));
+      return 0;
+    }
+
+  if (command == NULL)
+    {
+      puts ("missing --command or --child argument");
+      return 1;
+    }
+
+#define N 16
+  uintptr_t child_ptr_chk_guards[N + 1];
+  child_ptr_chk_guards[N] = ptr_chk_guard_copy;
+  int i;
+  for (i = 0; i < N; ++i)
+    {
+      if (pipe (fds) < 0)
+	{
+	  printf ("couldn't create pipe: %m\n");
+	  return 1;
+	}
+
+      pid_t pid = fork ();
+      if (pid < 0)
+	{
+	  printf ("fork failed: %m\n");
+	  return 1;
+	}
+
+      if (!pid)
+	{
+	  if (ptr_chk_guard_copy != POINTER_CHK_GUARD)
+	    {
+	      puts ("POINTER_CHK_GUARD changed after fork");
+	      exit (1);
+	    }
+
+	  close (fds[0]);
+	  close (2);
+	  dup2 (fds[1], 2);
+	  close (fds[1]);
+
+	  system (command);
+	  exit (0);
+	}
+
+      close (fds[1]);
+
+      if (TEMP_FAILURE_RETRY (read (fds[0], &child_ptr_chk_guards[i],
+				    sizeof (uintptr_t))) != sizeof (uintptr_t))
+	{
+	  puts ("could not read ptr_chk_guard value from child");
+	  return 1;
+	}
+
+      close (fds[0]);
+
+      pid_t termpid;
+      int status;
+      termpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0));
+      if (termpid == -1)
+	{
+	  printf ("waitpid failed: %m\n");
+	  return 1;
+	}
+      else if (termpid != pid)
+	{
+	  printf ("waitpid returned %ld != %ld\n",
+		  (long int) termpid, (long int) pid);
+	  return 1;
+	}
+      else if (!WIFEXITED (status) || WEXITSTATUS (status))
+	{
+	  puts ("child hasn't exited with exit status 0");
+	  return 1;
+	}
+    }
+
+  qsort (child_ptr_chk_guards, N + 1, sizeof (uintptr_t), uintptr_t_cmp);
+
+  /* The default pointer guard is the same as the default stack guard.
+     They are only set to default if dl_random is NULL.  */
+  uintptr_t default_guard = 0;
+  unsigned char *p = (unsigned char *) &default_guard;
+  p[sizeof (uintptr_t) - 1] = 255;
+  p[sizeof (uintptr_t) - 2] = '\n';
+  p[0] = 0;
+
+  /* Test if the pointer guard canaries are either randomized,
+     or equal to the default pointer guard value.
+     Even with randomized pointer guards it might happen
+     that the random number generator generates the same
+     values, but if that happens in more than half from
+     the 16 runs, something is very wrong.  */
+  int ndifferences = 0;
+  int ndefaults = 0;
+  for (i = 0; i < N; ++i)
+    {
+      if (child_ptr_chk_guards[i] != child_ptr_chk_guards[i+1])
+	ndifferences++;
+      else if (child_ptr_chk_guards[i] == default_guard)
+	ndefaults++;
+    }
+
+  printf ("differences %d defaults %d\n", ndifferences, ndefaults);
+
+  if (ndifferences < N / 2 && ndefaults < N / 2)
+    {
+      puts ("pointer guard values are not randomized enough");
+      puts ("nor equal to the default value");
+      return 1;
+    }
+
+  return 0;
+}
+
+#define OPT_COMMAND	10000
+#define OPT_CHILD	10001
+#define CMDLINE_OPTIONS	\
+  { "command", required_argument, NULL, OPT_COMMAND },  \
+  { "child", no_argument, NULL, OPT_CHILD },
+#define CMDLINE_PROCESS	\
+  case OPT_COMMAND:	\
+    command = optarg;	\
+    break;		\
+  case OPT_CHILD:	\
+    child = true;	\
+    break;
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

Modified: fsf/trunk/libc/locale/hashval.h
==============================================================================
--- fsf/trunk/libc/locale/hashval.h (original)
+++ fsf/trunk/libc/locale/hashval.h Tue Sep 24 00:02:14 2013
@@ -37,7 +37,7 @@
   while (cnt < keylen)
     {
       hval = (hval << 9) | (hval >> (sizeof hval * CHAR_BIT - 9));
-      hval += (hashval_t) *(((char *) key) + cnt++);
+      hval += (hashval_t) ((const unsigned char *) key)[cnt++];
     }
   return hval != 0 ? hval : ~((hashval_t) 0);
 }

Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Tue Sep 24 00:02:14 2013
@@ -1,3 +1,90 @@
+2013-09-21  Wei-Lun Chao <bluebat@xxxxxxxxxxxxxx>
+
+    [BZ#15608]
+    * locales/nan_TW: New locale for lzh_TW.
+    * SUPPORTED: Add lzh_TW.
+
+2013-09-21  Wei-Lun Chao <bluebat@xxxxxxxxxxxxxx>
+
+    [BZ#15608]
+    * locales/nan_TW: New locale for nan_TW.
+    * SUPPORTED: Add nan_TW.
+
+2013-09-15  Chris Leonard  <cjl@xxxxxxxxxxxxx>
+
+	* locales/as_IN: Adjust language-code fields of LC_ADDRESS.
+	* locales/ast_ES: Likewise.
+	* locales/ayc_PE: Likewise.
+	* locales/az_AZ: Likewise.
+	* locales/be_BY: Likewise.
+	* locales/bem_ZM: Likewise.
+	* locales/bg_BG: Likewise.
+	* locales/bho_IN: Likewise.
+	* locales/bn_BD: Likewise.
+	* locales/bn_IN: Likewise.
+	* locales/bo_CN: Likewise.
+	* locales/bo_IN: Likewise.
+	* locales/br_FR: Likewise.
+	* locales/brx_IN: Likewise.
+	* locales/bs_BA: Likewise.
+	* locales/ca_AD: Likewise.
+	* locales/ca_ES: Likewise.
+	* locales/ca_FR: Likewise.
+	* locales/ca_IT: Likewise.
+	* locales/crh_UA: Likewise.
+	* locales/csb_PL: Likewise.
+	* locales/cv_RU: Likewise.
+	* locales/da_DK: Likewise.
+	* locales/de_AT: Likewise.
+	* locales/de_BE: Likewise.
+	* locales/de_CH: Likewise.
+	* locales/de_DE: Likewise.
+	* locales/de_LU: Likewise.
+	* locales/doi_IN: Likewise.
+	* locales/dv_MV: Likewise.
+	* locales/dz_BT: Likewise.
+	* locales/el_CY: Likewise.
+	* locales/el_GR: Likewise.
+	* locales/en_AG: Likewise.
+	* locales/en_AU: Likewise.
+	* locales/en_BW: Likewise.
+	* locales/en_CA: Likewise.
+	* locales/en_DK: Likewise.
+	* locales/en_GB: Likewise.
+	* locales/en_HK: Likewise.
+	* locales/en_IE: Likewise.
+	* locales/en_IN: Likewise.
+	* locales/en_NG: Likewise.
+	* locales/en_NZ: Likewise.
+	* locales/en_PH: Likewise.
+	* locales/en_SG: Likewise.
+	* locales/en_US: Likewise.
+	* locales/en_ZA: Likewise.
+	* locales/en_ZM: Likewise.
+	* locales/en_ZW: Likewise.
+	* locales/es_AR: Likewise.
+	* locales/es_BO: Likewise.
+	* locales/es_CL: Likewise.
+	* locales/es_CO: Likewise.
+	* locales/es_CR: Likewise.
+	* locales/es_CU: Likewise.
+	* locales/es_DO: Likewise.
+	* locales/es_EC: Likewise.
+	* locales/es_ES: Likewise.
+	* locales/es_GT: Likewise.
+	* locales/es_HN: Likewise.
+	* locales/es_MX: Likewise.
+	* locales/es_NI: Likewise.
+	* locales/es_PA: Likewise.
+	* locales/es_PE: Likewise.
+	* locales/es_PR: Likewise.
+	* locales/es_PY: Likewise.
+	* locales/es_SV: Likewise.
+	* locales/es_US: Likewise.
+	* locales/es_UY: Likewise.
+	* locales/es_VE: Likewise.
+	* locales/eu_ES: Likewise.
+
 2013-09-21  Chris Leonard  <cjl@xxxxxxxxxxxxx>
 
 	[BZ#15919]

Modified: fsf/trunk/libc/localedata/SUPPORTED
==============================================================================
--- fsf/trunk/libc/localedata/SUPPORTED (original)
+++ fsf/trunk/libc/localedata/SUPPORTED Tue Sep 24 00:02:14 2013
@@ -289,6 +289,7 @@
 lt_LT/ISO-8859-13 \
 lv_LV.UTF-8/UTF-8 \
 lv_LV/ISO-8859-13 \
+lzh_TW/UTF-8 \
 mag_IN/UTF-8 \
 mai_IN/UTF-8 \
 mg_MG.UTF-8/UTF-8 \
@@ -307,6 +308,7 @@
 mt_MT.UTF-8/UTF-8 \
 mt_MT/ISO-8859-3 \
 my_MM/UTF-8 \
+nan_TW/UTF-8 \
 nan_TW@latin/UTF-8 \
 nb_NO.UTF-8/UTF-8 \
 nb_NO/ISO-8859-1 \

Modified: fsf/trunk/libc/localedata/locales/as_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/as_IN (original)
+++ fsf/trunk/libc/localedata/locales/as_IN Tue Sep 24 00:02:14 2013
@@ -159,6 +159,12 @@
 <U0025><U0062><U0025><U0065><U0025><U0072>"
 % IND
 country_car  "<U0049><U004E><U0044>"
+% as
+lang_ab      "<U0061><U0073>"
+% asm
+lang_term    "<U0061><U0073><U006D>"
+% asm
+lang_lib    "<U0061><U0073><U006D>"
 END LC_ADDRESS
 
 %%%%%%%%%%%%%

Modified: fsf/trunk/libc/localedata/locales/ast_ES
==============================================================================
--- fsf/trunk/libc/localedata/locales/ast_ES (original)
+++ fsf/trunk/libc/localedata/locales/ast_ES Tue Sep 24 00:02:14 2013
@@ -140,4 +140,8 @@
 country_num   724
 % E
 country_car    "<U0045>"
+% ast
+lang_term    "<U0061><U0073><U0074>"
+% ast
+lang_lib    "<U0061><U0073><U0074>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/ayc_PE
==============================================================================
--- fsf/trunk/libc/localedata/locales/ayc_PE (original)
+++ fsf/trunk/libc/localedata/locales/ayc_PE Tue Sep 24 00:02:14 2013
@@ -202,6 +202,12 @@
 country_num   604
 % PE
 country_car    "<U0050><U0045>"
+% ay
+lang_ab    "<U0061><U0079>"
+% ayc
+lang_term    "<U0061><U0079><U0063>"
+% ayc
+lang_lib    "<U0061><U0079><U0063>"
 END LC_ADDRESS
 
 LC_TELEPHONE

Modified: fsf/trunk/libc/localedata/locales/az_AZ
==============================================================================
--- fsf/trunk/libc/localedata/locales/az_AZ (original)
+++ fsf/trunk/libc/localedata/locales/az_AZ Tue Sep 24 00:02:14 2013
@@ -294,7 +294,12 @@
 country_num 031
 % AZ
 country_car    "<U0041><U005A>"
-
+% az
+lang_ab      "<U0061><U007A>"
+% aze
+lang_term    "<U0061><U007A><U0065>"
+% aze
+lang_lib    "<U0061><U007A><U0065>"
 END LC_ADDRESS
 
 LC_TELEPHONE

Modified: fsf/trunk/libc/localedata/locales/be_BY
==============================================================================
--- fsf/trunk/libc/localedata/locales/be_BY (original)
+++ fsf/trunk/libc/localedata/locales/be_BY Tue Sep 24 00:02:14 2013
@@ -182,5 +182,10 @@
 country_num 112
 % BY
 country_car    "<U0042><U0059>"
-
+% be
+lang_ab      "<U0062><U0065>"
+% bel
+lang_term    "<U0062><U0065><U006C>"
+% bel
+lang_lib    "<U0062><U0065><U006C>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/bem_ZM
==============================================================================
--- fsf/trunk/libc/localedata/locales/bem_ZM (original)
+++ fsf/trunk/libc/localedata/locales/bem_ZM Tue Sep 24 00:02:14 2013
@@ -182,7 +182,10 @@
 % Z
 country_car  "<U005A>"
 lang_name     "<U0069><U0063><U0069><U0042><U0065><U006D><U0062><U0061>"
-lang_term     "<U0062><U0065><U006D>"
+% bem
+lang_term    "<U0062><U0065><U006D>"
+% bem
+lang_lib    "<U0062><U0065><U006D>"
 END LC_ADDRESS
 
 LC_TELEPHONE

Modified: fsf/trunk/libc/localedata/locales/bg_BG
==============================================================================
--- fsf/trunk/libc/localedata/locales/bg_BG (original)
+++ fsf/trunk/libc/localedata/locales/bg_BG Tue Sep 24 00:02:14 2013
@@ -269,6 +269,7 @@
 lang_name    "<U0042><U0075><U006C><U0067><U0061><U0072><U0069><U0061><U006E>"
 lang_ab      "<U0062><U0067>"
 lang_term    "<U0062><U0075><U006C>"
+lang_lib    "<U0062><U0075><U006C>"
 END LC_ADDRESS
 
 LC_TELEPHONE

Modified: fsf/trunk/libc/localedata/locales/bho_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/bho_IN (original)
+++ fsf/trunk/libc/localedata/locales/bho_IN Tue Sep 24 00:02:14 2013
@@ -157,6 +157,10 @@
 country_num 356
 % IND
 country_car    "<U0049><U004E><U0044>"
+% bho
+lang_term    "<U0062><U0068><U006F>"
+% bho
+lang_lib    "<U0062><U0068><U006F>"
 END LC_ADDRESS
 
 

Modified: fsf/trunk/libc/localedata/locales/bn_BD
==============================================================================
--- fsf/trunk/libc/localedata/locales/bn_BD (original)
+++ fsf/trunk/libc/localedata/locales/bn_BD Tue Sep 24 00:02:14 2013
@@ -180,7 +180,12 @@
 country_name    "<U09AC><U09BE><U0982><U09B2><U09BE><U09A6><U09C7><U09B6>"
 country_ab2     "<U0042><U0044>"
 country_ab3     "<U0042><U0047><U0044>"
-lang_ab         "<U0062><U006E>"
+% bn
+lang_ab      "<U0062><U006E>"
+% ben
+lang_term    "<U0062><U0065><U006E>"
+% ben
+lang_lib       "<U0062><U0065><U006E>"
 %lang_ab3_term   "ben"
 lang_name       "<U09ac><U09be><U0982><U09b2><U09be>"
 % todo

Modified: fsf/trunk/libc/localedata/locales/bn_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/bn_IN (original)
+++ fsf/trunk/libc/localedata/locales/bn_IN Tue Sep 24 00:02:14 2013
@@ -183,7 +183,12 @@
 country_num 356
 % IND
 country_car    "<U0049><U004E><U0044>"
-
+% bn
+lang_ab      "<U0062><U006E>"
+% ben
+lang_term    "<U0062><U0065><U006E>"
+% ben
+lang_lib       "<U0062><U0065><U006E>"
 END LC_ADDRESS
 
 

Modified: fsf/trunk/libc/localedata/locales/bo_CN
==============================================================================
--- fsf/trunk/libc/localedata/locales/bo_CN (original)
+++ fsf/trunk/libc/localedata/locales/bo_CN Tue Sep 24 00:02:14 2013
@@ -164,9 +164,11 @@
 country_num	156
 %country_car	"FIXME"
 country_isbn	"<U0037>"
-
 lang_name     "<U0F54><U0F7C><U0F51><U0F0B><U0F66><U0F90><U0F51><U0F0B>"
+% bo
 lang_ab       "<U0062><U006F>"
+% bod
 lang_term     "<U0062><U006F><U0064>"
+% tib
 lang_lib      "<U0074><U0069><U0062>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/bo_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/bo_IN (original)
+++ fsf/trunk/libc/localedata/locales/bo_IN Tue Sep 24 00:02:14 2013
@@ -90,7 +90,10 @@
 % IND
 country_car    "<U0049><U004E><U0044>"
 lang_name     "<U0F54><U0F7C><U0F51><U0F0B><U0F66><U0F90><U0F51><U0F0B>"
+% bo
 lang_ab       "<U0062><U006F>"
+% bod
 lang_term     "<U0062><U006F><U0064>"
+% tib
 lang_lib      "<U0074><U0069><U0062>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/br_FR
==============================================================================
--- fsf/trunk/libc/localedata/locales/br_FR (original)
+++ fsf/trunk/libc/localedata/locales/br_FR Tue Sep 24 00:02:14 2013
@@ -170,6 +170,12 @@
 country_num 250
 % F
 country_car    "<U0046>"
+% br
+lang_ab      "<U0062><U0072>"
+% bre
+lang_term    "<U0062><U0072><U0065>"
+% bre
+lang_lib    "<U0062><U0072><U0065>"
 END LC_ADDRESS
 
 LC_TELEPHONE

Modified: fsf/trunk/libc/localedata/locales/brx_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/brx_IN (original)
+++ fsf/trunk/libc/localedata/locales/brx_IN Tue Sep 24 00:02:14 2013
@@ -179,6 +179,10 @@
 country_num 356
 % IND
 country_car    "<U0049><U004E><U0044>"
+% brx
+lang_term    "<U0062><U0072><U0078>"
+% brx
+lang_lib    "<U0062><U0072><U0078>"
 END LC_ADDRESS
 
 

Modified: fsf/trunk/libc/localedata/locales/bs_BA
==============================================================================
--- fsf/trunk/libc/localedata/locales/bs_BA (original)
+++ fsf/trunk/libc/localedata/locales/bs_BA Tue Sep 24 00:02:14 2013
@@ -236,7 +236,12 @@
 country_num 070
 % BIH
 country_car    "<U0042><U0049><U0048>"
-
+% bs
+lang_ab      "<U0062><U0073>"
+% bos
+lang_term    "<U0062><U006F><U0073>"
+% bos
+lang_lib    "<U0062><U006F><U0073>"
 END LC_ADDRESS
 
 LC_TELEPHONE

Modified: fsf/trunk/libc/localedata/locales/ca_AD
==============================================================================
--- fsf/trunk/libc/localedata/locales/ca_AD (original)
+++ fsf/trunk/libc/localedata/locales/ca_AD Tue Sep 24 00:02:14 2013
@@ -93,4 +93,10 @@
 country_num 20
 % AND
 country_car  "<U0041><U004E><U0044>"
+% ca
+lang_ab      "<U0063><U0061>"
+% cat
+lang_term    "<U0063><U0061><U0074>"
+% cat
+lang_lib    "<U0063><U0061><U0074>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/ca_ES
==============================================================================
--- fsf/trunk/libc/localedata/locales/ca_ES (original)
+++ fsf/trunk/libc/localedata/locales/ca_ES Tue Sep 24 00:02:14 2013
@@ -176,5 +176,10 @@
 country_num 724
 % E
 country_car    "<U0045>"
-
+% ca
+lang_ab      "<U0063><U0061>"
+% cat
+lang_term    "<U0063><U0061><U0074>"
+% cat
+lang_lib    "<U0063><U0061><U0074>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/ca_FR
==============================================================================
--- fsf/trunk/libc/localedata/locales/ca_FR (original)
+++ fsf/trunk/libc/localedata/locales/ca_FR Tue Sep 24 00:02:14 2013
@@ -91,4 +91,10 @@
 country_num 250
 % F
 country_car    "<U0046>"
+% ca
+lang_ab      "<U0063><U0061>"
+% cat
+lang_term    "<U0063><U0061><U0074>"
+% cat
+lang_lib    "<U0063><U0061><U0074>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/ca_IT
==============================================================================
--- fsf/trunk/libc/localedata/locales/ca_IT (original)
+++ fsf/trunk/libc/localedata/locales/ca_IT Tue Sep 24 00:02:14 2013
@@ -91,4 +91,10 @@
 country_num 380
 % I
 country_car    "<U0049>"
+% ca
+lang_ab      "<U0063><U0061>"
+% cat
+lang_term    "<U0063><U0061><U0074>"
+% cat
+lang_lib    "<U0063><U0061><U0074>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/crh_UA
==============================================================================
--- fsf/trunk/libc/localedata/locales/crh_UA (original)
+++ fsf/trunk/libc/localedata/locales/crh_UA Tue Sep 24 00:02:14 2013
@@ -227,6 +227,10 @@
 country_num 804
 % UA
 country_car  "<U0055><U0041>"
+% crh
+lang_term    "<U0063><U0072><U0068>"
+% crh
+lang_lib    "<U0063><U0072><U0068>"
 END LC_ADDRESS
 
 LC_TELEPHONE

Modified: fsf/trunk/libc/localedata/locales/csb_PL
==============================================================================
--- fsf/trunk/libc/localedata/locales/csb_PL (original)
+++ fsf/trunk/libc/localedata/locales/csb_PL Tue Sep 24 00:02:14 2013
@@ -216,4 +216,8 @@
 country_num 616
 % PL
 country_car    "<U0050><U004C>"
+% csb
+lang_term    "<U0063><U0073><U0062>"
+% csb
+lang_lib    "<U0063><U0073><U0062>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/cv_RU
==============================================================================
--- fsf/trunk/libc/localedata/locales/cv_RU (original)
+++ fsf/trunk/libc/localedata/locales/cv_RU Tue Sep 24 00:02:14 2013
@@ -244,4 +244,10 @@
 country_num 643
 % RUS
 country_car    "<U0052><U0055><U0053>"
+% cv
+lang_ab      "<U0063><U0076>"
+% chv
+lang_term    "<U0063><U0068><U0076>"
+% chv
+lang_lib     "<U0063><U0068><U0076>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/da_DK
==============================================================================
--- fsf/trunk/libc/localedata/locales/da_DK (original)
+++ fsf/trunk/libc/localedata/locales/da_DK Tue Sep 24 00:02:14 2013
@@ -254,5 +254,10 @@
 country_num 208
 % DK
 country_car    "<U0044><U004B>"
-
+% da
+lang_ab      "<U0064><U0061>"
+% dan
+lang_term    "<U0064><U0061><U006E>"
+% dan
+lang_lib    "<U0064><U0061><U006E>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/de_AT
==============================================================================
--- fsf/trunk/libc/localedata/locales/de_AT (original)
+++ fsf/trunk/libc/localedata/locales/de_AT Tue Sep 24 00:02:14 2013
@@ -157,5 +157,10 @@
 country_num 040
 % A
 country_car    "<U0041>"
-
+% de
+lang_ab       "<U0064><U0065>"
+% deu
+lang_term     "<U0064><U0065><U0075>"
+% ger
+lang_lib      "<U0067><U0065><U0072>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/de_BE
==============================================================================
--- fsf/trunk/libc/localedata/locales/de_BE (original)
+++ fsf/trunk/libc/localedata/locales/de_BE Tue Sep 24 00:02:14 2013
@@ -151,5 +151,10 @@
 country_num 056
 % B
 country_car    "<U0042>"
-
+% de
+lang_ab       "<U0064><U0065>"
+% deu
+lang_term     "<U0064><U0065><U0075>"
+% ger
+lang_lib      "<U0067><U0065><U0072>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/de_CH
==============================================================================
--- fsf/trunk/libc/localedata/locales/de_CH (original)
+++ fsf/trunk/libc/localedata/locales/de_CH Tue Sep 24 00:02:14 2013
@@ -160,5 +160,10 @@
 country_num 756
 % CH
 country_car    "<U0043><U0048>"
-
+% de
+lang_ab       "<U0064><U0065>"
+% deu
+lang_term     "<U0064><U0065><U0075>"
+% ger
+lang_lib      "<U0067><U0065><U0072>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/de_DE
==============================================================================
--- fsf/trunk/libc/localedata/locales/de_DE (original)
+++ fsf/trunk/libc/localedata/locales/de_DE Tue Sep 24 00:02:14 2013
@@ -195,8 +195,11 @@
 country_car   "<U0044>"
 country_isbn  3
 lang_name     "<U0044><U0065><U0075><U0074><U0073><U0063><U0068>"
+% de
 lang_ab       "<U0064><U0065>"
+% deu
 lang_term     "<U0064><U0065><U0075>"
+% ger
 lang_lib      "<U0067><U0065><U0072>"
 END LC_ADDRESS
 

Modified: fsf/trunk/libc/localedata/locales/de_LU
==============================================================================
--- fsf/trunk/libc/localedata/locales/de_LU (original)
+++ fsf/trunk/libc/localedata/locales/de_LU Tue Sep 24 00:02:14 2013
@@ -157,5 +157,10 @@
 country_num 442
 % L
 country_car    "<U004C>"
-
+% de
+lang_ab       "<U0064><U0065>"
+% deu
+lang_term     "<U0064><U0065><U0075>"
+% ger
+lang_lib      "<U0067><U0065><U0072>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/doi_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/doi_IN (original)
+++ fsf/trunk/libc/localedata/locales/doi_IN Tue Sep 24 00:02:14 2013
@@ -170,6 +170,10 @@
 country_num 356
 % IND
 country_car    "<U0049><U004E><U0044>"
+% doi
+lang_term    "<U0064><U006F><U0069>"
+% doi
+lang_lib    "<U0064><U006F><U0069>"
 END LC_ADDRESS
 
 

Modified: fsf/trunk/libc/localedata/locales/dv_MV
==============================================================================
--- fsf/trunk/libc/localedata/locales/dv_MV (original)
+++ fsf/trunk/libc/localedata/locales/dv_MV Tue Sep 24 00:02:14 2013
@@ -177,4 +177,10 @@
 <U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
 <U004E><U0025><U0025><U007A><U0020><U0025><U0054><U0025>/
 <U004E><U0025><U0063><U0025><U004E>"
+% dv
+lang_ab      "<U0064><U0076>"
+% div
+lang_term    "<U0064><U0069><U0076>"
+% div
+lang_lib    "<U0064><U0069><U0076>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/dz_BT
==============================================================================
--- fsf/trunk/libc/localedata/locales/dz_BT (original)
+++ fsf/trunk/libc/localedata/locales/dz_BT Tue Sep 24 00:02:14 2013
@@ -660,8 +660,12 @@
 %country_num   "<U0042><U0048><U0055>"
 %FIXME
 %country_isbn  ""
-lang_name     "<U0E44><U0E17><U0E22>"
-lang_ab       "<U0074><U0068>"
-lang_term     "<U0074><U0068><U0061>"
-lang_lib      "<U0074><U0068><U0061>"
+% ÃÂÂÃÂÂÃÂÂÃÂÂÃÂÂÃÂÂ
+lang_name    "<U0028><U0F62><U0FAB><U0F7C><U0F44><U0F0B><U0F41>"
+% dz
+lang_ab      "<U0064><U007A>"
+% dzo
+lang_term    "<U0064><U007A><U006F>"
+% dzo
+lang_lib     "<U0064><U007A><U006F>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/el_CY
==============================================================================
--- fsf/trunk/libc/localedata/locales/el_CY (original)
+++ fsf/trunk/libc/localedata/locales/el_CY Tue Sep 24 00:02:14 2013
@@ -103,4 +103,10 @@
 country_num 196
 % CY
 country_car  "<U0043><U0059>"
+% el
+lang_ab      "<U0065><U006C>"
+% ell
+lang_term    "<U0065><U006C><U006C>"
+% gre
+lang_lib    "<U0067><U0072><U0065>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/el_GR
==============================================================================
--- fsf/trunk/libc/localedata/locales/el_GR (original)
+++ fsf/trunk/libc/localedata/locales/el_GR Tue Sep 24 00:02:14 2013
@@ -178,5 +178,10 @@
 country_num 300
 % GR
 country_car    "<U0047><U0052>"
-
+% el
+lang_ab      "<U0065><U006C>"
+% ell
+lang_term    "<U0065><U006C><U006C>"
+% gre
+lang_lib    "<U0067><U0072><U0065>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/en_AG
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_AG (original)
+++ fsf/trunk/libc/localedata/locales/en_AG Tue Sep 24 00:02:14 2013
@@ -85,6 +85,12 @@
 country_ab2   "<U0041><U0047>"
 country_ab3   "<U0041><U0054><U0047>"
 country_num   28
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS
 
 LC_TELEPHONE

Modified: fsf/trunk/libc/localedata/locales/en_AU
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_AU (original)
+++ fsf/trunk/libc/localedata/locales/en_AU Tue Sep 24 00:02:14 2013
@@ -159,5 +159,10 @@
 country_num 036
 % AUS
 country_car    "<U0041><U0055><U0053>"
-
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/en_BW
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_BW (original)
+++ fsf/trunk/libc/localedata/locales/en_BW Tue Sep 24 00:02:14 2013
@@ -116,5 +116,10 @@
 country_num 072
 % RB
 country_car    "<U0052><U0042>"
-
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/en_CA
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_CA (original)
+++ fsf/trunk/libc/localedata/locales/en_CA Tue Sep 24 00:02:14 2013
@@ -182,7 +182,10 @@
 % CDN
 country_car    "<U0043><U0044><U004E>"
 lang_name     "<U0045><U006E><U0067><U006C><U0069><U0073><U0068>"
-lang_ab       "<U0065><U006E>"
-lang_term     "<U0065><U006E><U0067>"
-lang_lib      "<U0065><U006E><U0067>"
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/en_DK
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_DK (original)
+++ fsf/trunk/libc/localedata/locales/en_DK Tue Sep 24 00:02:14 2013
@@ -160,4 +160,10 @@
 country_num 208
 % DK
 country_car    "<U0044><U004B>"
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/en_GB
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_GB (original)
+++ fsf/trunk/libc/localedata/locales/en_GB Tue Sep 24 00:02:14 2013
@@ -163,5 +163,10 @@
 country_num   826
 % GB
 country_car    "<U0047><U0042>"
-
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/en_HK
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_HK (original)
+++ fsf/trunk/libc/localedata/locales/en_HK Tue Sep 24 00:02:14 2013
@@ -198,7 +198,12 @@
 country_num   344
 % HK
 country_car    "<U0048><U004B>"
-
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS
 
 

Modified: fsf/trunk/libc/localedata/locales/en_IE
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_IE (original)
+++ fsf/trunk/libc/localedata/locales/en_IE Tue Sep 24 00:02:14 2013
@@ -157,5 +157,10 @@
 country_num   372
 % IRL
 country_car    "<U0049><U0052><U004C>"
-
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/en_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_IN (original)
+++ fsf/trunk/libc/localedata/locales/en_IN Tue Sep 24 00:02:14 2013
@@ -193,7 +193,12 @@
 country_num   356
 % IND
 country_car    "<U0049><U004E><U0044>"
-
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS
 
 

Modified: fsf/trunk/libc/localedata/locales/en_NG
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_NG (original)
+++ fsf/trunk/libc/localedata/locales/en_NG Tue Sep 24 00:02:14 2013
@@ -274,10 +274,12 @@
 % ISO 639 language abbreviations:
 % 639-1 2 letter, 639-2 3 letter terminology
 % http://www.loc.gov/standards/iso639-2/englagn.html
-% "en", "eng"
-lang_ab       "<U0065><U006E>"
-lang_term     "<U0065><U006E><U0067>"
-lang_lib      "<U0065><U006E><U0067>"
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 
 % ISO 3166 country number and 2 and 3 letter abreviations
 % http://www.unicode.org/onlinedat/countries.html

Modified: fsf/trunk/libc/localedata/locales/en_NZ
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_NZ (original)
+++ fsf/trunk/libc/localedata/locales/en_NZ Tue Sep 24 00:02:14 2013
@@ -158,5 +158,10 @@
 country_num   554
 % NZ
 country_car    "<U004E><U005A>"
-
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/en_PH
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_PH (original)
+++ fsf/trunk/libc/localedata/locales/en_PH Tue Sep 24 00:02:14 2013
@@ -194,7 +194,12 @@
 country_num   360
 % RP
 country_car    "<U0052><U0050>"
-
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS
 
 

Modified: fsf/trunk/libc/localedata/locales/en_SG
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_SG (original)
+++ fsf/trunk/libc/localedata/locales/en_SG Tue Sep 24 00:02:14 2013
@@ -197,7 +197,12 @@
 country_num   702
 % SGP
 country_car    "<U0053><U0047><U0050>"
-
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS
 
 

Modified: fsf/trunk/libc/localedata/locales/en_US
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_US (original)
+++ fsf/trunk/libc/localedata/locales/en_US Tue Sep 24 00:02:14 2013
@@ -166,9 +166,12 @@
 country_car   "<U0055><U0053><U0041>"
 country_isbn  0
 lang_name     "<U0045><U006E><U0067><U006C><U0069><U0073><U0068>"
-lang_ab       "<U0065><U006E>"
-lang_term     "<U0065><U006E><U0067>"
-lang_lib      "<U0065><U006E><U0067>"
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS
 
 LC_TELEPHONE

Modified: fsf/trunk/libc/localedata/locales/en_ZA
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_ZA (original)
+++ fsf/trunk/libc/localedata/locales/en_ZA Tue Sep 24 00:02:14 2013
@@ -231,7 +231,7 @@
 tel_int_fmt    "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
 <U006C>"
 
-% Represntation of telephone number for domestic use -
+% Representation of telephone number for domestic use -
 % "(%A) %l", which is
 % %A - area code with national prefix
 % %l - local number".
@@ -342,10 +342,12 @@
 % ISO 639 language abbreviations:
 % 639-1 2 letter, 639-2 3 letter terminology
 % http://www.loc.gov/standards/iso639-2/englagn.html
-% "en", "eng"
-lang_ab       "<U0065><U006E>"
-lang_term     "<U0065><U006E><U0067>"
-lang_lib      "<U0065><U006E><U0067>"
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 
 % ISO 3166 country number and 2 and 3 letter abreviations
 % http://www.unicode.org/onlinedat/countries.html

Modified: fsf/trunk/libc/localedata/locales/en_ZM
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_ZM (original)
+++ fsf/trunk/libc/localedata/locales/en_ZM Tue Sep 24 00:02:14 2013
@@ -87,6 +87,12 @@
 country_num   894
 % Z
 country_car  "<U005A>"
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS
 
 LC_TELEPHONE

Modified: fsf/trunk/libc/localedata/locales/en_ZW
==============================================================================
--- fsf/trunk/libc/localedata/locales/en_ZW (original)
+++ fsf/trunk/libc/localedata/locales/en_ZW Tue Sep 24 00:02:14 2013
@@ -115,5 +115,10 @@
 country_num   716
 % ZW
 country_car    "<U005A><U0057>"
-
+% en
+lang_ab      "<U0065><U006E>"
+% eng
+lang_term    "<U0065><U006E><U0067>"
+% eng
+lang_lib    "<U0065><U006E><U0067>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_AR
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_AR (original)
+++ fsf/trunk/libc/localedata/locales/es_AR Tue Sep 24 00:02:14 2013
@@ -158,5 +158,10 @@
 country_num   032
 % RA
 country_car    "<U0052><U0041>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_BO
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_BO (original)
+++ fsf/trunk/libc/localedata/locales/es_BO Tue Sep 24 00:02:14 2013
@@ -156,5 +156,10 @@
 country_num   068
 % BOL
 country_car    "<U0042><U004F><U004C>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_CL
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_CL (original)
+++ fsf/trunk/libc/localedata/locales/es_CL Tue Sep 24 00:02:14 2013
@@ -154,5 +154,10 @@
 country_num   152
 % RCH
 country_car    "<U0052><U0043><U0048>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_CO
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_CO (original)
+++ fsf/trunk/libc/localedata/locales/es_CO Tue Sep 24 00:02:14 2013
@@ -157,5 +157,10 @@
 country_num   170
 % CO
 country_car    "<U0043><U004F>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_CR
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_CR (original)
+++ fsf/trunk/libc/localedata/locales/es_CR Tue Sep 24 00:02:14 2013
@@ -155,10 +155,14 @@
 country_post  "<U0043><U0052>"
 country_car   "<U0043><U0052>"
 country_isbn  "9930,9977,9968"
-lang_name     "<U0045><U0073><U0070><U0061><U00F1><U006F><U006C>"
-lang_ab       "<U0065><U0073>"
-lang_term     "<U0073><U0070><U0061>"
 country_ab2   "<U0043><U0052>"
 country_ab3   "<U0043><U0052><U0049>"
 country_num   188
+lang_name     "<U0045><U0073><U0070><U0061><U00F1><U006F><U006C>"
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_CU
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_CU (original)
+++ fsf/trunk/libc/localedata/locales/es_CU Tue Sep 24 00:02:14 2013
@@ -121,4 +121,10 @@
 country_num   192
 % C
 country_car    "<U0043>"
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_DO
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_DO (original)
+++ fsf/trunk/libc/localedata/locales/es_DO Tue Sep 24 00:02:14 2013
@@ -158,5 +158,10 @@
 country_num   214
 % DOM
 country_car    "<U0044><U004F><U004D>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_EC
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_EC (original)
+++ fsf/trunk/libc/localedata/locales/es_EC Tue Sep 24 00:02:14 2013
@@ -156,5 +156,10 @@
 country_num   218
 % EC
 country_car    "<U0045><U0043>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_ES
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_ES (original)
+++ fsf/trunk/libc/localedata/locales/es_ES Tue Sep 24 00:02:14 2013
@@ -170,5 +170,10 @@
 country_num   724
 % E
 country_car    "<U0045>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_GT
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_GT (original)
+++ fsf/trunk/libc/localedata/locales/es_GT Tue Sep 24 00:02:14 2013
@@ -155,5 +155,10 @@
 country_num   320
 % GCA
 country_car    "<U0047><U0043><U0041>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_HN
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_HN (original)
+++ fsf/trunk/libc/localedata/locales/es_HN Tue Sep 24 00:02:14 2013
@@ -156,4 +156,10 @@
 country_ab2   "<U0048><U004E>"
 country_ab3   "<U0048><U004E><U0044>"
 country_num   340
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_MX
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_MX (original)
+++ fsf/trunk/libc/localedata/locales/es_MX Tue Sep 24 00:02:14 2013
@@ -155,5 +155,10 @@
 country_num   484
 % MEX
 country_car    "<U004D><U0045><U0058>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_NI
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_NI (original)
+++ fsf/trunk/libc/localedata/locales/es_NI Tue Sep 24 00:02:14 2013
@@ -149,5 +149,10 @@
 country_num   558
 % NIC
 country_car    "<U004E><U0049><U0043>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_PA
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_PA (original)
+++ fsf/trunk/libc/localedata/locales/es_PA Tue Sep 24 00:02:14 2013
@@ -155,5 +155,10 @@
 country_num   591
 % PA
 country_car    "<U0050><U0041>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_PE
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_PE (original)
+++ fsf/trunk/libc/localedata/locales/es_PE Tue Sep 24 00:02:14 2013
@@ -156,5 +156,10 @@
 country_num   604
 % PE
 country_car    "<U0050><U0045>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_PR
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_PR (original)
+++ fsf/trunk/libc/localedata/locales/es_PR Tue Sep 24 00:02:14 2013
@@ -143,4 +143,10 @@
 country_ab2   "<U0050><U0052>"
 country_ab3   "<U0050><U0052><U0049>"
 country_num   630
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_PY
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_PY (original)
+++ fsf/trunk/libc/localedata/locales/es_PY Tue Sep 24 00:02:14 2013
@@ -155,5 +155,10 @@
 country_num   600
 % PY
 country_car    "<U0050><U0059>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_SV
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_SV (original)
+++ fsf/trunk/libc/localedata/locales/es_SV Tue Sep 24 00:02:14 2013
@@ -156,5 +156,10 @@
 country_num   222
 % ES
 country_car    "<U0045><U0053>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_US
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_US (original)
+++ fsf/trunk/libc/localedata/locales/es_US Tue Sep 24 00:02:14 2013
@@ -208,4 +208,10 @@
 country_num   840
 country_car   "<U0055><U0053><U0041>"
 country_isbn  0
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_UY
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_UY (original)
+++ fsf/trunk/libc/localedata/locales/es_UY Tue Sep 24 00:02:14 2013
@@ -155,5 +155,10 @@
 country_num   858
 % UY
 country_car    "<U0055><U0059>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/es_VE
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_VE (original)
+++ fsf/trunk/libc/localedata/locales/es_VE Tue Sep 24 00:02:14 2013
@@ -155,5 +155,10 @@
 country_num   862
 % YV
 country_car    "<U0059><U0056>"
-
+% es
+lang_ab      "<U0065><U0073>"
+% spa
+lang_term    "<U0073><U0070><U0061>"
+% spa
+lang_lib    "<U0073><U0070><U0061>"
 END LC_ADDRESS

Modified: fsf/trunk/libc/localedata/locales/eu_ES
==============================================================================
--- fsf/trunk/libc/localedata/locales/eu_ES (original)
+++ fsf/trunk/libc/localedata/locales/eu_ES Tue Sep 24 00:02:14 2013
@@ -169,5 +169,10 @@
 country_num 724
 % E
 country_car    "<U0045>"
-
+% eu
+lang_ab      "<U0065><U0075>"
+% eus
+lang_term    "<U0065><U0075><U0073>"
+% eus
+lang_lib    "<U0065><U0075><U0073>"
 END LC_ADDRESS

Added: fsf/trunk/libc/localedata/locales/lzh_TW
==============================================================================
--- fsf/trunk/libc/localedata/locales/lzh_TW (added)
+++ fsf/trunk/libc/localedata/locales/lzh_TW Tue Sep 24 00:02:14 2013
@@ -1,0 +1,253 @@
+comment_char %
+escape_char /
+% Charset: UTF-8
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Literary Chinese locale for the Republic of China
+%
+% Prepared and contributed to glibc by Wei-Lun Chao <bluebat@xxxxxxxxxxxxxx>
+%
+% build with: localedef -f UTF-8 -i lzh_TW lzh_TW
+%
+% This file is a part of GNU C Library (glibc) and contains locale data. The
+% Free Software Foundation does not claim any copyright interest in the
+% locale data contained in this file. The foregoing does not affect the
+% license of GNU C Library (glibc) as a whole. It does not exempt you from the
+% conditions of the license if your use would otherwise be governed by
+% that license.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+LC_IDENTIFICATION
+title        "Literary Chinese locale for the Republic of China"
+source       ""
+address      ""
+contact      ""
+email        "bug-glibc-locales@xxxxxxx"
+tel          ""
+fax          ""
+language     "Literary Chinese"
+territory    "Republic of China"
+revision     "0.1"
+date         "2013-06-02"
+%
+category  "lzh_TW:2000";LC_IDENTIFICATION
+category  "lzh_TW:2000";LC_CTYPE
+category  "lzh_TW:2000";LC_COLLATE
+category  "lzh_TW:2000";LC_TIME
+category  "lzh_TW:2000";LC_NUMERIC
+category  "lzh_TW:2000";LC_MONETARY
+category  "lzh_TW:2000";LC_PAPER
+category  "lzh_TW:2000";LC_MEASUREMENT
+category  "lzh_TW:2000";LC_MESSAGES
+category  "lzh_TW:2000";LC_NAME
+category  "lzh_TW:2000";LC_ADDRESS
+category  "lzh_TW:2000";LC_TELEPHONE
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "i18n"
+class	"hanzi"; /
+<U3007>;/
+<U3400>..<U4DBF>;/
+<U4E00>..<U9FA5>;/
+<UF900>..<UFA6A>;/
+<U00020000>..<U0002A6D6>;/
+<U0002F800>..<U0002FA1D>
+END LC_CTYPE
+
+LC_COLLATE
+copy "iso14651_t1"
+END LC_COLLATE
+
+LC_TIME
+% ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂÃÂÂ, ÃÂÂÃÂÂÃÂÂ
+mon           "<U4E00><U6708>";/
+     "<U4E8C><U6708>";/
+     "<U4E09><U6708>";/
+     "<U56DB><U6708>";/
+     "<U4E94><U6708>";/
+     "<U516D><U6708>";/
+     "<U4E03><U6708>";/
+     "<U516B><U6708>";/
+     "<U4E5D><U6708>";/
+     "<U5341><U6708>";/
+     "<U5341><U4E00><U6708>";/
+     "<U5341><U4E8C><U6708>"
+%  ÃÂÂ ,  ÃÂÂ ,  ÃÂÂ ,  ÃÂÂ ,  ÃÂÂ ,  ÃÂÂ ,  ÃÂÂ ,  ÃÂÂ ,  ÃÂÂ ,  ÃÂÂ , ÃÂÂÃÂÂ, ÃÂÂÃÂÂ
+abmon         "<U0020><U4E00><U0020>";/
+       "<U0020><U4E8C><U0020>";/
+       "<U0020><U4E09><U0020>";/
+       "<U0020><U56DB><U0020>";/
+       "<U0020><U4E94><U0020>";/
+       "<U0020><U516D><U0020>";/
+       "<U0020><U4E03><U0020>";/
+       "<U0020><U516B><U0020>";/
+       "<U0020><U4E5D><U0020>";/
+       "<U0020><U5341><U0020>";/
+       "<U5341><U4E00>";/
+       "<U5341><U4E8C>"
+% ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ
+day           "<U9031><U65E5>";/
+     "<U9031><U4E00>";/
+     "<U9031><U4E8C>";/
+     "<U9031><U4E09>";/
+     "<U9031><U56DB>";/
+     "<U9031><U4E94>";/
+     "<U9031><U516D>"
+% ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ
+abday         "<U65E5>";/
+       "<U4E00>";/
+       "<U4E8C>";/
+       "<U4E09>";/
+       "<U56DB>";/
+       "<U4E94>";/
+       "<U516D>"
+% %OC%OyÃÂÂ%B%OdÃÂÂ (%A) %OHÃÂÂ%OMÃÂÂ%OSÃÂÂ
+d_t_fmt       "<U0025><U004F><U0043><U0025><U004F><U0079><U5E74><U0025><U0042><U0025><U004F><U0064><U65E5><U0020><U0028><U0025><U0041><U0029><U0020><U0025><U004F><U0048><U6642><U0025><U004F><U004D><U5206><U0025><U004F><U0053><U79D2>"
+% %OC%OyÃÂÂ%B%OdÃÂÂ
+d_fmt         "<U0025><U004F><U0043><U0025><U004F><U0079><U5E74><U0025><U0042><U0025><U004F><U0064><U65E5>"
+% %OHÃÂÂ%OMÃÂÂ%OSÃÂÂ
+t_fmt         "<U0025><U004F><U0048><U6642><U0025><U004F><U004D><U5206><U0025><U004F><U0053><U79D2>"
+% ÃÂÂ, ÃÂÂ
+am_pm         "<U671D>";/
+       "<U66AE>"
+% %p %OIÃÂÂ%OMÃÂÂ%OSÃÂÂ
+t_fmt_ampm    "<U0025><U0070><U0020><U0025><U004F><U0049><U6642><U0025><U004F><U004D><U5206><U0025><U004F><U0053><U79D2>"
+% ÃÂÂÃÂÂ %C%OyÃÂÂ %B %OeÃÂÂ %A %OHÃÂÂ%OMÃÂÂ%OSÃÂÂ
+date_fmt      "<U516C><U66C6><U0020><U0025><U0043><U0025><U004F><U0079><U5E74><U0020><U0025><U0042><U0020><U0025><U004F><U0065><U65E5><U0020><U0025><U0041><U0020><U0025><U004F><U0048><U6642><U0025><U004F><U004D><U5206><U0025><U004F><U0053><U79D2>"
+% ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂ, ÃÂÂÃÂÂ
+alt_digits    "<U3007>";/
+            "<U4E00>";/
+            "<U4E8C>";/
+            "<U4E09>";/
+            "<U56DB>";/
+            "<U4E94>";/
+            "<U516D>";/
+            "<U4E03>";/
+            "<U516B>";/
+            "<U4E5D>";/
+            "<U5341>";/
+            "<U5341><U4E00>";/
+            "<U5341><U4E8C>";/
+            "<U5341><U4E09>";/
+            "<U5341><U56DB>";/
+            "<U5341><U4E94>";/
+            "<U5341><U516D>";/
+            "<U5341><U4E03>";/
+            "<U5341><U516B>";/
+            "<U5341><U4E5D>";/
+            "<U5EFF>";/
+            "<U5EFF><U4E00>";/
+            "<U5EFF><U4E8C>";/
+            "<U5EFF><U4E09>";/
+            "<U5EFF><U56DB>";/
+            "<U5EFF><U4E94>";/
+            "<U5EFF><U516D>";/
+            "<U5EFF><U4E03>";/
+            "<U5EFF><U516B>";/
+            "<U5EFF><U4E5D>";/
+            "<U5345>";/
+            "<U5345><U4E00>"
+END LC_TIME
+
+LC_NUMERIC
+% .
+decimal_point "<U002E>"
+% ,
+thousands_sep "<U002C>"
+grouping      4
+END LC_NUMERIC
+
+LC_MONETARY
+% NT$
+currency_symbol    "<U004E><U0054><U0024>"
+% TWD
+int_curr_symbol    "<U0054><U0057><U0044><U0020>"
+% .
+mon_decimal_point  "<U002E>"
+% ,
+mon_thousands_sep  "<U002C>"
+mon_grouping       4
+positive_sign      ""
+% -
+negative_sign      "<U002D>"
+frac_digits        2
+int_frac_digits    2
+p_cs_precedes      1
+p_sep_by_space     0
+n_cs_precedes      1
+n_sep_by_space     0
+p_sign_posn        1
+n_sign_posn        1
+int_p_cs_precedes  1
+int_p_sep_by_space 0
+int_n_cs_precedes  1
+int_n_sep_by_space 0
+int_p_sign_posn    1
+int_n_sign_posn    1
+END LC_MONETARY
+
+LC_PAPER
+height 297
+width  210
+END LC_PAPER
+
+LC_MEASUREMENT
+measurement 1
+END LC_MEASUREMENT
+
+LC_MESSAGES
+% ^[yYÃÂÂ]
+yesexpr "<U005E><U005B><U0079><U0059><U662F><U005D>"
+% ^[nNÃÂÂ]
+noexpr  "<U005E><U005B><U006E><U004E><U975E><U005D>"
+END LC_MESSAGES
+
+LC_NAME
+% %f%d%t%g
+name_fmt  "<U0025><U0066><U0025><U0064><U0025><U0074><U0025><U0067>"
+% ÃÂÂ
+name_gen  "<U541B>"
+% ÃÂÂ
+name_miss "<U5973>"
+% ÃÂÂ
+name_mr   "<U5B50>"
+% ÃÂÂ
+name_mrs  "<U6C0F>"
+% ÃÂÂ
+name_ms   "<U5A18>"
+END LC_NAME
+
+LC_ADDRESS
+% %c%N%T%N%s %h %e %r%N%b%N%d%N%f%N%a%N
+postal_fmt   "<U0025><U0063><U0025><U004E><U0025><U0054><U0025><U004E><U0025><U0073><U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0064><U0025><U004E><U0025><U0066><U0025><U004E><U0025><U0061><U0025><U004E>"
+% ÃÂÂÃÂÂÃÂÂÃÂÂ
+country_name "<U4E2D><U83EF><U6C11><U570B>"
+% TW
+country_post "<U0054><U0057>"
+% TW
+country_ab2  "<U0054><U0057>"
+% TWN
+country_ab3  "<U0054><U0057><U004E>"
+country_num  158
+country_isbn 957
+% ÃÂÂÃÂÂÃÂÂÃÂÂ
+lang_name    "<U6F22><U8A9E><U6587><U8A00>"
+% lzh
+lang_term    "<U006C><U007A><U0068>"
+% lzh
+lang_lib     "<U006C><U007A><U0068>"
+END LC_ADDRESS
+
+LC_TELEPHONE
+% +%c-%a-%l
+tel_int_fmt "<U002B><U0025><U0063><U002D><U0025><U0061><U002D><U0025><U006C>"
+% %A-%l
+tel_dom_fmt "<U0025><U0041><U002D><U0025><U006C>"
+% 00
+int_select  "<U0030><U0030>"
+% 886
+int_prefix  "<U0038><U0038><U0036>"
+END LC_TELEPHONE

Added: fsf/trunk/libc/localedata/locales/nan_TW
==============================================================================
--- fsf/trunk/libc/localedata/locales/nan_TW (added)
+++ fsf/trunk/libc/localedata/locales/nan_TW Tue Sep 24 00:02:14 2013
@@ -1,0 +1,220 @@
+comment_char %
+escape_char /
+% Charset: UTF-8
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Min Nan Chinese locale for the Republic of China
+%
+% Prepared and contributed to glibc by Wei-Lun Chao <bluebat@xxxxxxxxxxxxxx>
+%
+% build with: localedef -f UTF-8 -i nan_TW nan_TW
+%
+% This file is a part of GNU C Library (glibc) and contains locale data. The
+% Free Software Foundation does not claim any copyright interest in the
+% locale data contained in this file. The foregoing does not affect the
+% license of GNU C Library (glibc) as a whole. It does not exempt you from the
+% conditions of the license if your use would otherwise be governed by
+% that license.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+LC_IDENTIFICATION
+title        "Min Nan Chinese locale for the Republic of China"
+source       ""
+address      ""
+contact      ""
+email        "bug-glibc-locales@xxxxxxx"
+tel          ""
+fax          ""
+language     "Min Nan Chinese"
+territory    "Republic of China"
+revision     "0.1"
+date         "2013-06-02"
+%
+category  "nan_TW:2000";LC_IDENTIFICATION
+category  "nan_TW:2000";LC_CTYPE
+category  "nan_TW:2000";LC_COLLATE
+category  "nan_TW:2000";LC_TIME
+category  "nan_TW:2000";LC_NUMERIC
+category  "nan_TW:2000";LC_MONETARY
+category  "nan_TW:2000";LC_PAPER
+category  "nan_TW:2000";LC_MEASUREMENT
+category  "nan_TW:2000";LC_MESSAGES
+category  "nan_TW:2000";LC_NAME
+category  "nan_TW:2000";LC_ADDRESS
+category  "nan_TW:2000";LC_TELEPHONE
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "i18n"
+class	"hanzi"; /
+<U3007>;/
+<U3400>..<U4DBF>;/
+<U4E00>..<U9FA5>;/
+<UF900>..<UFA6A>;/
+<U00020000>..<U0002A6D6>;/
+<U0002F800>..<U0002FA1D>
+END LC_CTYPE
+
+LC_COLLATE
+copy "iso14651_t1"
+END LC_COLLATE
+
+LC_TIME
+% ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂ, ÃÂÂÃÂÂÃÂÂ, ÃÂÂÃÂÂÃÂÂ
+mon           "<U4E00><U6708>";/
+     "<U4E8C><U6708>";/
+     "<U4E09><U6708>";/
+     "<U56DB><U6708>";/
+     "<U4E94><U6708>";/
+     "<U516D><U6708>";/
+     "<U4E03><U6708>";/
+     "<U516B><U6708>";/
+     "<U4E5D><U6708>";/
+     "<U5341><U6708>";/
+     "<U5341><U4E00><U6708>";/
+     "<U5341><U4E8C><U6708>"
+%  1ÃÂÂ,  2ÃÂÂ,  3ÃÂÂ,  4ÃÂÂ,  5ÃÂÂ,  6ÃÂÂ,  7ÃÂÂ,  8ÃÂÂ,  9ÃÂÂ, 10ÃÂÂ, 11ÃÂÂ, 12ÃÂÂ
+abmon         "<U0020><U0031><U6708>";/
+       "<U0020><U0032><U6708>";/
+       "<U0020><U0033><U6708>";/
+       "<U0020><U0034><U6708>";/
+       "<U0020><U0035><U6708>";/
+       "<U0020><U0036><U6708>";/
+       "<U0020><U0037><U6708>";/
+       "<U0020><U0038><U6708>";/
+       "<U0020><U0039><U6708>";/
+       "<U0031><U0030><U6708>";/
+       "<U0031><U0031><U6708>";/
+       "<U0031><U0032><U6708>"
+% ÃÂÂÃÂÂÃÂÂ, ÃÂÂÃÂÂÃÂÂ, ÃÂÂÃÂÂÃÂÂ, ÃÂÂÃÂÂÃÂÂ, ÃÂÂÃÂÂÃÂÂ, ÃÂÂÃÂÂÃÂÂ, ÃÂÂÃÂÂÃÂÂ
+day           "<U79AE><U62DC><U65E5>";/
+     "<U79AE><U62DC><U4E00>";/
+     "<U79AE><U62DC><U4E8C>";/
+     "<U79AE><U62DC><U4E09>";/
+     "<U79AE><U62DC><U56DB>";/
+     "<U79AE><U62DC><U4E94>";/
+     "<U79AE><U62DC><U516D>"
+% ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ, ÃÂÂ
+abday         "<U65E5>";/
+       "<U4E00>";/
+       "<U4E8C>";/
+       "<U4E09>";/
+       "<U56DB>";/
+       "<U4E94>";/
+       "<U516D>"
+% %YÃÂÂ%mÃÂÂ%dÃÂÂ (%A) %HÃÂÂ%MÃÂÂ%SÃÂÂ
+d_t_fmt       "<U0025><U0059><U5E74><U0025><U006D><U6708><U0025><U0064><U65E5><U0020><U0028><U0025><U0041><U0029><U0020><U0025><U0048><U9EDE><U0025><U004D><U5206><U0025><U0053><U79D2>"
+% %YÃÂÂ%mÃÂÂ%dÃÂÂ
+d_fmt         "<U0025><U0059><U5E74><U0025><U006D><U6708><U0025><U0064><U65E5>"
+% %HÃÂÂ%MÃÂÂ%SÃÂÂ
+t_fmt         "<U0025><U0048><U9EDE><U0025><U004D><U5206><U0025><U0053><U79D2>"
+% ÃÂÂÃÂÂ, ÃÂÂÃÂÂ
+am_pm         "<U9802><U6661>";/
+       "<U4E0B><U6661>"
+% %p %IÃÂÂ%MÃÂÂ%SÃÂÂ
+t_fmt_ampm    "<U0025><U0070><U0020><U0025><U0049><U9EDE><U0025><U004D><U5206><U0025><U0053><U79D2>"
+% %YÃÂÂ %b %eÃÂÂ %A %H:%M:%S %Z
+date_fmt      "<U0025><U0059><U5E74><U0020><U0025><U0062><U0020><U0025><U0065><U65E5><U0020><U0025><U0041><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A>"
+END LC_TIME
+
+LC_NUMERIC
+% .
+decimal_point "<U002E>"
+% ,
+thousands_sep "<U002C>"
+grouping      4
+END LC_NUMERIC
+
+LC_MONETARY
+% NT$
+currency_symbol    "<U004E><U0054><U0024>"
+% TWD
+int_curr_symbol    "<U0054><U0057><U0044><U0020>"
+% .
+mon_decimal_point  "<U002E>"
+% ,
+mon_thousands_sep  "<U002C>"
+mon_grouping       4
+positive_sign      ""
+% -
+negative_sign      "<U002D>"
+frac_digits        2
+int_frac_digits    2
+p_cs_precedes      1
+p_sep_by_space     0
+n_cs_precedes      1
+n_sep_by_space     0
+p_sign_posn        1
+n_sign_posn        1
+int_p_cs_precedes  1
+int_p_sep_by_space 0
+int_n_cs_precedes  1
+int_n_sep_by_space 0
+int_p_sign_posn    1
+int_n_sign_posn    1
+END LC_MONETARY
+
+LC_PAPER
+height 297
+width  210
+END LC_PAPER
+
+LC_MEASUREMENT
+measurement 1
+END LC_MEASUREMENT
+
+LC_MESSAGES
+% ^[yYÃÂÂ]
+yesexpr "<U005E><U005B><U0079><U0059><U662F><U005D>"
+% ^[nNÃÂÂ]
+noexpr  "<U005E><U005B><U006E><U004E><U4F13><U005D>"
+END LC_MESSAGES
+
+LC_NAME
+% %f%t%g%t%d
+name_fmt  "<U0025><U0066><U0025><U0074><U0025><U0067><U0025><U0074><U0025><U0064>"
+% ÃÂÂ
+name_gen  "<U541B>"
+% ÃÂÂÃÂÂ
+name_miss "<U5C0F><U59D0>"
+% ÃÂÂÃÂÂ
+name_mr   "<U5148><U751F>"
+% ÃÂÂÃÂÂ
+name_mrs  "<U592B><U4EBA>"
+% ÃÂÂÃÂÂ
+name_ms   "<U5973><U58EB>"
+END LC_NAME
+
+LC_ADDRESS
+% %c%N%T%N%s %h %e %r%N%b%N%d%N%f%N%a%N
+postal_fmt   "<U0025><U0063><U0025><U004E><U0025><U0054><U0025><U004E><U0025><U0073><U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0064><U0025><U004E><U0025><U0066><U0025><U004E><U0025><U0061><U0025><U004E>"
+% ÃÂÂÃÂÂÃÂÂÃÂÂ
+country_name "<U4E2D><U83EF><U6C11><U570B>"
+% TW
+country_post "<U0054><U0057>"
+% TW
+country_ab2  "<U0054><U0057>"
+% TWN
+country_ab3  "<U0054><U0057><U004E>"
+country_num  158
+country_isbn 957
+% ÃÂÂÃÂÂÃÂÂÃÂÂÃÂÂ
+lang_name    "<U6F22><U8A9E><U95A9><U5357><U8A9E>"
+% nan
+lang_term    "<U006E><U0061><U006E>"
+% nan
+lang_lib     "<U006E><U0061><U006E>"
+END LC_ADDRESS
+
+LC_TELEPHONE
+% +%c-%a-%l
+tel_int_fmt "<U002B><U0025><U0063><U002D><U0025><U0061><U002D><U0025><U006C>"
+% %A-%l
+tel_dom_fmt "<U0025><U0041><U002D><U0025><U006C>"
+% 00
+int_select  "<U0030><U0030>"
+% 886
+int_prefix  "<U0038><U0038><U0036>"
+END LC_TELEPHONE

Modified: fsf/trunk/libc/manual/threads.texi
==============================================================================
--- fsf/trunk/libc/manual/threads.texi (original)
+++ fsf/trunk/libc/manual/threads.texi Tue Sep 24 00:02:14 2013
@@ -1,5 +1,5 @@
 @node POSIX Threads
-@c @node POSIX Threads, Intenal Probes, Cryptographic Functions, Top
+@c @node POSIX Threads, Internal Probes, Cryptographic Functions, Top
 @chapter POSIX Threads
 @c %MENU% POSIX Threads
 @cindex pthreads

Modified: fsf/trunk/libc/ports/ChangeLog.ia64
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.ia64 (original)
+++ fsf/trunk/libc/ports/ChangeLog.ia64 Tue Sep 24 00:02:14 2013
@@ -1,3 +1,8 @@
+2013-09-22  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	[BZ #15754]
+	* sysdeps/ia64/stackguard-macros.h: Define POINTER_CHK_GUARD.
+
 2013-08-30   OndÃÂej BÃÂlka  <neleai@xxxxxxxxx>
 
 	* sysdeps/ia64/fpu/libm_reduce.S: Fix typos.

Modified: fsf/trunk/libc/ports/ChangeLog.mips
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.mips (original)
+++ fsf/trunk/libc/ports/ChangeLog.mips Tue Sep 24 00:02:14 2013
@@ -1,3 +1,44 @@
+2013-09-23  Steve Ellcey  <sellcey@xxxxxxxx>
+
+	* sysdeps/mips/math_private.h (libc_feholdexcept_mips): New function.
+	(libc_feholdexcept): New macro.
+	(libc_feholdexceptf): New macro.
+	(libc_feholdexceptl): New macro.
+	(libc_fesetround_mips): New function.
+	(libc_fesetround): New macro.
+	(libc_fesetroundf): New macro.
+	(libc_fesetroundl): New macro.
+	(libc_feholdexcept_setround_mips): New function.
+	(libc_feholdexcept_setround): New macro.
+	(libc_feholdexcept_setroundf): New macro.
+	(libc_feholdexcept_setroundl): New macro.
+	(libc_fesetenv_mips): New function.
+	(libc_fesetenv): New macro.
+	(libc_fesetenvf): New macro.
+	(libc_fesetenvl): New macro.
+	(libc_feupdateenv_mips): New function.
+	(libc_feupdateenv): New macro.
+	(libc_feupdateenvf): New macro.
+	(libc_feupdateenvl): New macro.
+
+2013-09-23  Maciej W. Rozycki  <macro@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/mips/bits/atomic.h: Fix comment typo.
+
+2013-09-23  Steve Ellcey  <sellcey@xxxxxxxx>
+
+	* sysdeps/mips/fpu/fegetround.c (fegetround): Use _FPU_RC_MASK.
+	* sysdeps/mips/fpu/fesetround.c (fesetround): Use _FPU_RC_MASK.
+
+2013-09-23  Steve Ellcey  <sellcey@xxxxxxxx>
+
+	* sysdeps/mips/fpu_control.h (_FPU_RC_MASK): New.
+
+2013-09-23  Steve Ellcey  <sellcey@xxxxxxxx>
+
+	* sysdeps/mips/fpu_control.h (comments): Add capitalization and
+	periods to match GNU standard.
+
 2013-09-20  Steve Ellcey  <sellcey@xxxxxxxx>
 
 	* sysdeps/mips/memset.S: Change prefetching and add loop unrolling.

Modified: fsf/trunk/libc/ports/ChangeLog.tile
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.tile (original)
+++ fsf/trunk/libc/ports/ChangeLog.tile Tue Sep 24 00:02:14 2013
@@ -1,3 +1,8 @@
+2013-09-22  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	[BZ #15754]
+	* sysdeps/tile/stackguard-macros.h: Define POINTER_CHK_GUARD.
+
 2013-09-20  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
 
 	* sysdeps/tile/ffs.c (__ffs): Define as hidden.

Modified: fsf/trunk/libc/ports/sysdeps/ia64/stackguard-macros.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/ia64/stackguard-macros.h (original)
+++ fsf/trunk/libc/ports/sysdeps/ia64/stackguard-macros.h Tue Sep 24 00:02:14 2013
@@ -2,3 +2,6 @@
 
 #define STACK_CHK_GUARD \
   ({ uintptr_t x; asm ("adds %0 = -8, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })
+
+#define POINTER_CHK_GUARD \
+  ({ uintptr_t x; asm ("adds %0 = -16, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })

Modified: fsf/trunk/libc/ports/sysdeps/mips/bits/atomic.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/bits/atomic.h (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/bits/atomic.h Tue Sep 24 00:02:14 2013
@@ -84,7 +84,7 @@
    support for their efficient implementation was added only in GCC 4.8.
    We still want to use them even with GCC 4.7 for MIPS16 code where we
    have no assembly alternative available and want to avoid the __sync_*
-   if at all possible.  */
+   builtins if at all possible.  */
 
 /* Compare and exchange.
    For all "bool" routines, we return FALSE if exchange succesful.  */

Modified: fsf/trunk/libc/ports/sysdeps/mips/fpu/fegetround.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/fpu/fegetround.c (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/fpu/fegetround.c Tue Sep 24 00:02:14 2013
@@ -28,5 +28,5 @@
   /* Get control word.  */
   _FPU_GETCW (cw);
 
-  return cw & 0x3;
+  return cw & _FPU_RC_MASK;
 }

Modified: fsf/trunk/libc/ports/sysdeps/mips/fpu/fesetround.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/fpu/fesetround.c (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/fpu/fesetround.c Tue Sep 24 00:02:14 2013
@@ -25,7 +25,7 @@
 {
   fpu_control_t cw;
 
-  if ((round & ~0x3) != 0)
+  if ((round & ~_FPU_RC_MASK) != 0)
     /* ROUND is no valid rounding mode.  */
     return 1;
 
@@ -33,7 +33,7 @@
   _FPU_GETCW (cw);
 
   /* Set rounding bits.  */
-  cw &= ~0x3;
+  cw &= ~_FPU_RC_MASK;
   cw |= round;
   /* Set new state.  */
   _FPU_SETCW (cw);

Modified: fsf/trunk/libc/ports/sysdeps/mips/fpu_control.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/fpu_control.h (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/fpu_control.h Tue Sep 24 00:02:14 2013
@@ -71,25 +71,27 @@
 
 #else /* __mips_soft_float */
 
-/* masking of interrupts */
+/* Masks for interrupts.  */
 #define _FPU_MASK_V     0x0800  /* Invalid operation */
 #define _FPU_MASK_Z     0x0400  /* Division by zero  */
 #define _FPU_MASK_O     0x0200  /* Overflow          */
 #define _FPU_MASK_U     0x0100  /* Underflow         */
 #define _FPU_MASK_I     0x0080  /* Inexact operation */
 
-/* flush denormalized numbers to zero */
+/* Flush denormalized numbers to zero.  */
 #define _FPU_FLUSH_TZ   0x1000000
 
 /* IEEE 754-2008 compliance control.  */
 #define _FPU_ABS2008    0x80000
 #define _FPU_NAN2008    0x40000
 
-/* rounding control */
+/* Rounding control.  */
 #define _FPU_RC_NEAREST 0x0     /* RECOMMENDED */
 #define _FPU_RC_ZERO    0x1
 #define _FPU_RC_UP      0x2
 #define _FPU_RC_DOWN    0x3
+/* Mask for rounding control.  */
+#define _FPU_RC_MASK	0x3
 
 #define _FPU_RESERVED 0xfe840000  /* Reserved bits in cw, incl NAN2008.  */
 

Modified: fsf/trunk/libc/ports/sysdeps/mips/math_private.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/math_private.h (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/math_private.h Tue Sep 24 00:02:14 2013
@@ -26,6 +26,114 @@
 # define HIGH_ORDER_BIT_IS_SET_FOR_SNAN
 #endif
 
+/* Inline functions to speed up the math library implementation.  The
+   default versions of these routines are in generic/math_private.h
+   and call fesetround, feholdexcept, etc.  These routines use inlined
+   code instead.  */
+
+#ifdef __mips_hard_float
+
+# include <fenv.h>
+# include <fenv_libc.h>
+# include <fpu_control.h>
+
+static __always_inline void
+libc_feholdexcept_mips (fenv_t *envp)
+{
+  fpu_control_t cw;
+
+  /* Save the current state.  */
+  _FPU_GETCW (cw);
+  envp->__fp_control_register = cw;
+
+  /* Clear all exception enable bits and flags.  */
+  cw &= ~(_FPU_MASK_V|_FPU_MASK_Z|_FPU_MASK_O|_FPU_MASK_U|_FPU_MASK_I|FE_ALL_EXCEPT);
+  _FPU_SETCW (cw);
+}
+# define libc_feholdexcept libc_feholdexcept_mips
+# define libc_feholdexceptf libc_feholdexcept_mips
+# define libc_feholdexceptl libc_feholdexcept_mips
+
+static __always_inline void
+libc_fesetround_mips (int round)
+{
+  fpu_control_t cw;
+
+  /* Get current state.  */
+  _FPU_GETCW (cw);
+
+  /* Set rounding bits.  */
+  cw &= ~_FPU_RC_MASK;
+  cw |= round;
+
+  /* Set new state.  */
+  _FPU_SETCW (cw);
+}
+# define libc_fesetround libc_fesetround_mips
+# define libc_fesetroundf libc_fesetround_mips
+# define libc_fesetroundl libc_fesetround_mips
+
+static __always_inline void
+libc_feholdexcept_setround_mips (fenv_t *envp, int round)
+{
+  fpu_control_t cw;
+
+  /* Save the current state.  */
+  _FPU_GETCW (cw);
+  envp->__fp_control_register = cw;
+
+  /* Clear all exception enable bits and flags.  */
+  cw &= ~(_FPU_MASK_V|_FPU_MASK_Z|_FPU_MASK_O|_FPU_MASK_U|_FPU_MASK_I|FE_ALL_EXCEPT);
+
+  /* Set rounding bits.  */
+  cw &= ~_FPU_RC_MASK;
+  cw |= round;
+
+  /* Set new state.  */
+  _FPU_SETCW (cw);
+}
+# define libc_feholdexcept_setround libc_feholdexcept_setround_mips
+# define libc_feholdexcept_setroundf libc_feholdexcept_setround_mips
+# define libc_feholdexcept_setroundl libc_feholdexcept_setround_mips
+
+static __always_inline void
+libc_fesetenv_mips (fenv_t *envp)
+{
+  fpu_control_t cw;
+
+  /* Read current state to flush fpu pipeline.  */
+  _FPU_GETCW (cw);
+
+  _FPU_SETCW (envp->__fp_control_register);
+}
+# define libc_fesetenv libc_fesetenv_mips
+# define libc_fesetenvf libc_fesetenv_mips
+# define libc_fesetenvl libc_fesetenv_mips
+
+static __always_inline void
+libc_feupdateenv_mips (fenv_t *envp)
+{
+  int temp;
+
+  /* Save current exceptions.  */
+  _FPU_GETCW (temp);
+
+  /* Set flag bits (which are accumulative), and *also* set the
+     cause bits.  The setting of the cause bits is what actually causes
+     the hardware to generate the exception, if the corresponding enable
+     bit is set as well.  */
+  temp &= FE_ALL_EXCEPT;
+  temp |= envp->__fp_control_register | (temp << CAUSE_SHIFT);
+
+  /* Set new state.  */
+  _FPU_SETCW (temp);
+}
+# define libc_feupdateenv libc_feupdateenv_mips
+# define libc_feupdateenvf libc_feupdateenv_mips
+# define libc_feupdateenvl libc_feupdateenv_mips
+
+#endif
+
 #include_next <math_private.h>
 
 #endif

Modified: fsf/trunk/libc/ports/sysdeps/tile/stackguard-macros.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/tile/stackguard-macros.h (original)
+++ fsf/trunk/libc/ports/sysdeps/tile/stackguard-macros.h Tue Sep 24 00:02:14 2013
@@ -4,11 +4,17 @@
 # if __WORDSIZE == 64
 #  define STACK_CHK_GUARD \
   ({ uintptr_t x; asm ("addi %0, tp, -16; ld %0, %0" : "=r" (x)); x; })
+#  define POINTER_CHK_GUARD \
+  ({ uintptr_t x; asm ("addi %0, tp, -24; ld %0, %0" : "=r" (x)); x; })
 # else
 #  define STACK_CHK_GUARD \
   ({ uintptr_t x; asm ("addi %0, tp, -8; ld4s %0, %0" : "=r" (x)); x; })
+#  define POINTER_CHK_GUARD \
+  ({ uintptr_t x; asm ("addi %0, tp, -12; ld4s %0, %0" : "=r" (x)); x; })
 # endif
 #else
 # define STACK_CHK_GUARD \
   ({ uintptr_t x; asm ("addi %0, tp, -8; lw %0, %0" : "=r" (x)); x; })
+# define POINTER_CHK_GUARD \
+  ({ uintptr_t x; asm ("addi %0, tp, -12; lw %0, %0" : "=r" (x)); x; })
 #endif

Modified: fsf/trunk/libc/string/Makefile
==============================================================================
--- fsf/trunk/libc/string/Makefile (original)
+++ fsf/trunk/libc/string/Makefile Tue Sep 24 00:02:14 2013
@@ -57,6 +57,8 @@
 tests-ifunc := $(strop-tests:%=test-%-ifunc)
 tests += $(tests-ifunc)
 
+xtests = tst-strcoll-overflow
+
 include ../Rules
 
 tester-ENV = LANGUAGE=C

Modified: fsf/trunk/libc/string/strcoll_l.c
==============================================================================
--- fsf/trunk/libc/string/strcoll_l.c (original)
+++ fsf/trunk/libc/string/strcoll_l.c Tue Sep 24 00:02:14 2013
@@ -45,7 +45,7 @@
 typedef struct
 {
   int len;			/* Length of the current sequence.  */
-  int val;			/* Position of the sequence relative to the
+  size_t val;			/* Position of the sequence relative to the
 				   previous non-ignored sequence.  */
   size_t idxnow;		/* Current index in sequences.  */
   size_t idxmax;		/* Maximum index in sequences.  */
@@ -55,6 +55,12 @@
   const USTRING_TYPE *us;	/* The string.  */
   int32_t *idxarr;		/* Array to cache weight indices.  */
   unsigned char *rulearr;	/* Array to cache rules.  */
+  unsigned char rule;		/* Saved rule for the first sequence.  */
+  int32_t idx;			/* Index to weight of the current sequence.  */
+  int32_t save_idx;		/* Save looked up index of a forward
+				   sequence after the last backward
+				   sequence.  */
+  const USTRING_TYPE *back_us;	/* Beginning of the backward sequence.  */
 } coll_seq;
 
 /* Get next sequence.  The weight indices are cached, so we don't need to
@@ -64,7 +70,7 @@
 		     const unsigned char *rulesets,
 		     const USTRING_TYPE *weights)
 {
-  int val = seq->val = 0;
+  size_t val = seq->val = 0;
   int len = seq->len;
   size_t backw_stop = seq->backw_stop;
   size_t backw = seq->backw;
@@ -146,7 +152,7 @@
 	      const USTRING_TYPE *extra, const int32_t *indirect)
 {
 #include WEIGHT_H
-  int val = seq->val = 0;
+  size_t val = seq->val = 0;
   int len = seq->len;
   size_t backw_stop = seq->backw_stop;
   size_t backw = seq->backw;
@@ -162,7 +168,7 @@
       ++val;
       if (backw_stop != ~0ul)
 	{
-	  /* The is something pushed.  */
+	  /* There is something pushed.  */
 	  if (backw == backw_stop)
 	    {
 	      /* The last pushed character was handled.  Continue
@@ -227,15 +233,199 @@
   seq->us = us;
 }
 
-/* Compare two sequences.  */
+/* Get next sequence.  Traverse the string as required.  This function does not
+   set or use any index or rule cache.  */
+static void
+get_next_seq_nocache (coll_seq *seq, int nrules, const unsigned char *rulesets,
+		      const USTRING_TYPE *weights, const int32_t *table,
+		      const USTRING_TYPE *extra, const int32_t *indirect,
+		      int pass)
+{
+#include WEIGHT_H
+  size_t val = seq->val = 0;
+  int len = seq->len;
+  size_t backw_stop = seq->backw_stop;
+  size_t backw = seq->backw;
+  size_t idxcnt = seq->idxcnt;
+  size_t idxmax = seq->idxmax;
+  int32_t idx = seq->idx;
+  const USTRING_TYPE *us = seq->us;
+
+  while (len == 0)
+    {
+      ++val;
+      if (backw_stop != ~0ul)
+	{
+	  /* There is something pushed.  */
+	  if (backw == backw_stop)
+	    {
+	      /* The last pushed character was handled.  Continue
+		 with forward characters.  */
+	      if (idxcnt < idxmax)
+		{
+		  idx = seq->save_idx;
+		  backw_stop = ~0ul;
+		}
+	      else
+		{
+		  /* Nothing anymore.  The backward sequence ended with
+		     the last sequence in the string.  Note that len is
+		     still zero.  */
+		  idx = 0;
+		  break;
+	        }
+	    }
+	  else
+	    {
+	      /* XXX Traverse BACKW sequences from the beginning of
+		 BACKW_STOP to get the next sequence.  Is ther a quicker way
+	         to do this?  */
+	      size_t i = backw_stop;
+	      us = seq->back_us;
+	      while (i < backw)
+		{
+		  int32_t tmp = findidx (&us, -1);
+		  idx = tmp & 0xffffff;
+		  i++;
+		}
+	      --backw;
+	      us = seq->us;
+	    }
+	}
+      else
+	{
+	  backw_stop = idxmax;
+	  int32_t prev_idx = idx;
+
+	  while (*us != L('\0'))
+	    {
+	      int32_t tmp = findidx (&us, -1);
+	      unsigned char rule = tmp >> 24;
+	      prev_idx = idx;
+	      idx = tmp & 0xffffff;
+	      idxcnt = idxmax++;
+
+	      /* Save the rule for the first sequence.  */
+	      if (__glibc_unlikely (idxcnt == 0))
+	        seq->rule = rule;
+
+	      if ((rulesets[rule * nrules + pass]
+		   & sort_backward) == 0)
+		/* No more backward characters to push.  */
+		break;
+	      ++idxcnt;
+	    }
+
+	  if (backw_stop >= idxcnt)
+	    {
+	      /* No sequence at all or just one.  */
+	      if (idxcnt == idxmax || backw_stop > idxcnt)
+		/* Note that len is still zero.  */
+		break;
+
+	      backw_stop = ~0ul;
+	    }
+	  else
+	    {
+	      /* We pushed backward sequences.  If the stream ended with the
+		 backward sequence, then we process the last sequence we
+		 found.  Otherwise we process the sequence before the last
+		 one since the last one was a forward sequence.  */
+	      seq->back_us = seq->us;
+	      seq->us = us;
+	      backw = idxcnt;
+	      if (idxmax > idxcnt)
+		{
+		  backw--;
+		  seq->save_idx = idx;
+		  idx = prev_idx;
+		}
+	      if (backw > backw_stop)
+		backw--;
+	    }
+	}
+
+      len = weights[idx++];
+      /* Skip over indices of previous levels.  */
+      for (int i = 0; i < pass; i++)
+	{
+	  idx += len;
+	  len = weights[idx];
+	  idx++;
+	}
+    }
+
+  /* Update the structure.  */
+  seq->val = val;
+  seq->len = len;
+  seq->backw_stop = backw_stop;
+  seq->backw = backw;
+  seq->idxcnt = idxcnt;
+  seq->idxmax = idxmax;
+  seq->us = us;
+  seq->idx = idx;
+}
+
+/* Compare two sequences.  This version does not use the index and rules
+   cache.  */
+static int
+do_compare_nocache (coll_seq *seq1, coll_seq *seq2, int position,
+		    const USTRING_TYPE *weights)
+{
+  int seq1len = seq1->len;
+  int seq2len = seq2->len;
+  size_t val1 = seq1->val;
+  size_t val2 = seq2->val;
+  int idx1 = seq1->idx;
+  int idx2 = seq2->idx;
+  int result = 0;
+
+  /* Test for position if necessary.  */
+  if (position && val1 != val2)
+    {
+      result = val1 > val2 ? 1 : -1;
+      goto out;
+    }
+
+  /* Compare the two sequences.  */
+  do
+    {
+      if (weights[idx1] != weights[idx2])
+	{
+	  /* The sequences differ.  */
+	  result = weights[idx1] - weights[idx2];
+	  goto out;
+	}
+
+      /* Increment the offsets.  */
+      ++idx1;
+      ++idx2;
+
+      --seq1len;
+      --seq2len;
+    }
+  while (seq1len > 0 && seq2len > 0);
+
+  if (position && seq1len != seq2len)
+    result = seq1len - seq2len;
+
+out:
+  seq1->len = seq1len;
+  seq2->len = seq2len;
+  seq1->idx = idx1;
+  seq2->idx = idx2;
+  return result;
+}
+
+/* Compare two sequences using the index cache.  */
 static int
 do_compare (coll_seq *seq1, coll_seq *seq2, int position,
 	    const USTRING_TYPE *weights)
 {
   int seq1len = seq1->len;
   int seq2len = seq2->len;
-  int val1 = seq1->val;
-  int val2 = seq2->val;
+  size_t val1 = seq1->val;
+  size_t val2 = seq2->val;
   int32_t *idx1arr = seq1->idxarr;
   int32_t *idx2arr = seq2->idxarr;
   int idx1now = seq1->idxnow;
@@ -245,7 +435,7 @@
   /* Test for position if necessary.  */
   if (position && val1 != val2)
     {
-      result = val1 - val2;
+      result = val1 > val2 ? 1 : -1;
       goto out;
     }
 
@@ -334,57 +524,70 @@
   memset (&seq1, 0, sizeof (seq1));
   seq2 = seq1;
 
-  /* We need the elements of the strings as unsigned values since they
-     are used as indices.  */
-  seq1.us = (const USTRING_TYPE *) s1;
-  seq2.us = (const USTRING_TYPE *) s2;
-
-  if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1)))
+  size_t size_max = SIZE_MAX / (sizeof (int32_t) + 1);
+
+  if (MIN (s1len, s2len) > size_max
+      || MAX (s1len, s2len) > size_max - MIN (s1len, s2len))
+    {
+      /* If the strings are long enough to cause overflow in the size request,
+         then skip the allocation and proceed with the non-cached routines.  */
+    }
+  else if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1)))
     {
       seq1.idxarr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1));
-      seq2.idxarr = &seq1.idxarr[s1len];
-      seq1.rulearr = (unsigned char *) &seq2.idxarr[s2len];
-      seq2.rulearr = &seq1.rulearr[s1len];
-
-      if (seq1.idxarr == NULL)
-	/* No memory.  Well, go with the stack then.
-
-	   XXX Once this implementation is stable we will handle this
-	   differently.  Instead of precomputing the indices we will
-	   do this in time.  This means, though, that this happens for
-	   every pass again.  */
-	goto try_stack;
-      use_malloc = true;
+
+      /* If we failed to allocate memory, we leave everything as NULL so that
+	 we use the nocache version of traversal and comparison functions.  */
+      if (seq1.idxarr != NULL)
+	{
+	  seq2.idxarr = &seq1.idxarr[s1len];
+	  seq1.rulearr = (unsigned char *) &seq2.idxarr[s2len];
+	  seq2.rulearr = &seq1.rulearr[s1len];
+	  use_malloc = true;
+	}
     }
   else
     {
-    try_stack:
       seq1.idxarr = (int32_t *) alloca (s1len * sizeof (int32_t));
       seq2.idxarr = (int32_t *) alloca (s2len * sizeof (int32_t));
       seq1.rulearr = (unsigned char *) alloca (s1len);
       seq2.rulearr = (unsigned char *) alloca (s2len);
     }
 
-  seq1.rulearr[0] = 0;
+  int rule = 0;
 
   /* Cache values in the first pass and if needed, use them in subsequent
      passes.  */
   for (int pass = 0; pass < nrules; ++pass)
     {
       seq1.idxcnt = 0;
+      seq1.idx = 0;
+      seq2.idx = 0;
       seq1.backw_stop = ~0ul;
       seq1.backw = ~0ul;
       seq2.idxcnt = 0;
       seq2.backw_stop = ~0ul;
       seq2.backw = ~0ul;
 
+      /* We need the elements of the strings as unsigned values since they
+	 are used as indices.  */
+      seq1.us = (const USTRING_TYPE *) s1;
+      seq2.us = (const USTRING_TYPE *) s2;
+
       /* We assume that if a rule has defined `position' in one section
 	 this is true for all of them.  */
-      int position = rulesets[seq1.rulearr[0] * nrules + pass] & sort_position;
+      int position = rulesets[rule * nrules + pass] & sort_position;
 
       while (1)
 	{
-	  if (pass == 0)
+	  if (__glibc_unlikely (seq1.idxarr == NULL))
+	    {
+	      get_next_seq_nocache (&seq1, nrules, rulesets, weights, table,
+				    extra, indirect, pass);
+	      get_next_seq_nocache (&seq2, nrules, rulesets, weights, table,
+				    extra, indirect, pass);
+	    }
+	  else if (pass == 0)
 	    {
 	      get_next_seq (&seq1, nrules, rulesets, weights, table, extra,
 			    indirect);
@@ -411,10 +614,18 @@
 	      goto free_and_return;
 	    }
 
-	  result = do_compare (&seq1, &seq2, position, weights);
+	  if (__glibc_unlikely (seq1.idxarr == NULL))
+	    result = do_compare_nocache (&seq1, &seq2, position, weights);
+	  else
+	    result = do_compare (&seq1, &seq2, position, weights);
 	  if (result != 0)
 	    goto free_and_return;
 	}
+
+      if (__glibc_likely (seq1.rulearr != NULL))
+	rule = seq1.rulearr[0];
+      else
+	rule = seq1.rule;
     }
 
   /* Free the memory if needed.  */

Added: fsf/trunk/libc/string/tst-strcoll-overflow.c
==============================================================================
--- fsf/trunk/libc/string/tst-strcoll-overflow.c (added)
+++ fsf/trunk/libc/string/tst-strcoll-overflow.c Tue Sep 24 00:02:14 2013
@@ -1,0 +1,61 @@
+/* Copyright (C) 2013 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <locale.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Verify that strcoll does not crash for large strings for which it cannot
+   cache weight lookup results.  The size is large enough to cause integer
+   overflows on 32-bit as well as buffer overflows on 64-bit.  The test should
+   work reasonably reliably when overcommit is disabled, but it obviously
+   depends on how much memory the system has.  There's a limitation to this
+   test in that it does not run to completion.  Actually collating such a
+   large string can take days and we can't have xcheck running that long.  For
+   that reason, we run the test for about 5 minutes and then assume that
+   everything is fine if there are no crashes.  */
+#define SIZE 0x40000000ul
+
+int
+do_test (void)
+{
+  if (setlocale (LC_COLLATE, "en_GB.UTF-8") == NULL)
+    {
+      puts ("setlocale failed, cannot test for overflow");
+      return 0;
+    }
+
+  char *p = malloc (SIZE);
+
+  if (p == NULL)
+    {
+      puts ("could not allocate memory");
+      return 1;
+    }
+
+  memset (p, 'x', SIZE - 1);
+  p[SIZE - 1] = 0;
+  printf ("%d\n", strcoll (p, p));
+  return 0;
+}
+
+#define TIMEOUT 300
+#define EXPECTED_SIGNAL SIGALRM
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

Modified: fsf/trunk/libc/sysdeps/generic/stackguard-macros.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/stackguard-macros.h (original)
+++ fsf/trunk/libc/sysdeps/generic/stackguard-macros.h Tue Sep 24 00:02:14 2013
@@ -2,3 +2,11 @@
 
 extern uintptr_t __stack_chk_guard;
 #define STACK_CHK_GUARD __stack_chk_guard
+
+#ifdef PTRGUARD_LOCAL
+extern uintptr_t __pointer_chk_guard_local;
+# define POINTER_CHK_GUARD __pointer_chk_guard_local
+#else
+extern uintptr_t __pointer_chk_guard;
+# define POINTER_CHK_GUARD __pointer_chk_guard
+#endif

Modified: fsf/trunk/libc/sysdeps/i386/stackguard-macros.h
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/stackguard-macros.h (original)
+++ fsf/trunk/libc/sysdeps/i386/stackguard-macros.h Tue Sep 24 00:02:14 2013
@@ -2,3 +2,11 @@
 
 #define STACK_CHK_GUARD \
   ({ uintptr_t x; asm ("movl %%gs:0x14, %0" : "=r" (x)); x; })
+
+#define POINTER_CHK_GUARD \
+  ({							\
+     uintptr_t x;					\
+     asm ("movl %%gs:%c1, %0" : "=r" (x)		\
+	  : "i" (offsetof (tcbhead_t, pointer_guard)));	\
+     x;							\
+   })

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc32/stackguard-macros.h

[... 118 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits