GNU C Library master sources branch, release/2.11/master, updated. glibc-2.11.3-26-gb72646a

pasky@sourceware.org pasky@sourceware.org
Thu Feb 3 23:51:00 GMT 2011


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

The branch, release/2.11/master has been updated
       via  b72646ad0c414b7e81540de0a72945cd1c858668 (commit)
       via  b472343aa6febfb469b1022b4cf56d519ab30022 (commit)
       via  997c2a72c1238144e2377c92f2da207cb188f7aa (commit)
       via  77314ef9bd82f3256e8b29428b2d9062f2523567 (commit)
       via  6c1ac1d1218ca980dd910214d90faabedf16d3a2 (commit)
       via  a525e031857369e40e09e0123a75bd530565421a (commit)
       via  7928c812d37df5608048c59d44159fdaca021d4e (commit)
       via  24b5b849fd64272116b3330fd16dc34219373171 (commit)
       via  28ef97b099c02ad0cc695807c0515d70855772f9 (commit)
       via  83e15ff7c24784a35518451daaada04b88dd9c3e (commit)
       via  f369c365c2e486195b2f0c72e750abde31dcccc9 (commit)
       via  7344c4a5cb5fc37c0556179d57286caac213a013 (commit)
       via  47968f8ba80aaa0d3f1a9f55bf0876a684f880be (commit)
       via  bbfacbc5eacc1394bedce108cafff7baebecae7e (commit)
       via  2d0273a47bc4e6d27f0b94babbc0e34f9d58052a (commit)
       via  0b62ea76dbef0f0d5528bc249439dfaa0236d2be (commit)
       via  73c7d579597df7ccad82fbc231ad15b507a7db72 (commit)
       via  72215c6000487220e075d87cf57509c36b350810 (commit)
       via  d0a96954607e2975fc36bcf49ec42cfcb2105f1a (commit)
       via  17a0fde05783e137a8dc9cc4d913a8900862feae (commit)
       via  9a1af187c1be4c7893a5ea8371520899f49a6a9d (commit)
       via  216e05cac950541caea1192f81ada4de1eaf7e17 (commit)
       via  b6995df5132e877faf6a7c48e77561c92c60f011 (commit)
       via  2796cd94a85e1d6a5acb2a86e2c6cc41abc33efa (commit)
       via  837d8a0fab5ac7bbea1586e61422abce45f50393 (commit)
       via  961327556d72460efc50a30a3136e12445c9e585 (commit)
      from  7372b19962badff7e2b400385f8800b3d389f9eb (commit)

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

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

commit b72646ad0c414b7e81540de0a72945cd1c858668
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Wed Feb 2 11:50:49 2011 -0500

    Fix passing symbol value to pltexit callbacks when ld.so auditing.
    
    (cherry picked from commit 8517b15ee8e39fed11afb784fd0e249d977849f4)

diff --git a/ChangeLog b/ChangeLog
index 6f3a19b..3d76b4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-02  Ulrich Drepper  <drepper@gmail.com>
+
+	* elf/dl-runtime.c (_dl_call_pltexit): Pass correct address of the
+	function to the callback.
+	Patch partly by Jiri Olsa <jolsa@redhat.com>.
+
 2011-02-02  Andreas Schwab  <schwab@redhat.com>
 
 	* shadow/sgetspent.c: Check return value of __sgetspent_r instead
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 6847eda..ae2d05c 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -1,5 +1,5 @@
 /* On-demand PLT fixup for shared objects.
-   Copyright (C) 1995-2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1995-2009, 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
@@ -446,6 +446,7 @@ _dl_call_pltexit (struct link_map *l, ElfW(Word) reloc_arg,
 
   /* Set up the sym parameter.  */
   ElfW(Sym) sym = *defsym;
+  sym.st_value = DL_FIXUP_VALUE_ADDR (reloc_result->addr);
 
   /* Get the symbol name.  */
   const char *strtab = (const void *) D_PTR (reloc_result->bound,

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

commit b472343aa6febfb469b1022b4cf56d519ab30022
Author: Andreas Schwab <schwab@redhat.com>
Date:   Wed Feb 2 08:59:04 2011 -0500

    Fix range error handling in sgetspent.
    
    (cherry picked from commit 10a656fe33d8257531ff3e9a882d3fd7db6ce5b3)

diff --git a/ChangeLog b/ChangeLog
index b4dcd7f..6f3a19b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-02  Andreas Schwab  <schwab@redhat.com>
+
+	* shadow/sgetspent.c: Check return value of __sgetspent_r instead
+	of errno.
+
 2010-10-01  Andreas Schwab  <schwab@redhat.com>
 
 	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't discard result of
diff --git a/shadow/sgetspent.c b/shadow/sgetspent.c
index ec7f384..f3dce53 100644
--- a/shadow/sgetspent.c
+++ b/shadow/sgetspent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 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
@@ -49,8 +49,8 @@ sgetspent (const char *string)
     }
 
   while (buffer != NULL
-	 && __sgetspent_r (string, &resbuf, buffer, buffer_size, &result) != 0
-	 && errno == ERANGE)
+	 && (__sgetspent_r (string, &resbuf, buffer, buffer_size, &result)
+	     == ERANGE))
     {
       char *new_buf;
       buffer_size += BUFLEN_SPWD;

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=997c2a72c1238144e2377c92f2da207cb188f7aa

commit 997c2a72c1238144e2377c92f2da207cb188f7aa
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Wed Jan 19 15:50:05 2011 -0500

    Fix decoding of canonical name in getaddrinfo.
    
    (cherry picked from commit 86e9235918a715095a1f5bb1c1db28fae7fca22b)

diff --git a/ChangeLog b/ChangeLog
index 5a64ac8..b4dcd7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-01  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't discard result of
+	decoding ACE if AI_CANONIDN.
+
 2011-01-17  Ulrich Drepper  <drepper@gmail.com>
 
 	* io/fcntl.h: Define AT_NO_AUTOMOUNT.
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 8b7e38f..0217cc6 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -963,6 +963,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
 		   make a copy.  */
 		if (out == canon)
 		  goto make_copy;
+		canon = out;
 	      }
 	    else
 #endif

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=77314ef9bd82f3256e8b29428b2d9062f2523567

commit 77314ef9bd82f3256e8b29428b2d9062f2523567
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Mon Jan 17 18:36:39 2011 -0500

    Define AT_NO_AUTOMOUNT.
    
    (cherry picked from commit 620a05296fe3380b7441ba7720e8b25c48a8c28c)

diff --git a/ChangeLog b/ChangeLog
index 2e8f498..5a64ac8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2011-01-17  Ulrich Drepper  <drepper@gmail.com>
 
+	* io/fcntl.h: Define AT_NO_AUTOMOUNT.
+
 	* sysdeps/unix/sysv/linux/i386/bits/mman.h: Define MADV_HUGEPAGE and
 	MADV_NOHUGEPAGE.
 	* sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise.
diff --git a/io/fcntl.h b/io/fcntl.h
index 2a2a29d..50559ca 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006,2007, 2009
+/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006,2007,2009,2010,2011
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -64,6 +64,8 @@ __BEGIN_DECLS
 # define AT_REMOVEDIR		0x200	/* Remove directory instead of
 					   unlinking file.  */
 # define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
+# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
+					   traversal.  */
 # define AT_EACCESS		0x200	/* Test access permitted for
 					   effective IDs, not real IDs.  */
 #endif

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6c1ac1d1218ca980dd910214d90faabedf16d3a2

commit 6c1ac1d1218ca980dd910214d90faabedf16d3a2
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Mon Jan 17 18:35:17 2011 -0500

    Define MADV_NOHUGEPAGE.
    
    (cherry picked from commit 18ba70a559c52719fd94a713cc380514d9d19125)

diff --git a/ChangeLog b/ChangeLog
index d513c6a..2e8f498 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2011-01-17  Ulrich Drepper  <drepper@gmail.com>
 
-	* sysdeps/unix/sysv/linux/i386/bits/mman.h: Define MADV_HUGEPAGE.
+	* sysdeps/unix/sysv/linux/i386/bits/mman.h: Define MADV_HUGEPAGE and
+	MADV_NOHUGEPAGE.
 	* sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise.
 	* sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise.
 	* sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/i386/bits/mman.h b/sysdeps/unix/sysv/linux/i386/bits/mman.h
index 17d27e4..10fbd7e 100644
--- a/sysdeps/unix/sysv/linux/i386/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/i386/bits/mman.h
@@ -97,6 +97,7 @@
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
 # define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h
