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

[commits] r14464 - in /fsf/trunk/libc: ./ crypt/ iconvdata/ inet/ nis/nss_nisplus/ nptl/sysdeps/pthread/ nptl/sysdeps/x86_64/ posix/ r...



Author: eglibc
Date: Thu Jul  7 00:02:31 2011
New Revision: 14464

Log:
Import glibc-mainline for 2011-07-07

Added:
    fsf/trunk/libc/string/test-strncat.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/crypt/sha512.h
    fsf/trunk/libc/iconvdata/johab.c
    fsf/trunk/libc/inet/getnetgrent_r.c
    fsf/trunk/libc/nis/nss_nisplus/nisplus-ethers.c
    fsf/trunk/libc/nis/nss_nisplus/nisplus-spwd.c
    fsf/trunk/libc/nptl/sysdeps/pthread/configure
    fsf/trunk/libc/nptl/sysdeps/x86_64/configure
    fsf/trunk/libc/posix/getopt.c
    fsf/trunk/libc/resolv/res_comp.c
    fsf/trunk/libc/stdlib/strtod_l.c
    fsf/trunk/libc/string/Makefile
    fsf/trunk/libc/sysdeps/s390/s390-64/Makefile
    fsf/trunk/libc/sysdeps/unix/sysv/linux/configure
    fsf/trunk/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/pathconf.c
    fsf/trunk/libc/sysdeps/x86_64/elf/configure

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Jul  7 00:02:31 2011
@@ -1,3 +1,55 @@
+2011-07-07  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12868]
+	* sysdeps/unix/sysv/linux/linux_fsinfo.h: Define Lustre constants.
+	* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
+	Handle Lustre.
+	* sysdeps/unix/sysv/linux/pathconf.c (__statfs_link_max): Likewise.
+	(__statfs_filesize_max): Likewise.
+	Patch mostly by Andreas Dilger <adilger@xxxxxxxxxxxxx>.
+
+2011-07-05  Andreas Jaeger  <aj@xxxxxxx>
+
+	* resolv/res_comp.c (dn_skipname): Remove unused variable.
+
+2011-07-06  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_setspent): Honour the
+	`status' variable.
+	* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_setetherent):
+	Likewise.
+
+2011-07-04  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* Makefile (strop-tests): Add strncat.
+	* string/test-strncat.c: New file.
+
+2011-06-30  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	* iconvdata/johab.c: Don't inline `johab_sym_hanja_to_ucs' function.
+
+2011-06-21  Andreas Jaeger  <aj@xxxxxxx>
+
+	* sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules):
+	Copy rule from iconvdata/Makefile.
+
+2011-07-06  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12922]
+	* posix/getopt.c (_getopt_internal_r): When "W;" is in short options
+	but no long options are defined, just return 'W'.
+
+2011-06-22  Marek Polacek  <mpolacek@xxxxxxxxxx>
+
+	[BZ #9696]
+	* stdlib/strtod_l.c (round_and_return): Set ERANGE instead of EDOM.
+
+2011-07-06  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* inet/getnetgrent_r.c (internal_getnetgrent_r): Fix check for known
+	netgroups to read.
+	(innetgr): Likewise.
+
 2011-07-05  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	* config.make.in (install_root): Default to $(DESTDIR).

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Thu Jul  7 00:02:31 2011
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-6-28
+GNU C Library NEWS -- history of user-visible changes.  2011-7-6
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -9,7 +9,7 @@
 
 * The following bugs are resolved with this release:
 
-  12874, 12885, 12907, 12935
+  9696, 12868, 12874, 12885, 12907, 12922, 12935
 
 * New program pldd to list loaded object of a process
   Implemented by Ulrich Drepper.

Modified: fsf/trunk/libc/crypt/sha512.h
==============================================================================
--- fsf/trunk/libc/crypt/sha512.h (original)
+++ fsf/trunk/libc/crypt/sha512.h Thu Jul  7 00:02:31 2011
@@ -39,13 +39,8 @@
 # define USE_TOTAL128
     unsigned int total128 __attribute__ ((__mode__ (TI)));
 #endif
-#if BYTE_ORDER == LITTLE_ENDIAN
-# define TOTAL128_low 0
-# define TOTAL128_high 1
-#else
-# define TOTAL128_low 1
-# define TOTAL128_high 0
-#endif
+#define TOTAL128_low (1 - (BYTE_ORDER == LITTLE_ENDIAN))
+#define TOTAL128_high (BYTE_ORDER == LITTLE_ENDIAN)
     uint64_t total[2];
   };
   uint64_t buflen;