index 9bb0b40..8b13989 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h
@@ -96,6 +96,7 @@
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
 # define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
index 41a3180..c9b3f3f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
@@ -97,6 +97,7 @@
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
 # define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/s390/bits/mman.h b/sysdeps/unix/sysv/linux/s390/bits/mman.h
index 45ceed1..51053db 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/mman.h
@@ -95,6 +95,7 @@
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
 # define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/sh/bits/mman.h b/sysdeps/unix/sysv/linux/sh/bits/mman.h
index a69071d..2097358 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/mman.h
@@ -95,6 +95,7 @@
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
 # define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
index 781c9ee..c0ffb3a 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
@@ -98,6 +98,7 @@
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
 # define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
index ef4b3c0..9829710 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
@@ -98,6 +98,7 @@
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
 # define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 

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

commit a525e031857369e40e09e0123a75bd530565421a
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Mon Jan 17 18:24:59 2011 -0500

    Define MADV_HUGEPAGE.
    
    (cherry picked from commit 32465c3ea007065acd8ca8199f130cdf4068130d)

diff --git a/ChangeLog b/ChangeLog
index 267338c..d513c6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-01-17  Ulrich Drepper  <drepper@gmail.com>
 
+	* sysdeps/unix/sysv/linux/i386/bits/mman.h: Define MADV_HUGEPAGE.
+	* sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise.
+
 	* sysdeps/unix/sysv/linux/bits/socket.h: Define AF_CAIF, AF_ALG,
 	PF_CAIF, and PF_ALG.
 	* sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/i386/bits/mman.h b/sysdeps/unix/sysv/linux/i386/bits/mman.h
index 7ac1aff..17d27e4 100644
--- a/sysdeps/unix/sysv/linux/i386/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/i386/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/i386 version.
-   Copyright (C) 1997,2000,2003,2005,2006,2009,2010
+   Copyright (C) 1997,2000,2003,2005,2006,2009,2010,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -96,6 +96,7 @@
 # define MADV_DOFORK	  11	/* Do inherit across fork.  */
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h
index 1b278c7..9bb0b40 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/ia64 version.
-   Copyright (C) 1997,1998,2000,2003,2005,2006,2009
+   Copyright (C) 1997,1998,2000,2003,2005,2006,2009,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -95,6 +95,7 @@
 # define MADV_DOFORK	  11	/* Do inherit across fork.  */
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
index e6580f8..41a3180 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/PowerPC version.
-   Copyright (C) 1997,2000,2003,2005,2006,2008,2009
+   Copyright (C) 1997,2000,2003,2005,2006,2008,2009,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -96,6 +96,7 @@
 # define MADV_DOFORK	  11	/* Do inherit across fork.  */
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/s390/bits/mman.h b/sysdeps/unix/sysv/linux/s390/bits/mman.h
index daeafd4..45ceed1 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/s390 version.
-   Copyright (C) 2000-2003,2005,2006,2009 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003,2005,2006,2009,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -94,6 +94,7 @@
 # define MADV_DOFORK	  11	/* Do inherit across fork.  */
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/sh/bits/mman.h b/sysdeps/unix/sysv/linux/sh/bits/mman.h
index aee0011..a69071d 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/SH version.
-   Copyright (C) 1997,1999,2000,2003,2005,2006,2009
+   Copyright (C) 1997,1999,2000,2003,2005,2006,2009,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -94,6 +94,7 @@
 # define MADV_DOFORK	  11	/* Do inherit across fork.  */
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
index 71a3aa6..781c9ee 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/SPARC version.
-   Copyright (C) 1997,1999,2000,2003,2005,2006,2009
+   Copyright (C) 1997,1999,2000,2003,2005,2006,2009,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -97,6 +97,7 @@
 # define MADV_DOFORK	  11	/* Do inherit across fork.  */
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
index 6f3ad0d..ef4b3c0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
@@ -1,5 +1,6 @@
 /* Definitions for POSIX memory map interface.  Linux/x86_64 version.
-   Copyright (C) 2001,2003,2005,2006,2009,2010 Free Software Foundation, Inc.
+   Copyright (C) 2001,2003,2005,2006,2009,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
@@ -96,6 +97,7 @@
 # define MADV_DOFORK	  11	/* Do inherit across fork.  */
 # define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
 # define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7928c812d37df5608048c59d44159fdaca021d4e

commit 7928c812d37df5608048c59d44159fdaca021d4e
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Mon Jan 17 14:21:02 2011 -0500

    Add definitions for new socket protocols.
    
    (cherry picked from commit a77e8cbc394ab098aa1fc3f0a6645a38348d21ca)

diff --git a/ChangeLog b/ChangeLog
index 76eb858..267338c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-01-17  Ulrich Drepper  <drepper@gmail.com>
+
+	* sysdeps/unix/sysv/linux/bits/socket.h: Define AF_CAIF, AF_ALG,
+	PF_CAIF, and PF_ALG.
+	* sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise.
+
 2011-01-15  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #6812]
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index f23b338..d77e34b 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -1,5 +1,5 @@
 /* System-specific socket constants and types.  Linux version.
-   Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009
+   Copyright (C) 1991, 1992, 1994-2001, 2004, 2006-2010, 2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -109,7 +109,9 @@ enum __socket_type
 #define PF_ISDN		34	/* mISDN sockets.  */
 #define PF_PHONET	35	/* Phonet sockets.  */
 #define PF_IEEE802154	36	/* IEEE 802.15.4 sockets.  */
-#define	PF_MAX		37	/* For now..  */
+#define PF_CAIF		37	/* CAIF sockets.  */
+#define PF_ALG		38	/* Algorithm sockets.  */
+#define	PF_MAX		39	/* For now..  */
 
 /* Address families.  */
 #define	AF_UNSPEC	PF_UNSPEC
@@ -150,6 +152,8 @@ enum __socket_type
 #define AF_ISDN		PF_ISDN
 #define AF_PHONET	PF_PHONET
 #define AF_IEEE802154	PF_IEEE802154
+#define AF_CAIF		PF_CAIF
+#define AF_ALG		PF_ALG
 #define	AF_MAX		PF_MAX
 
 /* Socket level values.  Others are defined in the appropriate headers.
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/socket.h b/sysdeps/unix/sysv/linux/sparc/bits/socket.h
index a148072..141ea27 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/socket.h
@@ -1,5 +1,5 @@
 /* System-specific socket constants and types.  Linux/SPARC version.
-   Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009
+   Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, 2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -108,7 +108,9 @@ enum __socket_type
 #define PF_ISDN		34	/* mISDN sockets.  */
 #define PF_PHONET	35	/* Phonet sockets.  */
 #define PF_IEEE802154	36	/* IEEE 802.15.4 sockets.  */
-#define	PF_MAX		37	/* For now..  */
+#define PF_CAIF		37	/* CAIF sockets.  */
+#define PF_ALG		38	/* Algorithm sockets.  */
+#define	PF_MAX		39	/* For now..  */
 
 /* Address families.  */
 #define	AF_UNSPEC	PF_UNSPEC
@@ -149,6 +151,8 @@ enum __socket_type
 #define AF_ISDN		PF_ISDN
 #define AF_PHONET	PF_PHONET
 #define AF_IEEE802154	PF_IEEE802154
+#define AF_CAIF		PF_CAIF
+#define AF_ALG		PF_ALG
 #define	AF_MAX		PF_MAX
 
 /* Socket level values.  Others are defined in the appropriate headers.
@@ -233,8 +237,8 @@ enum
 #define	MSG_MORE	MSG_MORE
 
     MSG_CMSG_CLOEXEC	= 0x40000000	/* Set close_on_exit for file
-                                           descriptor received through
-                                           SCM_RIGHTS.  */
+					   descriptor received through
+					   SCM_RIGHTS.  */
 #define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
   };
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=24b5b849fd64272116b3330fd16dc34219373171

commit 24b5b849fd64272116b3330fd16dc34219373171
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sat Jan 15 11:10:11 2011 -0500

    Signal temporary host lookup errors in nscd as such to the requester.
    
    (cherry picked from commit bc425b339b067bebe3d49907e63b0e81eb261bd2)