Modified: fsf/trunk/libc/iconvdata/johab.c
==============================================================================
--- fsf/trunk/libc/iconvdata/johab.c (original)
+++ fsf/trunk/libc/iconvdata/johab.c Thu Jul  7 00:02:31 2011
@@ -1,5 +1,5 @@
 /* Mapping tables for JOHAB handling.
-   Copyright (C) 1998, 1999, 2000-2002, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1998-2002, 2007, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jungshik Shin <jshin@xxxxxxxxxxxxxxxxx>
    and Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -93,7 +93,7 @@
 
 static const int mid_to_bit[21] =
 {
-          0x0060, 0x0080, 0x00a0, 0x00c0, 0x00e0,
+	  0x0060, 0x0080, 0x00a0, 0x00c0, 0x00e0,
   0x0140, 0x0160, 0x0180, 0x01a0, 0x01c0, 0x1e0,
   0x0240, 0x0260, 0x0280, 0x02a0, 0x02c0, 0x02e0,
   0x0340, 0x0360, 0x0380, 0x03a0
@@ -132,7 +132,7 @@
 };
 
 
-static inline uint32_t
+static uint32_t
 johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2)
 {
   if (idx <= 0xdefe)
@@ -255,7 +255,7 @@
 						   + ch2 - (ch2 > 0x90	      \
 							    ? 0x43 : 0x31)];  \
 		       else						      \
-		         ch = __ksc5601_hanja_to_ucs[(ch - 0xe0) *192	      \
+			 ch = __ksc5601_hanja_to_ucs[(ch - 0xe0) *192	      \
 						     + ch2 -  (ch2 > 0x90     \
 							       ?0x43 : 0x31)];\
 		    */							      \

Modified: fsf/trunk/libc/inet/getnetgrent_r.c
==============================================================================
--- fsf/trunk/libc/inet/getnetgrent_r.c (original)
+++ fsf/trunk/libc/inet/getnetgrent_r.c Thu Jul  7 00:02:31 2011
@@ -279,6 +279,11 @@
 	       namep = namep->next)
 	    if (strcmp (datap->val.group, namep->name) == 0)
 	      break;
+	  if (namep == NULL)
+	    for (namep = datap->needed_groups; namep != NULL;
+		 namep = namep->next)
+	      if (strcmp (datap->val.group, namep->name) == 0)
+		break;
 	  if (namep != NULL)
 	    /* Really ignore.  */
 	    continue;
@@ -384,6 +389,11 @@
 			   namep = namep->next)
 			if (strcmp (entry.val.group, namep->name) == 0)
 			  break;