diff --git a/ChangeLog b/ChangeLog
index 68fec19..76eb858 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-01-15  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #6812]
+	* nscd/hstcache.c (tryagain): Define.
+	(cache_addhst): Return tryagain not notfound for temporary errors.
+	(addhstbyX): Also set h_errno to TRY_AGAIN when memory allocation
+	failed.
+
 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #12397]
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index 228f6fd..a6055cf 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -1,5 +1,5 @@
 /* Cache handling for host lookup.
-   Copyright (C) 1998-2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -77,6 +77,20 @@ static const hst_response_header notfound =
 };
 
 
+/* This is the standard reply in case there are temporary problems.  */
+static const hst_response_header tryagain =
+{
+  .version = NSCD_VERSION,
+  .found = 0,
+  .h_name_len = 0,
+  .h_aliases_cnt = 0,
+  .h_addrtype = -1,
+  .h_length = -1,
+  .h_addr_list_cnt = 0,
+  .error = TRY_AGAIN
+};
+
+
 static void
 cache_addhst (struct database_dyn *db, int fd, request_header *req,
 	      const void *key, struct hostent *hst, uid_t owner,
@@ -111,11 +125,15 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
       else
 	{
 	  /* We have no data.  This means we send the standard reply for this
-	     case.  */
+	     case.  Possibly this is only temporary.  */
 	  ssize_t total = sizeof (notfound);
+	  assert (sizeof (notfound) == sizeof (tryagain));
+
+	  const hst_response_header *resp = (errval == EAGAIN
+					     ? &tryagain : &notfound);
 
 	  if (fd != -1 &&
-	      TEMP_FAILURE_RETRY (send (fd, &notfound, total,
+	      TEMP_FAILURE_RETRY (send (fd, resp, total,
 					MSG_NOSIGNAL)) != total)
 	    all_written = false;
 
@@ -135,7 +153,7 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
 					   ? db->negtimeout : ttl);
 
 	      /* This is the reply.  */
-	      memcpy (&dataset->resp, &notfound, total);
+	      memcpy (&dataset->resp, resp, total);
 
 	      /* Copy the key data.  */
 	      memcpy (dataset->strdata, key, req->key_len);
@@ -490,6 +508,7 @@ addhstbyX (struct database_dyn *db, int fd, request_header *req,
 	      /* We set the error to indicate this is (possibly) a
 		 temporary error and that it does not mean the entry
 		 is not available at all.  */
+	      h_errno = TRY_AGAIN;
 	      errval = EAGAIN;
 	      break;
 	    }

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=28ef97b099c02ad0cc695807c0515d70855772f9

commit 28ef97b099c02ad0cc695807c0515d70855772f9
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Thu Jan 13 14:01:56 2011 -0500

    Fix PLT use due to __libc_alloca_cutoff.
    
    (cherry picked from commit a85b5cb4d4a5fc56e2b38638d270bf2daa67eb6c)

diff --git a/ChangeLog b/ChangeLog
index 5525f1f..68fec19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
 	[BZ #10484]
 	* nss/nss_files/files-hosts.c (HOST_DB_LOOKUP): Handle overflows of
 	temporary buffer used to handle multi lookups locally.
+	* include/alloca.h: Add libc_hidden_proto for __libc_alloca_cutoff.
 
 2011-01-12  Ulrich Drepper  <drepper@gmail.com>
 
diff --git a/include/alloca.h b/include/alloca.h
index 9a4b5c7..b99c3d1 100644
--- a/include/alloca.h
+++ b/include/alloca.h
@@ -14,6 +14,7 @@ extern void *__alloca (size_t __size);
 
 extern int __libc_use_alloca (size_t size) __attribute__ ((const));
 extern int __libc_alloca_cutoff (size_t size) __attribute__ ((const));
+libc_hidden_proto (__libc_alloca_cutoff)
 
 #define __MAX_ALLOCA_CUTOFF	65536
 
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 1b9b21c..aeb7183 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -2,6 +2,7 @@
 
 	[BZ #10484]
 	* Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
+	* alloca_cutoff.c: Add libc_hidden_def.
 
 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
 
diff --git a/nptl/alloca_cutoff.c b/nptl/alloca_cutoff.c
index ba26ceb..bbd930a 100644
--- a/nptl/alloca_cutoff.c
+++ b/nptl/alloca_cutoff.c
@@ -1,5 +1,5 @@
 /* Determine whether block of given size can be allocated on the stack or not.
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 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
@@ -34,3 +34,4 @@ __libc_alloca_cutoff (size_t size)
 			  assume the maximum available stack space.  */
 		       ?: __MAX_ALLOCA_CUTOFF * 4));
 }
+libc_hidden_def (__libc_alloca_cutoff)

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83e15ff7c24784a35518451daaada04b88dd9c3e

commit 83e15ff7c24784a35518451daaada04b88dd9c3e
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Thu Jan 13 12:42:06 2011 -0500

    Fix handling of missing syscall in Linux mkdirat.
    
    (cherry picked from commit 1086d70d916fd0eb969b3d89ff88abd35f6a5c34)

diff --git a/ChangeLog b/ChangeLog
index 86b7749..5525f1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ #12397]
+	* sysdeps/unix/sysv/linux/mkdirat.c (mkdirat): Fix handling of missing
+	syscall.
+
 	[BZ #10484]
 	* nss/nss_files/files-hosts.c (HOST_DB_LOOKUP): Handle overflows of
 	temporary buffer used to handle multi lookups locally.
diff --git a/sysdeps/unix/sysv/linux/mkdirat.c b/sysdeps/unix/sysv/linux/mkdirat.c
index aa89d08..73ebbe6 100644
--- a/sysdeps/unix/sysv/linux/mkdirat.c
+++ b/sysdeps/unix/sysv/linux/mkdirat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2009, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -43,7 +43,7 @@ mkdirat (fd, file, mode)
     {
       res = INLINE_SYSCALL (mkdirat, 3, fd, file, mode);
 # ifndef __ASSUME_ATFCTS
-      if (res == -1 && res == ENOSYS)
+      if (res == -1 && errno == ENOSYS)
 	__have_atfcts = -1;
       else
 # endif

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

commit f369c365c2e486195b2f0c72e750abde31dcccc9
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Thu Jan 13 11:28:17 2011 -0500

    Handle long lines in host lookups in the right place.
    
    (cherry picked from commit 451f001b50870604e1f2daef12f04f9f460d3997)

diff --git a/ChangeLog b/ChangeLog
index dd85ccb..86b7749 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-01-13  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #10484]
+	* nss/nss_files/files-hosts.c (HOST_DB_LOOKUP): Handle overflows of
+	temporary buffer used to handle multi lookups locally.
+
 2011-01-12  Ulrich Drepper  <drepper@gmail.com>
 
 	* elf/dl-dst.h (DL_DST_REQUIRED): Allow l_origin to be NULL when
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 73c65e6..1b9b21c 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-13  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #10484]
+	* Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
+
 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* nptl/sysdeps/unix/sysv/linux/i386/Makefile: New file.
diff --git a/nptl/Versions b/nptl/Versions
index 09098bf..285ff4c 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -27,6 +27,7 @@ libc {
     pthread_cond_broadcast; pthread_cond_timedwait;
   }
   GLIBC_PRIVATE {
+    __libc_alloca_cutoff;
     # Internal libc interface to libpthread
     __libc_dl_error_tsd;
   }
diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c
index e5f5b48..83de650 100644
--- a/nss/nss_files/files-hosts.c
+++ b/nss/nss_files/files-hosts.c
@@ -1,5 +1,5 @@
 /* Hosts file parser in nss_files module.
-   Copyright (C) 1996-2001, 2003-2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1996-2001, 2003-2009, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -129,19 +129,22 @@ _nss_files_get##name##_r (proto,					      \
 	  && _res_hconf.flags & HCONF_FLAG_MULTI)			      \
 	{								      \
 	  /* We have to get all host entries from the file.  */		      \
-	  const size_t tmp_buflen = MIN (buflen, 4096);			      \
-	  char tmp_buffer[tmp_buflen]					      \
+	  size_t tmp_buflen = MIN (buflen, 4096);			      \
+	  char tmp_buffer_stack[tmp_buflen]				      \
 	    __attribute__ ((__aligned__ (__alignof__ (struct hostent_data))));\
+	  char *tmp_buffer = tmp_buffer_stack;				      \
 	  struct hostent tmp_result_buf;				      \
 	  int naddrs = 1;						      \
 	  int naliases = 0;						      \
 	  char *bufferend;						      \
+	  bool tmp_buffer_malloced = false;				      \
 									      \
 	  while (result->h_aliases[naliases] != NULL)			      \
 	    ++naliases;							      \
 									      \
 	  bufferend = (char *) &result->h_aliases[naliases + 1];	      \
 									      \
+	again:								      \
 	  while ((status = internal_getent (&tmp_result_buf, tmp_buffer,      \
 					    tmp_buflen, errnop H_ERRNO_ARG    \
 					    EXTRA_ARGS_VALUE))		      \
@@ -182,7 +185,7 @@ _nss_files_get##name##_r (proto,					      \
 		    }							      \
 		  /* If the real name is different add it also to the	      \
 		     aliases.  This means that there is a duplication	      \
-		     in the alias list but this is really the users	      \
+		     in the alias list but this is really the user's	      \
 		     problem.  */					      \
 		  if (strcmp (old_result->h_name,			      \
 			      tmp_result_buf.h_name) != 0)		      \
@@ -204,7 +207,7 @@ _nss_files_get##name##_r (proto,					      \
 		      *errnop = ERANGE;					      \
 		      *herrnop = NETDB_INTERNAL;			      \
 		      status = NSS_STATUS_TRYAGAIN;			      \
-		      break;						      \
+		      goto out;						      \
 		    }							      \
 									      \
 		  new_h_addr_list =					      \
@@ -268,8 +271,54 @@ _nss_files_get##name##_r (proto,					      \
 		}							      \
 	    }								      \
 									      \
-	  if (status != NSS_STATUS_TRYAGAIN)				      \
+	  if (status == NSS_STATUS_TRYAGAIN)				      \
+	    {								      \
+	      size_t newsize = 2 * tmp_buflen;				      \
+	      if (tmp_buffer_malloced)					      \
+		{							      \
+		  char *newp = realloc (tmp_buffer, newsize);		      \
+		  if (newp != NULL)					      \
+		    {							      \
+		      assert ((((uintptr_t) newp)			      \
+			       & (__alignof__ (struct hostent_data) - 1))     \
+			      == 0);					      \
+		      tmp_buffer = newp;				      \
+		      tmp_buflen = newsize;				      \
+		      goto again;					      \
+		    }							      \
+		}							      \
+	      else if (!__libc_use_alloca (buflen + newsize))		      \
+		{							      \
+		  tmp_buffer = malloc (newsize);			      \
+		  if (tmp_buffer != NULL)				      \
+		    {							      \
+		      assert ((((uintptr_t) tmp_buffer)			      \
+			       & (__alignof__ (struct hostent_data) - 1))     \
+			      == 0);					      \
+		      tmp_buffer_malloced = true;			      \
+		      tmp_buflen = newsize;				      \
+		      goto again;					      \
+		    }							      \
+		}							      \
+	      else							      \
+		{							      \
+		  tmp_buffer						      \
+		    = extend_alloca (tmp_buffer, tmp_buflen,		      \
+				     newsize				      \
+				     + __alignof__ (struct hostent_data));    \
+		  tmp_buffer = (char *) (((uintptr_t) tmp_buffer	      \
+					  + __alignof__ (struct hostent_data) \
+					  - 1)				      \
+					 & ~(__alignof__ (struct hostent_data)\
+					     - 1));			      \
+		  goto again;						      \
+		}							      \
+	    }								      \
+	  else								      \
 	    status = NSS_STATUS_SUCCESS;				      \
+	out:								      \
+	  if (tmp_buffer_malloced)					      \
+	    free (tmp_buffer);						      \
 	}								      \
 									      \
 									      \

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7344c4a5cb5fc37c0556179d57286caac213a013