+		      if (namep == NULL)
+			for (namep = entry.needed_groups; namep != NULL;
+			     namep = namep->next)
+			  if (strcmp (entry.val.group, namep->name) == 0)
+			    break;
 		      if (namep == NULL
 			  && strcmp (netgroup, entry.val.group) != 0)
 			{

Modified: fsf/trunk/libc/nis/nss_nisplus/nisplus-ethers.c
==============================================================================
--- fsf/trunk/libc/nis/nss_nisplus/nisplus-ethers.c (original)
+++ fsf/trunk/libc/nis/nss_nisplus/nisplus-ethers.c Thu Jul  7 00:02:31 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,2000-2003,2005,2006,2007
+/* Copyright (C) 1997,1998,2000-2003,2005,2006,2007,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@xxxxxxx>, 1997.
@@ -40,10 +40,10 @@
 
 
 #define NISENTRYVAL(idx, col, res) \
-        (NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
+	(NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
 
 #define NISENTRYLEN(idx, col, res) \
-        (NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
+	(NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
 static int
 _nss_nisplus_parse_etherent (nis_result *result, struct etherent *ether,
@@ -136,7 +136,7 @@
 
   __libc_lock_unlock (lock);
 
-  return NSS_STATUS_SUCCESS;
+  return status;
 }
 
 enum nss_status

Modified: fsf/trunk/libc/nis/nss_nisplus/nisplus-spwd.c
==============================================================================
--- fsf/trunk/libc/nis/nss_nisplus/nisplus-spwd.c (original)
+++ fsf/trunk/libc/nis/nss_nisplus/nisplus-spwd.c Thu Jul  7 00:02:31 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2007
+/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2007, 2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@xxxxxxxxxxxxxxxxxxx>, 1997.
@@ -57,7 +57,7 @@
 
   __libc_lock_unlock (lock);
 
-  return NSS_STATUS_SUCCESS;
+  return status;
 }
 
 enum nss_status
@@ -91,7 +91,7 @@
 	{
 	  saved_res = NULL;
 
-          if (pwd_tablename_val == NULL)
+	  if (pwd_tablename_val == NULL)
 	    {
 	      enum nss_status status = _nss_pwd_create_tablename (errnop);
 

Modified: fsf/trunk/libc/nptl/sysdeps/pthread/configure
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/pthread/configure (original)
+++ fsf/trunk/libc/nptl/sysdeps/pthread/configure Thu Jul  7 00:02:31 2011
@@ -122,7 +122,7 @@
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -148,7 +148,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forced unwind support" >&5
 $as_echo_n "checking for forced unwind support... " >&6; }
-if test "${libc_cv_forced_unwind+set}" = set; then :
+if ${libc_cv_forced_unwind+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -182,7 +182,7 @@
   CFLAGS="$CFLAGS -Werror -fexceptions"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C cleanup handling" >&5
 $as_echo_n "checking for C cleanup handling... " >&6; }
-if test "${libc_cv_c_cleanup+set}" = set; then :
+if ${libc_cv_c_cleanup+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext

Modified: fsf/trunk/libc/nptl/sysdeps/x86_64/configure
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/x86_64/configure (original)
+++ fsf/trunk/libc/nptl/sysdeps/x86_64/configure Thu Jul  7 00:02:31 2011
@@ -85,7 +85,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for .cfi_personality and .cfi_lsda pseudo-ops" >&5
 $as_echo_n "checking for .cfi_personality and .cfi_lsda pseudo-ops... " >&6; }
-if test "${libc_cv_asm_cfi_personality+set}" = set; then :
+if ${libc_cv_asm_cfi_personality+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     cat > conftest.s <<EOF

Modified: fsf/trunk/libc/posix/getopt.c
==============================================================================
--- fsf/trunk/libc/posix/getopt.c (original)
+++ fsf/trunk/libc/posix/getopt.c Thu Jul  7 00:02:31 2011
@@ -871,6 +871,9 @@
     /* Convenience. Treat POSIX -W foo same as long option --foo */
     if (temp[0] == 'W' && temp[1] == ';')
       {
+	if (longopts == NULL)
+	  goto no_longs;
+
 	char *nameend;
 	const struct option *p;
 	const struct option *pfound = NULL;
@@ -1086,8 +1089,10 @@
 	      }
 	    return pfound->val;
 	  }
-	  d->__nextchar = NULL;
-	  return 'W';	/* Let the application handle it.   */
+
+      no_longs:
+	d->__nextchar = NULL;
+	return 'W';	/* Let the application handle it.   */
       }
     if (temp[1] == ':')
       {

Modified: fsf/trunk/libc/resolv/res_comp.c
==============================================================================
--- fsf/trunk/libc/resolv/res_comp.c (original)
+++ fsf/trunk/libc/resolv/res_comp.c Thu Jul  7 00:02:31 2011
@@ -152,7 +152,7 @@
 
 int
 res_hnok(const char *dn) {
-	int ppch = '\0', pch = PERIOD, ch = *dn++;
+	int pch = PERIOD, ch = *dn++;
 
 	while (ch != '\0') {
 		int nch = *dn++;
@@ -169,7 +169,7 @@
 			if (!middlechar(ch))
 				return (0);
 		}
-		ppch = pch, pch = ch, ch = nch;
+		pch = ch, ch = nch;
 	}
 	return (1);
 }

Modified: fsf/trunk/libc/stdlib/strtod_l.c
==============================================================================
--- fsf/trunk/libc/stdlib/strtod_l.c (original)
+++ fsf/trunk/libc/stdlib/strtod_l.c Thu Jul  7 00:02:31 2011
@@ -1,5 +1,5 @@
 /* Convert string representing a number to float value, using given locale.
-   Copyright (C) 1997,1998,2002,2004,2005,2006,2007,2008,2009,2010
+   Copyright (C) 1997,1998,2002,2004,2005,2006,2007,2008,2009,2010,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -185,7 +185,7 @@
 
       if (shift > MANT_DIG)
 	{
-	  __set_errno (EDOM);
+	  __set_errno (ERANGE);
 	  return 0.0;
 	}
 

Modified: fsf/trunk/libc/string/Makefile
==============================================================================
--- fsf/trunk/libc/string/Makefile (original)
+++ fsf/trunk/libc/string/Makefile Thu Jul  7 00:02:31 2011
@@ -49,7 +49,8 @@
 strop-tests	:= memchr memcmp memcpy memmove mempcpy memset memccpy	\
 		   stpcpy stpncpy strcat strchr strcmp strcpy strcspn	\
 		   strlen strncmp strncpy strpbrk strrchr strspn memmem	\
-		   strstr strcasestr strnlen strcasecmp strncasecmp
+		   strstr strcasestr strnlen strcasecmp strncasecmp	\
+		   strncat
 tests		:= tester inl-tester noinl-tester testcopy test-ffs	\
 		   tst-strlen stratcliff tst-svc tst-inlcall		\
 		   bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap	\

Added: fsf/trunk/libc/string/test-strncat.c
==============================================================================
--- fsf/trunk/libc/string/test-strncat.c (added)
+++ fsf/trunk/libc/string/test-strncat.c Thu Jul  7 00:02:31 2011
@@ -1,0 +1,298 @@
+/* Test and measure strncat functions.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+   Contributed by Intel Corporation.
+
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define TEST_MAIN
+#include "test-string.h"
+
+typedef char *(*proto_t) (char *, const char *, size_t);
+char *stupid_strncat (char *, const char *, size_t);
+char *simple_strncat (char *, const char *, size_t);
+
+IMPL (stupid_strncat, 0)
+IMPL (strncat, 2)
+
+char *
+stupid_strncat (char *dst, const char *src, size_t n)
+{
+  char *ret = dst;
+  while (*dst++ != '\0');
+  --dst;
+  while (n--)
+    if ( (*dst++ = *src++) == '\0')
+      return ret;
+  *dst = '\0';
+  return ret;
+}
+
+static void
+do_one_test (impl_t *impl, char *dst, const char *src, size_t n)
+{
+  size_t k = strlen (dst);
+  if (CALL (impl, dst, src, n) != dst)
+    {
+      error (0, 0, "Wrong result in function %s %p != %p", impl->name,
+	     CALL (impl, dst, src, n), dst);
+      ret = 1;
+      return;
+    }
+
+  size_t len = strlen (src);
+  if (memcmp (dst + k, src, len + 1 > n ? n : len + 1) != 0)
+    {
+      error (0, 0, "Incorrect cancatination in function %s",
+	     impl->name);
+      ret = 1;
+      return;
+    }
+  if (n < len && dst[k + n] != '\0')
+    {
+      error (0, 0, "There is no zero in the end of output string in %s",
+	     impl->name);
+      ret = 1;
+      return;
+    }
+  if (HP_TIMING_AVAIL)
+    {
+      hp_timing_t start __attribute ((unused));
+      hp_timing_t stop __attribute ((unused));
+      hp_timing_t best_time = ~ (hp_timing_t) 0;
+      size_t i;
+
+      for (i = 0; i < 32; ++i)
+	{
+	  dst[k] = '\0';
+	  HP_TIMING_NOW (start);
+	  CALL (impl, dst, src, n);
+	  HP_TIMING_NOW (stop);
+	  HP_TIMING_BEST (best_time, start, stop);
+	}
+
+      printf ("\t%zd", (size_t) best_time);
+    }
+}
+
+static void
+do_test (size_t align1, size_t align2, size_t len1, size_t len2,
+	 size_t n, int max_char)
+{
+  size_t i;
+  char *s1, *s2;
+
+  align1 &= 7;
+  if (align1 + len1 >= page_size)
+    return;
+  if (align1 + n > page_size)
+    return;
+  align2 &= 7;
+  if (align2 + len1 + len2 >= page_size)
+    return;
+  if (align2 + len1 + n > page_size)
+    return;
+  s1 = (char *) (buf1 + align1);
+  s2 = (char *) (buf2 + align2);
+
+  for (i = 0; i < len1; ++i)
+    s1[i] = 32 + 23 * i % (max_char - 32);
+  s1[len1] = '\0';
+
+  for (i = 0; i < len2; i++)
+    s2[i] = 32 + 23 * i % (max_char - 32);
+
+  if (HP_TIMING_AVAIL)
+    printf ("Length %4zd/%4zd, alignment %2zd/%2zd, N %4zd:",
+	    len1, len2, align1, align2, n);
+
+  FOR_EACH_IMPL (impl, 0)
+    {
+      s2[len2] = '\0';
+      do_one_test (impl, s2, s1, n);
+    }
+
+  if (HP_TIMING_AVAIL)
+    putchar ('\n');
+}
+
+static void
+do_random_tests (void)
+{
+  size_t i, j, n, align1, align2, len1, len2, N;
+  unsigned char *p1 = buf1 + page_size - 512;
+  unsigned char *p2 = buf2 + page_size - 512;
+  unsigned char *res;
+  fprintf (stdout, "Number of iterations in random test = %zd\n",
+	   ITERATIONS);
+  for (n = 0; n < ITERATIONS; n++)
+    {
+      N = random () & 255;
+      align1 = random () & 31;
+      if (random () & 1)
+	align2 = random () & 31;
+      else
+	align2 = align1 + (random () & 24);
+      len1 = random () & 511;
+      if (len1 + align2 > 512)
+	len2 = random () & 7;
+      else
+	len2 = (512 - len1 - align2) * (random () & (1024 * 1024 - 1))
+	  / (1024 * 1024);
+      j = align1;
+      if (align2 + len2 > j)
+	j = align2 + len2;
+      if (len1 + j >= 511)
+	len1 = 510 - j - (random () & 7);
+      if (len1 >= 512)
+	len1 = 0;
+      if (align1 + len1 < 512 - 8)
+	{
+	  j = 510 - align1 - len1 - (random () & 31);
+	  if (j > 0 && j < 512)
+	    align1 += j;
+	}
+      j = len1 + align1 + 64;
+      if (j > 512)
+	j = 512;
+      for (i = 0; i < j; i++)
+	{
+	  if (i == len1 + align1)
+	    p1[i] = 0;
+	  else
+	    {
+	      p1[i] = random () & 255;
+	      if (i >= align1 && i < len1 + align1 && !p1[i])
+		p1[i] = (random () & 127) + 3;
+	    }
+	}
+      for (i = 0; i < len2; i++)
+	{
+	  buf1[i] = random () & 255;
+	  if (!buf1[i])
+	    buf1[i] = (random () & 127) + 3;
+	}
+      buf1[len2] = 0;
+
+      FOR_EACH_IMPL (impl, 1)
+	{
+	  memset (p2 - 64, '\1', align2 + 64);
+	  memset (p2 + align2 + len2 + 1, '\1', 512 - align2 - len2 - 1);
+	  memcpy (p2 + align2, buf1, len2 + 1);
+	  res = (unsigned char *) CALL (impl, (char *) (p2 + align2),
+					(char *) (p1 + align1), N);
+	  if (res != p2 + align2)
+	    {
+	      error (0, 0, "Iteration %zd - wrong result in function %s "
+		     "(%zd, %zd, %zd, %zd, %zd) %p != %p",
+		     n, impl->name, align1, align2, len1, len2, N,
+		     res, p2 + align2);
+	      ret = 1;
+	    }
+	  for (j = 0; j < align2 + 64; ++j)
+	    {
+	      if (p2[j - 64] != '\1')
+		{
+		  error (0, 0, "Iteration %zd - garbage before dst, %s "
+			 "%zd, %zd, %zd, %zd, %zd)",
+			 n, impl->name, align1, align2, len1, len2, N);
+		  ret = 1;
+		  break;
+		}
+	    }
+	  if (memcmp (p2 + align2, buf1, len2))
+	    {
+	      error (0, 0, "Iteration %zd - garbage in string before, %s "
+		     "(%zd, %zd, %zd, %zd, %zd)",
+		     n, impl->name, align1, align2, len1, len2, N);
+	      ret = 1;
+	    }
+
+	  if ((len1 + 1) > N)
+	    j = align2 + N + 1 + len2;
+	  else
+	    j = align2 + len1 + 1 + len2;
+	  for (; j < 512; ++j)
+	    {
+	      if (p2[j] != '\1')
+		{
+		  error (0, 0, "Iteration %zd - garbage after, %s "
+			 "(%zd, %zd, %zd, %zd, %zd)",
+			 n, impl->name, align1, align2, len1, len2, N);
+		  ret = 1;
+		  break;
+		}
+	    }
+	  if (len1 + 1 > N)
+	    {
+	      if (p2[align2 + N + len2] != '\0')
+		{
+		  error (0, 0, "Iteration %zd - there is no zero at the "
+			 "end of output string, %s (%zd, %zd, %zd, %zd, %zd)",
+			 n, impl->name, align1, align2, len1, len2, N);
+		  ret = 1;
+		}
+	    }
+	  if (memcmp (p1 + align1, p2 + align2 + len2,
+		      (len1 + 1) > N ? N : len1 + 1))
+	    {
+	      error (0, 0, "Iteration %zd - different strings, %s "
+		     "(%zd, %zd, %zd, %zd, %zd)",
+		     n, impl->name, align1, align2, len1, len2, N);
+	      ret = 1;
+	    }
+	}
+    }
+}
+
+int
+main (void)
+{
+  size_t i, n;
+
+  test_init ();
+
+  printf ("%28s", "");
+  FOR_EACH_IMPL (impl, 0)
+    printf ("\t%s", impl->name);
+  putchar ('\n');
+
+  for (n = 2; n <= 2048; n*=4)
+    {
+      do_test (0, 2, 2, 2, n, 127);
+      do_test (0, 0, 4, 4, n, 127);
+      do_test (4, 0, 4, 4, n, 255);
+      do_test (0, 0, 8, 8, n, 127);
+      do_test (0, 8, 8, 8, n, 127);
+
+      for (i = 1; i < 8; ++i)
+	{
+	  do_test (0, 0, 8 << i, 8 << i, n, 127);
+	  do_test (8 - i, 2 * i, 8 << i, 8 << i, n, 127);
+	  do_test (0, 0, 8 << i, 2 << i, n, 127);
+	  do_test (8 - i, 2 * i, 8 << i, 2 << i, n, 127);
+	}
+
+      for (i = 1; i < 8; ++i)
+	{
+	  do_test (i, 2 * i, 8 << i, 1, n, 127);
+	  do_test (2 * i, i, 8 << i, 1, n, 255);
+	  do_test (i, i, 8 << i, 10, n, 127);
+	}
+    }
+
+  do_random_tests ();
+  return ret;
+}

Modified: fsf/trunk/libc/sysdeps/s390/s390-64/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/s390-64/Makefile (original)
+++ fsf/trunk/libc/sysdeps/s390/s390-64/Makefile Thu Jul  7 00:02:31 2011
@@ -74,5 +74,17 @@
 
 $(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules-s390 $(+force)
 	$(do-install)
+ifeq (no,$(cross-compiling))
+# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
+# if this libc has more gconv modules than the previously installed one.
+	if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
+	   LC_ALL=C LANGUAGE=C \
+	   $(common-objpfx)elf/ld.so --library-path $(rpath-link) \
+	   $(common-objpfx)iconv/iconvconfig \
+	     $(addprefix --prefix=,$(install_root)); \
+	fi
+else
+	@echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
+endif
 
 endif

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/configure (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/configure Thu Jul  7 00:02:31 2011
@@ -112,7 +112,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -175,7 +175,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -242,7 +242,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5
 $as_echo_n "checking installed Linux kernel header files... " >&6; }
-if test "${libc_cv_linux2010+set}" = set; then :
+if ${libc_cv_linux2010+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/internal_statvfs.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/internal_statvfs.c Thu Jul  7 00:02:31 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2006, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2006, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
 
@@ -114,6 +114,9 @@
       break;
     case CGROUP_SUPER_MAGIC:
       fsname = "cgroup";
+      break;
+    case LUSTRE_SUPER_MAGIC:
+      fsname = "lustre";
       break;
     }
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h Thu Jul  7 00:02:31 2011
@@ -1,5 +1,5 @@
 /* Constants from kernel header for various FSes.
-   Copyright (C) 1998-2003,2005,2010 Free Software Foundation, Inc.
+   Copyright (C) 1998-2003,2005,2010,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -83,6 +83,9 @@
 /* Constant that identifies the `logfs' filesystem.  */
 #define LOGFS_MAGIC_U32		0xc97e8168u
 