commit 7344c4a5cb5fc37c0556179d57286caac213a013
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Wed Jan 12 23:10:00 2011 -0500

    Fix assertion when handling DSTs during auditing.
    
    (cherry picked from commit 0876917582041d17a9eb6b08894c1123a2affe74)

diff --git a/ChangeLog b/ChangeLog
index aaf1b4c..dd85ccb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-12  Ulrich Drepper  <drepper@gmail.com>
+
+	* elf/dl-dst.h (DL_DST_REQUIRED): Allow l_origin to be NULL when
+	loader is ld.so.
+
 2010-03-12  Andreas Schwab  <schwab@redhat.com>
 
 	* elf/dl-dst.h: Include "trusted-dirs.h".
diff --git a/elf/dl-dst.h b/elf/dl-dst.h
index ae8d119..9d219e2 100644
--- a/elf/dl-dst.h
+++ b/elf/dl-dst.h
@@ -1,6 +1,5 @@
 /* Handling of dynamic sring tokens.
-   Copyright (C) 1999,2001,2002,2003,2004,2006,2007
-   Free Software Foundation, Inc.
+   Copyright (C) 1999,2001-2004,2006,2007,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
@@ -33,6 +32,11 @@
     __cnt; })
 
 
+#ifdef SHARED
+# define IS_RTLD(l) (l) == &GL(dl_rtld_map)
+#else
+# define IS_RTLD(l) 0
+#endif
 /* Guess from the number of DSTs the length of the result string.  */
 #define DL_DST_REQUIRED(l, name, len, cnt) \
   ({									      \
@@ -41,7 +45,7 @@
 									      \
     if (__cnt > 0)							      \
       {									      \
-	size_t dst_len;						      	      \
+	size_t dst_len;							      \
 	/* Now we make a guess how many extra characters on top of the	      \
 	   length of S we need to represent the result.  We know that	      \
 	   we have CNT replacements.  Each at most can use		      \
@@ -50,11 +54,12 @@
 	   minus 4 (which is the length of "$LIB").			      \
 									      \
 	   First get the origin string if it is not available yet.	      \
-	   This can only happen for the map of the executable.  */	      \
+	   This can only happen for the map of the executable or, when	      \
+	   auditing, in ld.so.  */					      \
 	DL_DST_REQ_STATIC (l)						      \
 	if ((l)->l_origin == NULL)					      \
 	  {								      \
-	    assert ((l)->l_name[0] == '\0');				      \
+	    assert ((l)->l_name[0] == '\0' || IS_RTLD (l));		      \
 	    (l)->l_origin = _dl_get_origin ();				      \
 	    dst_len = ((l)->l_origin && (l)->l_origin != (char *) -1	      \
 			  ? strlen ((l)->l_origin) : 0);		      \
@@ -62,7 +67,7 @@
 	else								      \
 	  dst_len = (l)->l_origin == (char *) -1			      \
 	    ? 0 : strlen ((l)->l_origin);				      \
-	dst_len = MAX (MAX (dst_len, GLRO(dl_platformlen)), 		      \
+	dst_len = MAX (MAX (dst_len, GLRO(dl_platformlen)),		      \
 		       strlen (DL_DST_LIB));				      \
 	if (dst_len > 4)						      \
 	  __len += __cnt * (dst_len - 4);				      \

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=47968f8ba80aaa0d3f1a9f55bf0876a684f880be

commit 47968f8ba80aaa0d3f1a9f55bf0876a684f880be
Author: Andreas Schwab <schwab@redhat.com>
Date:   Fri Mar 12 07:57:19 2010 -0800

    Don't underestimate length of DST substitution
    
    (cherry picked from commit 4c35fb65c9ea221561bc5698358944a73383b3d6)

diff --git a/ChangeLog b/ChangeLog
index d66e3db..aaf1b4c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-12  Andreas Schwab  <schwab@redhat.com>
+
+	* elf/dl-dst.h: Include "trusted-dirs.h".
+	(DL_DST_REQUIRED): Take $LIB into account.
+
 2011-01-10  Paul Pluzhnikov  <ppluzhnikov@google.com>
 
 	* sysdeps/i386/Makefile: stdlib/cxa_finalize.c needs 16-byte stack
diff --git a/elf/dl-dst.h b/elf/dl-dst.h
index 76076a6..ae8d119 100644
--- a/elf/dl-dst.h
+++ b/elf/dl-dst.h
@@ -18,6 +18,8 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include "trusted-dirs.h"
+
 /* Determine the number of DST elements in the name.  Only if IS_PATH is
    nonzero paths are recognized (i.e., multiple, ':' separated filenames).  */
 #define DL_DST_COUNT(name, is_path) \
@@ -39,12 +41,13 @@
 									      \
     if (__cnt > 0)							      \
       {									      \
-	size_t origin_len;						      \
+	size_t dst_len;						      	      \
 	/* Now we make a guess how many extra characters on top of the	      \
 	   length of S we need to represent the result.  We know that	      \
 	   we have CNT replacements.  Each at most can use		      \
-	     MAX (strlen (ORIGIN), strlen (_dl_platform))		      \
-	   minus 7 (which is the length of "$ORIGIN").			      \
+	     MAX (MAX (strlen (ORIGIN), strlen (_dl_platform)),		      \
+		  strlen (DL_DST_LIB))					      \
+	   minus 4 (which is the length of "$LIB").			      \
 									      \
 	   First get the origin string if it is not available yet.	      \
 	   This can only happen for the map of the executable.  */	      \
@@ -53,14 +56,16 @@
 	  {								      \
 	    assert ((l)->l_name[0] == '\0');				      \
 	    (l)->l_origin = _dl_get_origin ();				      \
-	    origin_len = ((l)->l_origin && (l)->l_origin != (char *) -1	      \
+	    dst_len = ((l)->l_origin && (l)->l_origin != (char *) -1	      \
 			  ? strlen ((l)->l_origin) : 0);		      \
 	  }								      \
 	else								      \
-	  origin_len = (l)->l_origin == (char *) -1			      \
+	  dst_len = (l)->l_origin == (char *) -1			      \
 	    ? 0 : strlen ((l)->l_origin);				      \
-									      \
-	__len += __cnt * (MAX (origin_len, GLRO(dl_platformlen)) - 7);	      \
+	dst_len = MAX (MAX (dst_len, GLRO(dl_platformlen)), 		      \
+		       strlen (DL_DST_LIB));				      \
+	if (dst_len > 4)						      \
+	  __len += __cnt * (dst_len - 4);				      \
       }									      \
 									      \
     __len; })
@@ -72,7 +77,7 @@
   if ((l) == NULL)							      \
     {									      \
       const char *origin = _dl_get_origin ();				      \
-      origin_len = (origin && origin != (char *) -1 ? strlen (origin) : 0);   \
+      dst_len = (origin && origin != (char *) -1 ? strlen (origin) : 0);      \
     }									      \
   else
 #endif

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

commit bbfacbc5eacc1394bedce108cafff7baebecae7e
Author: Ulrich Drepper <gmail@redhat.com>
Date:   Wed Jan 12 20:59:32 2011 -0500

    Fix alignment in x86 destructor calls.
    
    (cherry picked from commit 5e49c52efdb37eb0aa315156f39056f25ff9ddaa)

diff --git a/ChangeLog b/ChangeLog
index c1c955c..d66e3db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-10  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+	* sysdeps/i386/Makefile: stdlib/cxa_finalize.c needs 16-byte stack
+	alignment for SSE2.
+
 2011-01-12  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #12394]
diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
index ef45ce6..3d9f3fc 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -47,6 +47,7 @@ endif
 # And a couple of other routines
 ifeq ($(subdir),stdlib)
 CFLAGS-exit.c += -mpreferred-stack-boundary=4
+CFLAGS-cxa_finalize.c += -mpreferred-stack-boundary=4
 endif
 ifeq ($(subdir),elf)
 CFLAGS-dl-init.c += -mpreferred-stack-boundary=4

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d0273a47bc4e6d27f0b94babbc0e34f9d58052a

commit 2d0273a47bc4e6d27f0b94babbc0e34f9d58052a
Author: Ulrich Drepper <gmail@redhat.com>
Date:   Wed Jan 12 20:37:51 2011 -0500

    Fix grouping when rounding increases number of integer digits.
    
    (cherry picked from commit f57e41a5b8e88186c67ec0410d61a751b274340c)

diff --git a/ChangeLog b/ChangeLog
index 2a686a9..c1c955c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-01-12  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12394]
+	* stdio-common/printf_fp.c (__printf_fp): Add more room for grouping
+	characters.  When rounding increased number of integer digits recompute
+	number of groups.
+	* stdio-common/tst-grouping.c: New file.
+	* stdio-common/Makefile: Add rules to build and run tst-grouping.
+
 2011-01-04  David S. Miller  <davem@sunset.davemloft.net>
 
 	[BZ #11155]
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index 9cbf143..6aabfb6 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1991-2009, 2011 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -60,7 +60,7 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
 	 tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
 	 tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
 	 bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
-	 scanf16 scanf17 tst-setvbuf1
+	 scanf16 scanf17 tst-setvbuf1 tst-grouping
 
 test-srcs = tst-unbputc tst-printf
 
@@ -128,6 +128,7 @@ test-vfprintf-ENV = LOCPATH=$(common-objpfx)localedata
 scanf13-ENV = LOCPATH=$(common-objpfx)localedata
 bug14-ENV = LOCPATH=$(common-objpfx)localedata
 bug15-ENV = LOCPATH=$(common-objpfx)localedata
+tst-grouping-ENV = LOCPATH=$(common-objpfx)localedata
 
 ifneq (,$(filter %REENTRANT, $(defines)))
 CPPFLAGS += -D_IO_MTSAFE_IO
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
index b60ddec..e9ff168 100644
--- a/stdio-common/printf_fp.c
+++ b/stdio-common/printf_fp.c
@@ -1,5 +1,5 @@
 /* Floating point output for `printf'.
-   Copyright (C) 1995-2003, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1995-2003, 2006-2008, 2011 Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
@@ -884,7 +884,9 @@ ___printf_fp (FILE *fp,
 	/* Guess the number of groups we will make, and thus how
 	   many spaces we need for separator characters.  */
 	ngroups = __guess_grouping (intdig_max, grouping);
-	chars_needed += ngroups;
+	/* Allocate one more character in case rounding increases the
+	   number of groups.  */
+	chars_needed += ngroups + 1;
       }
 
     /* Allocate buffer for output.  We need two more because while rounding
@@ -1088,9 +1090,16 @@ ___printf_fp (FILE *fp,
       --wcp;
 
     if (grouping)
-      /* Add in separator characters, overwriting the same buffer.  */
-      wcp = group_number (wstartp, wcp, intdig_no, grouping, thousands_sepwc,
-			  ngroups);
+      {
+	/* Rounding might have changed the number of groups.  We allocated
+	   enough memory but we need here the correct number of groups.  */
+	if (intdig_no != intdig_max)
+	  ngroups = __guess_grouping (intdig_no, grouping);
+
+	/* Add in separator characters, overwriting the same buffer.  */
+	wcp = group_number (wstartp, wcp, intdig_no, grouping, thousands_sepwc,
+			    ngroups);
+      }
 
     /* Write the exponent if it is needed.  */
     if (type != 'f')
@@ -1210,7 +1219,7 @@ ___printf_fp (FILE *fp,
 
       tmpptr = buffer;
       if (__builtin_expect (info->i18n, 0))
-        {
+	{
 #ifdef COMPILE_WPRINTF
 	  wstartp = _i18n_number_rewrite (wstartp, wcp,
 					  wbuffer + wbuffer_to_alloc);
@@ -1224,7 +1233,7 @@ ___printf_fp (FILE *fp,
 	  assert ((uintptr_t) buffer <= (uintptr_t) tmpptr);
 	  assert ((uintptr_t) tmpptr < (uintptr_t) buffer_end);
 #endif
-        }
+	}
 
       PRINT (tmpptr, wstartp, wide ? wcp - wstartp : cp - tmpptr);
 
diff --git a/stdio-common/tst-grouping.c b/stdio-common/tst-grouping.c
new file mode 100644
index 0000000..e8f4b8c
--- /dev/null
+++ b/stdio-common/tst-grouping.c
@@ -0,0 +1,83 @@
+/* BZ 12394, test by Bruno Haible.  */
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+static int
+do_test (void)
+{
+  char buf1[1000];
+  char buf2[1000];
+  int result = 0;
+
+  if (setlocale (LC_NUMERIC, "de_DE.UTF-8") == NULL)
+    return 1;
+
+  sprintf (buf1, "%'.2f",  999.996);
+  sprintf (buf2, "%'.2f", 1000.004);
+  printf ("%d: \"%s\" vs \"%s\"\n", __LINE__, buf1, buf2);
+  if (strcmp (buf1, buf2) != 0)
+    result |= 2;
+
+  sprintf (buf1, "%'.2f",  999999.996);
+  sprintf (buf2, "%'.2f", 1000000.004);
+  printf ("%d: \"%s\" vs \"%s\"\n", __LINE__, buf1, buf2);
+  if (strcmp (buf1, buf2) != 0)
+    result |= 2;
+
+  sprintf (buf1, "%'.2f",  999999999.996);
+  sprintf (buf2, "%'.2f", 1000000000.004);
+  printf ("%d: \"%s\" vs \"%s\"\n", __LINE__, buf1, buf2);
+  if (strcmp (buf1, buf2) != 0)
+    result |= 2;
+
+  sprintf (buf1, "%'.2f",  999999999999.996);
+  sprintf (buf2, "%'.2f", 1000000000000.004);
+  printf ("%d: \"%s\" vs \"%s\"\n", __LINE__, buf1, buf2);
+  if (strcmp (buf1, buf2) != 0)
+    result |= 2;
+
+  sprintf (buf1, "%'.2f",  999999999999999.996);
+  sprintf (buf2, "%'.2f", 1000000000000000.004);
+  printf ("%d: \"%s\" vs \"%s\"\n", __LINE__, buf1, buf2);
+  if (strcmp (buf1, buf2) != 0)
+    result |= 2;
+
+  sprintf (buf1, "%'.5g",  999.996);
+  sprintf (buf2, "%'.5g", 1000.004);
+  printf ("%d: \"%s\" vs \"%s\"\n", __LINE__, buf1, buf2);
+  if (strcmp (buf1, buf2) != 0)
+    result |= 4;
+
+  sprintf (buf1, "%'.4g",  9999.996);
+  sprintf (buf2, "%'.4g", 10000.004);
+  printf ("%d: \"%s\" vs \"%s\"\n", __LINE__, buf1, buf2);
+  if (strcmp (buf1, buf2) != 0)
+    result |= 8;
+
+  sprintf (buf1, "%'.5g",  99999.996);
+  sprintf (buf2, "%'.5g", 100000.004);
+  printf ("%d: \"%s\" vs \"%s\"\n", __LINE__, buf1, buf2);
+  if (strcmp (buf1, buf2) != 0)
+    result |= 8;
+
+  sprintf (buf1, "%'.6g",  999999.996);
+  sprintf (buf2, "%'.6g", 1000000.004);
+  printf ("%d: \"%s\" vs \"%s\"\n", __LINE__, buf1, buf2);
+  if (strcmp (buf1, buf2) != 0)
+    result |= 8;
+
+  sprintf (buf1, "%'.7g",  9999999.996);
+  sprintf (buf2, "%'.7g", 10000000.004);
+  printf ("%d: \"%s\" vs \"%s\"\n", __LINE__, buf1, buf2);
+  if (strcmp (buf1, buf2) != 0)
+    result |= 8;
+
+  return result;
+}
+
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0b62ea76dbef0f0d5528bc249439dfaa0236d2be

commit 0b62ea76dbef0f0d5528bc249439dfaa0236d2be
Author: David S. Miller <davem@davemloft.net>
Date:   Tue Jan 4 12:13:05 2011 -0800

    sparc64: Use i386 implementation for fxstat.
    
    This was simply missed when Jakub converted all of the
    other sparc64 xstat cases.
    
    (cherry picked from commit 16c2895feabae0962e0eba2b9164c6a83014bfe4)

diff --git a/ChangeLog b/ChangeLog
index 9413d11..2a686a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-01-04  David S. Miller  <davem@sunset.davemloft.net>
+
+	[BZ #11155]
+	* sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c: Use i386's
+	implementation just like for lxstat, fxstatat, et al.
+
 2010-12-27  Jim Meyering  <meyering@redhat.com>
 
 	[BZ #12348]
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c b/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c
index 6b37477..e328ccb 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c
@@ -1 +1 @@
-#include "../../fxstat.c"
+#include "../../i386/fxstat.c"

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73c7d579597df7ccad82fbc231ad15b507a7db72

commit 73c7d579597df7ccad82fbc231ad15b507a7db72
Author: Jim Meyering <meyering@redhat.com>
Date:   Mon Dec 27 18:19:56 2010 -0500

    Fix infloop on persistent failing calloc in regex.
    
    (cherry picked from commit 2543fef229599e8a6e4feeea65ca2dd3f984154f)

diff --git a/ChangeLog b/ChangeLog
index 133bf3c..9413d11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-27  Jim Meyering  <meyering@redhat.com>
+
+	[BZ #12348]
+	* posix/regexec.c (build_trtable): Return failure indication upon
+	calloc failure.  Otherwise, re_search_internal could infloop on OOM.
+
 2010-12-25  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #12207]
diff --git a/posix/regexec.c b/posix/regexec.c
index 8481b61..5019003 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -3347,6 +3347,8 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
 	{
 	  state->trtable = (re_dfastate_t **)
 	    calloc (sizeof (re_dfastate_t *), SBC_MAX);
+	  if (BE (state->trtable == NULL, 0))
+	    return 0;
 	  return 1;
 	}
       return 0;

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=72215c6000487220e075d87cf57509c36b350810

commit 72215c6000487220e075d87cf57509c36b350810
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sat Dec 25 14:15:42 2010 -0500

    Use fastbin macro everywhere.
    
    (cherry picked from commit 9798346413d74dc9b3c64731807600b5ab9c1517)

diff --git a/ChangeLog b/ChangeLog
index 43312e2..133bf3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-25  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12207]
+	* malloc/malloc.c (do_check_malloc_state): Use fastbin macro.
+
 2010-12-19  Ulrich Drepper  <drepper@gmail.com>
 
 	* sysdeps/unix/readdir_r.c (__READDIR_R): Compute reclen more
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 29c7992..8f5ab77 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -2832,7 +2832,7 @@ static void do_check_malloc_state(mstate av)
   max_fast_bin = fastbin_index(get_max_fast ());
 
   for (i = 0; i < NFASTBINS; ++i) {
-    p = av->fastbins[i];
+    p = fastbin (av, i);
 
     /* The following test can only be performed for the main arena.
        While mallopt calls malloc_consolidate to get rid of all fast

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

commit d0a96954607e2975fc36bcf49ec42cfcb2105f1a
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sun Dec 19 22:52:57 2010 -0500

    Fix ChangeLogs.
    
    (cherry picked from commit 14b697f75a5f039a0e3155c62399ee217c0f17dc)

diff --git a/ChangeLog b/ChangeLog
index 08b6c1c..43312e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-12-19  Ulrich Drepper  <drepper@gmail.com>
 
-	* sysdeps/unix/readdir_r.c (__READDIR_R): Compute reclen more accurate.
+	* sysdeps/unix/readdir_r.c (__READDIR_R): Compute reclen more
+	accurately.
 	* sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c: Define
 	GETDENTS_64BIT_ALIGNED.
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17a0fde05783e137a8dc9cc4d913a8900862feae

commit 17a0fde05783e137a8dc9cc4d913a8900862feae
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sun Dec 19 16:00:59 2010 -0500

    More accurate computatin of reclen in readdir_r.
    
    Alignment issue can increase the reclen limit.
    Make sure Linux 64-bit readdir_r also accounts for 64-bit alignment
    in getdents.
    
    (cherry picked from commit db753e2cfb2051ebf20dc089f87c5b1297cc2cff)

diff --git a/ChangeLog b/ChangeLog
index bcd3e2f..08b6c1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-19  Ulrich Drepper  <drepper@gmail.com>
+
+	* sysdeps/unix/readdir_r.c (__READDIR_R): Compute reclen more accurate.
+	* sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c: Define
+	GETDENTS_64BIT_ALIGNED.
+
 2010-12-10  Andreas Schwab  <schwab@redhat.com>
 
 	* wcsmbs/wchar.h (wcpcpy, wcpncpy): Add __restrict.
diff --git a/sysdeps/unix/readdir_r.c b/sysdeps/unix/readdir_r.c
index 9372791..e166174 100644
--- a/sysdeps/unix/readdir_r.c
+++ b/sysdeps/unix/readdir_r.c
@@ -117,7 +117,8 @@ __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
 #ifdef GETDENTS_64BIT_ALIGNED
       /* The d_reclen value might include padding which is not part of
 	 the DIRENT_TYPE data structure.  */
-      reclen = MIN (reclen, sizeof (DIRENT_TYPE));
+      reclen = MIN (reclen,
+		    offsetof (DIRENT_TYPE, d_name) + sizeof (dp->d_name));
 #endif
       *result = memcpy (entry, dp, reclen);
 #ifdef GETDENTS_64BIT_ALIGNED
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c b/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
index adb92db..12ca1a1 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
@@ -1,4 +1,5 @@
 #define readdir64_r __no_readdir64_r_decl
+#define GETDENTS_64BIT_ALIGNED 1
 #include <sysdeps/unix/readdir_r.c>
 #undef readdir64_r
 weak_alias (__readdir_r, readdir64_r)

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a1af187c1be4c7893a5ea8371520899f49a6a9d

commit 9a1af187c1be4c7893a5ea8371520899f49a6a9d
Author: Andreas Schwab <schwab@redhat.com>
Date:   Fri Dec 10 09:15:01 2010 -0500

    Fix use of restrict in wchar.h
    
    (cherry picked from commit 4f1972374a080e823c4ead7c0496827dfc013837)

diff --git a/ChangeLog b/ChangeLog
index 7ebfb1e..bcd3e2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-12-10  Andreas Schwab  <schwab@redhat.com>
+
+	* wcsmbs/wchar.h (wcpcpy, wcpncpy): Add __restrict.
+	* wcsmbs/bits/wchar2.h (__wmemmove_chk_warn, wmemmove, wmemset):
+	Remove __restrict.
+	(wcscpy, __wcpcpy_chk, __wcpcpy_alias, wcpcpy, wcsncpy, wcpncpy)
+	(wcscat, wcsncat, __wcrtomb_chk, wcrtomb): Add __restrict.
+
 2010-12-09  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #11655]
diff --git a/wcsmbs/bits/wchar2.h b/wcsmbs/bits/wchar2.h
index 2ec4ce1..c38eaa3 100644
--- a/wcsmbs/bits/wchar2.h
+++ b/wcsmbs/bits/wchar2.h
@@ -1,5 +1,5 @@
 /* Checking macros for wchar functions.
-   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007, 2010 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
@@ -60,15 +60,13 @@ extern wchar_t *__REDIRECT_NTH (__wmemmove_alias, (wchar_t *__s1,
 						   __const wchar_t *__s2,
 						   size_t __n), wmemmove);
 extern wchar_t *__REDIRECT_NTH (__wmemmove_chk_warn,
-				(wchar_t *__restrict __s1,
-				 __const wchar_t *__restrict __s2, size_t __n,
-				 size_t __ns1), __wmemmove_chk)
+				(wchar_t *__s1, __const wchar_t *__s2,
+				 size_t __n, size_t __ns1), __wmemmove_chk)
      __warnattr ("wmemmove called with length bigger than size of destination "
 		 "buffer");
 
 __extern_always_inline wchar_t *
-__NTH (wmemmove (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2,
-		 size_t __n))
+__NTH (wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n))
 {
   if (__bos0 (__s1) != (size_t) -1)
     {
@@ -129,7 +127,7 @@ extern wchar_t *__REDIRECT_NTH (__wmemset_chk_warn,
 		 "buffer");
 
 __extern_always_inline wchar_t *
-__NTH (wmemset (wchar_t *__restrict __s, wchar_t __c, size_t __n))
+__NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n))
 {
   if (__bos0 (__s) != (size_t) -1)
     {
@@ -152,7 +150,7 @@ extern wchar_t *__REDIRECT_NTH (__wcscpy_alias,
 				 __const wchar_t *__restrict __src), wcscpy);
 
 __extern_always_inline wchar_t *
-__NTH (wcscpy (wchar_t *__dest, __const wchar_t *__src))
+__NTH (wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
 {
   if (__bos (__dest) != (size_t) -1)
     return __wcscpy_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
@@ -160,14 +158,15 @@ __NTH (wcscpy (wchar_t *__dest, __const wchar_t *__src))
 }
 
 
-extern wchar_t *__wcpcpy_chk (wchar_t *__dest, __const wchar_t *__src,
+extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest,
+			      __const wchar_t *__restrict __src,
 			      size_t __destlen) __THROW;
-extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias, (wchar_t *__dest,
-						 __const wchar_t *__src),
-				wcpcpy);
+extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias,
+				(wchar_t *__restrict __dest,
+				 __const wchar_t *__restrict __src), wcpcpy);
 
 __extern_always_inline wchar_t *
-__NTH (wcpcpy (wchar_t *__dest, __const wchar_t *__src))
+__NTH (wcpcpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
 {
   if (__bos (__dest) != (size_t) -1)
     return __wcpcpy_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
@@ -190,7 +189,8 @@ extern wchar_t *__REDIRECT_NTH (__wcsncpy_chk_warn,
 		 "buffer");
 
 __extern_always_inline wchar_t *
-__NTH (wcsncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n))
+__NTH (wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
+		size_t __n))
 {
   if (__bos (__dest) != (size_t) -1)
     {
@@ -220,7 +220,8 @@ extern wchar_t *__REDIRECT_NTH (__wcpncpy_chk_warn,
 		 "buffer");
 
 __extern_always_inline wchar_t *
-__NTH (wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n))
+__NTH (wcpncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
+		size_t __n))
 {
   if (__bos (__dest) != (size_t) -1)
     {
@@ -243,7 +244,7 @@ extern wchar_t *__REDIRECT_NTH (__wcscat_alias,
 				 __const wchar_t *__restrict __src), wcscat);
 
 __extern_always_inline wchar_t *
-__NTH (wcscat (wchar_t *__dest, __const wchar_t *__src))
+__NTH (wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src))
 {
   if (__bos (__dest) != (size_t) -1)
     return __wcscat_chk (__dest, __src, __bos (__dest) / sizeof (wchar_t));
@@ -260,7 +261,8 @@ extern wchar_t *__REDIRECT_NTH (__wcsncat_alias,
 				 size_t __n), wcsncat);
 
 __extern_always_inline wchar_t *
-__NTH (wcsncat (wchar_t *__dest, __const wchar_t *__src, size_t __n))
+__NTH (wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src,
+		size_t __n))
 {
   if (__bos (__dest) != (size_t) -1)
     return __wcsncat_chk (__dest, __src, __n,
@@ -428,14 +430,16 @@ fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
 #endif
 
 
-extern size_t __wcrtomb_chk (char *__s, wchar_t __wchar, mbstate_t *__p,
-			  size_t __buflen) __THROW __wur;
+extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar,
+			     mbstate_t *__restrict __p,
+			     size_t __buflen) __THROW __wur;
 extern size_t __REDIRECT_NTH (__wcrtomb_alias,
 			      (char *__restrict __s, wchar_t __wchar,
 			       mbstate_t *__restrict __ps), wcrtomb) __wur;
 
 __extern_always_inline __wur size_t
-__NTH (wcrtomb (char *__s, wchar_t __wchar, mbstate_t *__ps))
+__NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
+		mbstate_t *__restrict __ps))
 {
   /* We would have to include <limits.h> to get a definition of MB_LEN_MAX.
      But this would only disturb the namespace.  So we define our own
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index eb5b244..fc2c6a4 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -561,11 +561,13 @@ extern long double wcstold_l (__const wchar_t *__restrict __nptr,
 #ifdef	__USE_XOPEN2K8
 /* Copy SRC to DEST, returning the address of the terminating L'\0' in
    DEST.  */
-extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW;
+extern wchar_t *wcpcpy (wchar_t *__restrict __dest,
+			__const wchar_t *__restrict __src) __THROW;
 
 /* Copy no more than N characters of SRC to DEST, returning the address of
    the last character written into DEST.  */
-extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
+extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
+			 __const wchar_t *__restrict __src, size_t __n)
      __THROW;
 #endif	/* use GNU */
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=216e05cac950541caea1192f81ada4de1eaf7e17

commit 216e05cac950541caea1192f81ada4de1eaf7e17
Author: Ulrich Drepper <gmail@redhat.com>
Date:   Thu Dec 9 19:22:52 2010 -0500

    Fix typo in comment.
    
    (cherry picked from commit eaea92f137762dd754fdf858a2cd600f15005884)

diff --git a/include/atomic.h b/include/atomic.h
index 37d0111..fc4023b 100644
--- a/include/atomic.h
+++ b/include/atomic.h
@@ -33,7 +33,7 @@
      the multi-thread case.  The interfaces have the prefix
      "catomic_".
 
-   - support functions like barriers.  They also have the preifx
+   - support functions like barriers.  They also have the prefix
      "atomic_".
 
    Architectures must provide a few lowlevel macros (the compare

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

commit b6995df5132e877faf6a7c48e77561c92c60f011
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Thu Dec 9 12:12:58 2010 -0500

    Fix race in qsort_r initialization.
    
    (cherry picked from commit fb88ac72c2dcbbd979c8798e4ea497818bb3e171)

diff --git a/ChangeLog b/ChangeLog
index ece72c8..7ebfb1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-09  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #11655]
+	* stdlib/msort.c (qsort_r): Make sure both phys_pages and pagesize
+	are initialized.
+
 2010-12-09  Jakub Jelinek  <jakub@redhat.com>
 
 	* string/bits/string3.h (memmove, bcopy): Remove __restrict.
diff --git a/stdlib/msort.c b/stdlib/msort.c
index 35cd4d0..fc58f0d 100644
--- a/stdlib/msort.c
+++ b/stdlib/msort.c
@@ -25,6 +25,7 @@
 #include <unistd.h>
 #include <memcopy.h>
 #include <errno.h>
+#include <atomic.h>
 
 struct msort_param
 {
@@ -182,7 +183,7 @@ qsort_r (void *b, size_t n, size_t s, __compar_d_fn_t cmp, void *arg)
       static long int phys_pages;
       static int pagesize;
 
-      if (phys_pages == 0)
+      if (pagesize == 0)
 	{
 	  phys_pages = __sysconf (_SC_PHYS_PAGES);
 
@@ -197,6 +198,9 @@ qsort_r (void *b, size_t n, size_t s, __compar_d_fn_t cmp, void *arg)
 	     a quarter of the physical memory.  */
 	  phys_pages /= 4;
 
+	  /* Make sure phys_pages is written to memory.  */
+	  atomic_write_barrier ();
+
 	  pagesize = __sysconf (_SC_PAGESIZE);
 	}
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2796cd94a85e1d6a5acb2a86e2c6cc41abc33efa

commit 2796cd94a85e1d6a5acb2a86e2c6cc41abc33efa
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Dec 9 10:38:18 2010 -0500

    Fix -D_FORTIFY_SOURCE memmove and bcop
    
    (cherry picked from commit 42acbb92c861e97a6e1293ea853db88342a1bf53)

diff --git a/ChangeLog b/ChangeLog
index a96cfd5..ece72c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-09  Jakub Jelinek  <jakub@redhat.com>
+
+	* string/bits/string3.h (memmove, bcopy): Remove __restrict.
+
 2010-11-30  Ulrich Drepper  <drepper@gmail.com>
 
 	* sysdeps/i386/fpu/libm-test-ulps: Relax ynf(10,0.75) test expectations.
diff --git a/string/bits/string3.h b/string/bits/string3.h
index 1d759f1..1647725 100644
--- a/string/bits/string3.h
+++ b/string/bits/string3.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2007, 2009, 2010 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
@@ -53,8 +53,7 @@ __NTH (memcpy (void *__restrict __dest, __const void *__restrict __src,
 }
 
 __extern_always_inline void *
-__NTH (memmove (void *__restrict __dest, __const void *__restrict __src,
-		size_t __len))
+__NTH (memmove (void *__dest, __const void *__src, size_t __len))
 {
   return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
 }
@@ -88,8 +87,7 @@ __NTH (memset (void *__dest, int __ch, size_t __len))
 
 #ifdef __USE_BSD
 __extern_always_inline void
-__NTH (bcopy (__const void *__restrict __src, void *__restrict __dest,
-	      size_t __len))
+__NTH (bcopy (__const void *__src, void *__dest, size_t __len))
 {
   (void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
 }

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=837d8a0fab5ac7bbea1586e61422abce45f50393

commit 837d8a0fab5ac7bbea1586e61422abce45f50393
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Nov 30 14:57:57 2010 -0500

    Relax libm tests for x86-32.
    
    (cherry picked from commit 1e24cf6e6e8f6999e8fa188ece41e23f54330743)

diff --git a/ChangeLog b/ChangeLog
index 6c90def..a96cfd5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-30  Ulrich Drepper  <drepper@gmail.com>
+
+	* sysdeps/i386/fpu/libm-test-ulps: Relax ynf(10,0.75) test expectations.
+
 2010-11-24  Andreas Schwab  <schwab@redhat.com>
 
 	* resolv/nss_dns/dns-host.c (getanswer_r): Don't handle ttl == 0
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index 5231789..4b1a9e7 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -857,8 +857,8 @@ ifloat: 1
 ildouble: 2
 ldouble: 2
 Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
-float: 1
-ifloat: 1
+float: 2
+ifloat: 2
 ildouble: 4
 ldouble: 4
 Test "yn (10, 1.0) == -121618014.278689189288130426667971145":

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=961327556d72460efc50a30a3136e12445c9e585

commit 961327556d72460efc50a30a3136e12445c9e585
Author: Andreas Schwab <schwab@redhat.com>
Date:   Thu Nov 25 20:50:16 2010 -0500

    Don't ignore zero TTL in DNS answers
    
    (cherry picked from commit a769081960837719ea79c2b6f1c962318f23865c)

diff --git a/ChangeLog b/ChangeLog
index 49dcad6..6c90def 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-24  Andreas Schwab  <schwab@redhat.com>
+
+	* resolv/nss_dns/dns-host.c (getanswer_r): Don't handle ttl == 0
+	specially.
+	(gaih_getanswer_slice): Likewise.
+
 2010-05-31  Petr Baudis  <pasky@suse.cz>
 
 	[BZ #11149]
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index 8592183..fe4ac2d 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -599,7 +599,6 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
   int (*name_ok) (const char *);
   u_char packtmp[NS_MAXCDNAME];
   int have_to_map = 0;
-  int32_t ttl = 0;
   uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
   buffer += pad;
   if (__builtin_expect (buflen < sizeof (struct host_data) + pad, 0))
@@ -733,7 +732,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
       cp += INT16SZ;			/* type */
       class = __ns_get16 (cp);
       cp += INT16SZ;			/* class */
-      ttl = __ns_get32 (cp);
+      int32_t ttl = __ns_get32 (cp);
       cp += INT32SZ;			/* TTL */
       n = __ns_get16 (cp);
       cp += INT16SZ;			/* len */
@@ -907,7 +906,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
 	    {
 	      register int nn;
 
-	      if (ttlp != NULL && ttl != 0)
+	      if (ttlp != NULL)
 		*ttlp = ttl;
 	      if (canonp != NULL)
 		*canonp = bp;
@@ -1163,7 +1162,7 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
 
       if (*firstp)
 	{
-	  if (ttl != 0 && ttlp != NULL)
+	  if (ttlp != NULL)
 	    *ttlp = ttl;
 
 	  (*pat)->name = canon ?: h_name;

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

Summary of changes:
 ChangeLog                                       |  128 +++++++++++++++++++++++
 elf/dl-dst.h                                    |   34 ++++--
 elf/dl-runtime.c                                |    3 +-
 include/alloca.h                                |    1 +
 include/atomic.h                                |    2 +-
 io/fcntl.h                                      |    4 +-
 malloc/malloc.c                                 |    2 +-
 nptl/ChangeLog                                  |    6 +
 nptl/Versions                                   |    1 +
 nptl/alloca_cutoff.c                            |    3 +-
 nscd/hstcache.c                                 |   27 ++++-
 nss/nss_files/files-hosts.c                     |   61 ++++++++++-
 posix/regexec.c                                 |    2 +
 resolv/nss_dns/dns-host.c                       |    7 +-
 shadow/sgetspent.c                              |    6 +-
 stdio-common/Makefile                           |    5 +-
 stdio-common/printf_fp.c                        |   23 +++--
 stdio-common/tst-grouping.c                     |   83 +++++++++++++++
 stdlib/msort.c                                  |    6 +-
 string/bits/string3.h                           |    8 +-
 sysdeps/i386/Makefile                           |    1 +
 sysdeps/i386/fpu/libm-test-ulps                 |    4 +-
 sysdeps/posix/getaddrinfo.c                     |    1 +
 sysdeps/unix/readdir_r.c                        |    3 +-
 sysdeps/unix/sysv/linux/bits/socket.h           |    8 +-
 sysdeps/unix/sysv/linux/i386/bits/mman.h        |    4 +-
 sysdeps/unix/sysv/linux/ia64/bits/mman.h        |    4 +-
 sysdeps/unix/sysv/linux/mkdirat.c               |    4 +-
 sysdeps/unix/sysv/linux/powerpc/bits/mman.h     |    4 +-
 sysdeps/unix/sysv/linux/s390/bits/mman.h        |    4 +-
 sysdeps/unix/sysv/linux/sh/bits/mman.h          |    4 +-
 sysdeps/unix/sysv/linux/sparc/bits/mman.h       |    4 +-
 sysdeps/unix/sysv/linux/sparc/bits/socket.h     |   12 ++-
 sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c  |    2 +-
 sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c |    1 +
 sysdeps/unix/sysv/linux/x86_64/bits/mman.h      |    5 +-
 wcsmbs/bits/wchar2.h                            |   44 ++++----
 wcsmbs/wchar.h                                  |    6 +-
 38 files changed, 437 insertions(+), 90 deletions(-)
 create mode 100644 stdio-common/tst-grouping.c


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



More information about the Glibc-cvs mailing list