+/* Constant that identifies the `lustre' filesystem.  */
+#define LUSTRE_SUPER_MAGIC	0x0BD00BD0
+
 /* Constants that identify the `minix2' filesystem.  */
 #define MINIX2_SUPER_MAGIC	0x2468
 #define MINIX2_SUPER_MAGIC2	0x2478
@@ -150,6 +153,8 @@
 /* Maximum link counts.  */
 #define COH_LINK_MAX		10000
 #define EXT2_LINK_MAX		32000
+#define EXT4_LINK_MAX		65000
+#define LUSTRE_LINK_MAX		EXT4_LINK_MAX
 #define MINIX2_LINK_MAX		65530
 #define MINIX_LINK_MAX		250
 #define REISERFS_LINK_MAX	64535

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/pathconf.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/pathconf.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/pathconf.c Thu Jul  7 00:02:31 2011
@@ -121,6 +121,9 @@
     case XFS_SUPER_MAGIC:
       return XFS_LINK_MAX;
 
+    case LUSTRE_SUPER_MAGIC:
+      return LUSTRE_LINK_MAX;
+
     default:
       return LINUX_LINK_MAX;
     }
@@ -157,6 +160,7 @@
     case JFS_SUPER_MAGIC:
     case VXFS_SUPER_MAGIC:
     case CGROUP_SUPER_MAGIC:
+    case LUSTRE_SUPER_MAGIC:
       return 64;
 
     case MSDOS_SUPER_MAGIC:

Modified: fsf/trunk/libc/sysdeps/x86_64/elf/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/elf/configure (original)
+++ fsf/trunk/libc/sysdeps/x86_64/elf/configure Thu Jul  7 00:02:31 2011
@@ -87,7 +87,7 @@
 # Check for support of thread-local storage handling in assembler and linker.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-64 TLS support" >&5
 $as_echo_n "checking for x86-64 TLS support... " >&6; }
-if test "${libc_cv_x86_64_tls+set}" = set; then :
+if ${libc_cv_x86_64_tls+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat > conftest.s <<\EOF