GNU C Library master sources branch, release/2.11/master, updated. glibc-2.11.2-15-g0cd8f10

pasky@sourceware.org pasky@sourceware.org
Mon Nov 1 21:31:00 GMT 2010


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  0cd8f10947cd557d35175cab5f38c4e38fab646a (commit)
       via  cd8ba92d3437c83cefdc31ed493cc3731ceec356 (commit)
       via  b0017251495765077d536b43d84bcdbdefe752f4 (commit)
       via  a99e880cd8826e07630a2d208180541adeb89b75 (commit)
       via  831daea2c92d35caeba600e9d9052348466e2d83 (commit)
       via  38e894eec8a26e302859840cd1f2de4387e24357 (commit)
       via  0a15401613d381271618c7d4a2cac549ba3f2a2c (commit)
       via  88731ee9162c68b851d94e2b8f3dcb1a5f88f11f (commit)
       via  a4c0656f24f9a969060104beed261f5b6fb5cc80 (commit)
       via  f4b045b4b91642b18bc5cb7721d2a2bcef1aedc6 (commit)
      from  21580967038a0150e330e56508ec4f04fdf0f490 (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=0cd8f10947cd557d35175cab5f38c4e38fab646a

commit 0cd8f10947cd557d35175cab5f38c4e38fab646a
Author: Richard Li <richardpku@gmail.com>
Date:   Mon Oct 25 14:13:17 2010 -0400

    Fix x86-64 strchr propagation of search byte into all bytes of SSE register
    
    (cherry picked from commit dbf3a06904168417a05882a871342e7a9ee3b383)

diff --git a/ChangeLog b/ChangeLog
index 69117a6..88a0dc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-25  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #12159]
+	* sysdeps/x86_64/multiarch/strchr.S: Fix propagation of search byte
+	into all bytes of SSE register.
+	Patch by Richard Li <richardpku@gmail.com>.
+
 2010-10-22  Andreas Schwab  <schwab@redhat.com>
 
 	* include/dlfcn.h (__RTLD_SECURE): Define.
diff --git a/sysdeps/x86_64/multiarch/strchr.S b/sysdeps/x86_64/multiarch/strchr.S
index b35566d..44538aa 100644
--- a/sysdeps/x86_64/multiarch/strchr.S
+++ b/sysdeps/x86_64/multiarch/strchr.S
@@ -1,5 +1,5 @@
 /* strchr with SSE4.2
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 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
@@ -87,13 +87,13 @@ __strchr_sse42:
 	pxor	%xmm2, %xmm2
 	movd	%esi, %xmm1
 	movl	%edi, %ecx
+	pshufb  %xmm2, %xmm1
 	andl	$15, %ecx
 	movq	%rdi, %r8
 	je	L(aligned_start)
 
 /* Handle unaligned string.  */
 	andq	$-16, %r8
-	pshufb  %xmm2, %xmm1
 	movdqa	(%r8), %xmm0
 	pcmpeqb	 %xmm0, %xmm2
 	pcmpeqb	 %xmm1, %xmm0

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

commit cd8ba92d3437c83cefdc31ed493cc3731ceec356
Author: Andreas Schwab <schwab@redhat.com>
Date:   Sun Oct 24 21:43:15 2010 -0400

    Require suid bit on audit objects in privileged programs
    (cherry picked from commit 8e9f92e9d5d7737afdacf79b76d98c4c42980508)

diff --git a/ChangeLog b/ChangeLog
index 9b5d92a..69117a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-22  Andreas Schwab  <schwab@redhat.com>
+
+	* include/dlfcn.h (__RTLD_SECURE): Define.
+	* elf/dl-load.c (_dl_map_object): Remove preloaded parameter.  Use
+	mode & __RTLD_SECURE instead.
+	(open_path): Rename preloaded parameter to secure.
+	* sysdeps/generic/ldsodefs.h (_dl_map_object): Adjust declaration.
+	* elf/dl-open.c (dl_open_worker): Adjust call to _dl_map_object.
+	* elf/dl-deps.c (openaux): Likewise.
+	* elf/rtld.c (struct map_args): Remove is_preloaded.
+	(map_doit): Don't use it.
+	(dl_main): Likewise.
+	(do_preload): Use __RTLD_SECURE instead of is_preloaded.
+	(dlmopen_doit): Add __RTLD_SECURE to mode bits.
+
 2010-10-06  Ulrich Drepper  <drepper@gmail.com>
 
 	* string/bug-strstr1.c: New file.
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index 34c6024..7191508 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -62,7 +62,7 @@ openaux (void *a)
 {
   struct openaux_args *args = (struct openaux_args *) a;
 
-  args->aux = _dl_map_object (args->map, args->name, 0,
+  args->aux = _dl_map_object (args->map, args->name,
 			      (args->map->l_type == lt_executable
 			       ? lt_library : args->map->l_type),
 			      args->trace_mode, args->open_mode,
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 597193c..8a8ffb4 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1802,7 +1802,7 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
    if MAY_FREE_DIRS is true.  */
 
 static int
-open_path (const char *name, size_t namelen, int preloaded,
+open_path (const char *name, size_t namelen, int secure,
 	   struct r_search_path_struct *sps, char **realname,
 	   struct filebuf *fbp, struct link_map *loader, int whatcode,
 	   bool *found_other_class)
@@ -1884,7 +1884,7 @@ open_path (const char *name, size_t namelen, int preloaded,
 	  /* Remember whether we found any existing directory.  */
 	  here_any |= this_dir->status[cnt] != nonexisting;
 
-	  if (fd != -1 && __builtin_expect (preloaded, 0)
+	  if (fd != -1 && __builtin_expect (secure, 0)
 	      && INTUSE(__libc_enable_secure))
 	    {
 	      /* This is an extra security effort to make sure nobody can
@@ -1953,7 +1953,7 @@ open_path (const char *name, size_t namelen, int preloaded,
 
 struct link_map *
 internal_function
-_dl_map_object (struct link_map *loader, const char *name, int preloaded,
+_dl_map_object (struct link_map *loader, const char *name,
 		int type, int trace_mode, int mode, Lmid_t nsid)
 {
   int fd;
@@ -2057,7 +2057,8 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
 	  for (l = loader; l; l = l->l_loader)
 	    if (cache_rpath (l, &l->l_rpath_dirs, DT_RPATH, "RPATH"))
 	      {
-		fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs,
+		fd = open_path (name, namelen, mode & __RTLD_SECURE,
+				&l->l_rpath_dirs,
 				&realname, &fb, loader, LA_SER_RUNPATH,
 				&found_other_class);
 		if (fd != -1)
@@ -2072,14 +2073,15 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
 	      && main_map != NULL && main_map->l_type != lt_loaded
 	      && cache_rpath (main_map, &main_map->l_rpath_dirs, DT_RPATH,
 			      "RPATH"))
-	    fd = open_path (name, namelen, preloaded, &main_map->l_rpath_dirs,
+	    fd = open_path (name, namelen, mode & __RTLD_SECURE,
+			    &main_map->l_rpath_dirs,
 			    &realname, &fb, loader ?: main_map, LA_SER_RUNPATH,
 			    &found_other_class);
 	}
 
       /* Try the LD_LIBRARY_PATH environment variable.  */
       if (fd == -1 && env_path_list.dirs != (void *) -1)
-	fd = open_path (name, namelen, preloaded, &env_path_list,
+	fd = open_path (name, namelen, mode & __RTLD_SECURE, &env_path_list,
 			&realname, &fb,
 			loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded,
 			LA_SER_LIBPATH, &found_other_class);
@@ -2088,12 +2090,12 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
       if (fd == -1 && loader != NULL
 	  && cache_rpath (loader, &loader->l_runpath_dirs,
 			  DT_RUNPATH, "RUNPATH"))
-	fd = open_path (name, namelen, preloaded,
+	fd = open_path (name, namelen, mode & __RTLD_SECURE,
 			&loader->l_runpath_dirs, &realname, &fb, loader,
 			LA_SER_RUNPATH, &found_other_class);
 
       if (fd == -1
-	  && (__builtin_expect (! preloaded, 1)
+	  && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
 	      || ! INTUSE(__libc_enable_secure)))
 	{
 	  /* Check the list of libraries in the file /etc/ld.so.cache,
@@ -2159,7 +2161,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
 	  && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
 	      || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
 	  && rtld_search_dirs.dirs != (void *) -1)
-	fd = open_path (name, namelen, preloaded, &rtld_search_dirs,
+	fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
 			&realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
 
       /* Add another newline when we are tracing the library loading.  */
diff --git a/elf/dl-open.c b/elf/dl-open.c
index e920c77..2d3932f 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -251,7 +251,7 @@ dl_open_worker (void *a)
 
   /* Load the named object.  */
   struct link_map *new;
-  args->map = new = _dl_map_object (call_map, file, 0, lt_loaded, 0,
+  args->map = new = _dl_map_object (call_map, file, lt_loaded, 0,
 				    mode | __RTLD_CALLMAP, args->nsid);
 
   /* If the pointer returned is NULL this means the RTLD_NOLOAD flag is
diff --git a/elf/rtld.c b/elf/rtld.c
index 55b84c3..5b7eabc 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -588,7 +588,6 @@ struct map_args
   /* Argument to map_doit.  */
   char *str;
   struct link_map *loader;
-  int is_preloaded;
   int mode;
   /* Return value of map_doit.  */
   struct link_map *map;
@@ -626,16 +625,17 @@ static void
 map_doit (void *a)
 {
   struct map_args *args = (struct map_args *) a;
-  args->map = _dl_map_object (args->loader, args->str,
-			      args->is_preloaded, lt_library, 0, args->mode,
-			      LM_ID_BASE);
+  args->map = _dl_map_object (args->loader, args->str, lt_library, 0,
+			      args->mode, LM_ID_BASE);
 }
 
 static void
 dlmopen_doit (void *a)
 {
   struct dlmopen_args *args = (struct dlmopen_args *) a;
-  args->map = _dl_open (args->fname, RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT,
+  args->map = _dl_open (args->fname,
+			(RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT
+			 | __RTLD_SECURE),
 			dl_main, LM_ID_NEWLM, _dl_argc, INTUSE(_dl_argv),
 			__environ);
 }
@@ -805,8 +805,7 @@ do_preload (char *fname, struct link_map *main_map, const char *where)
 
   args.str = fname;
   args.loader = main_map;
-  args.is_preloaded = 1;
-  args.mode = 0;
+  args.mode = __RTLD_SECURE;
 
   unsigned int old_nloaded = GL(dl_ns)[LM_ID_BASE]._ns_nloaded;
 
@@ -1052,7 +1051,6 @@ of this helper program; chances are you did not intend to run this program.\n\
 
 	  args.str = rtld_progname;
 	  args.loader = NULL;
-	  args.is_preloaded = 0;
 	  args.mode = __RTLD_OPENEXEC;
 	  (void) _dl_catch_error (&objname, &err_str, &malloced, map_doit,
 				  &args);
@@ -1064,7 +1062,7 @@ of this helper program; chances are you did not intend to run this program.\n\
       else
 	{
 	  HP_TIMING_NOW (start);
-	  _dl_map_object (NULL, rtld_progname, 0, lt_library, 0,
+	  _dl_map_object (NULL, rtld_progname, lt_library, 0,
 			  __RTLD_OPENEXEC, LM_ID_BASE);
 	  HP_TIMING_NOW (stop);
 
diff --git a/include/dlfcn.h b/include/dlfcn.h
index a67426d..af92483 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -9,6 +9,7 @@
 #define __RTLD_OPENEXEC	0x20000000
 #define __RTLD_CALLMAP	0x10000000
 #define __RTLD_AUDIT	0x08000000
+#define __RTLD_SECURE	0x04000000 /* Apply additional security checks.  */
 
 #define __LM_ID_CALLER	-2
 
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index e18e60f..707e859 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -820,11 +820,9 @@ extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *),
 
 /* Open the shared object NAME and map in its segments.
    LOADER's DT_RPATH is used in searching for NAME.
-   If the object is already opened, returns its existing map.
-   For preloaded shared objects PRELOADED is set to a non-zero
-   value to allow additional security checks.  */
+   If the object is already opened, returns its existing map.  */
 extern struct link_map *_dl_map_object (struct link_map *loader,
-					const char *name, int preloaded,
+					const char *name,
 					int type, int trace_mode, int mode,
 					Lmid_t nsid)
      internal_function attribute_hidden;

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

commit b0017251495765077d536b43d84bcdbdefe752f4
Author: H.J. Lu <hongjiu.lu@intel.com>
Date:   Wed Oct 13 22:12:03 2010 -0400

    Fix alignment of AVX safe area on x86-64.
    
    (cherry picked from commit f90681487d90a6eea8f1c60021bc8dd83313c59b)

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index dc3b4dc..bb2e5dc 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #12113]
+	* sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
+	* sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
+	of "struct pthread".
+
 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
 
 	* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
diff --git a/nptl/sysdeps/x86_64/pthreaddef.h b/nptl/sysdeps/x86_64/pthreaddef.h
index be63a8c..8ec135c 100644
--- a/nptl/sysdeps/x86_64/pthreaddef.h
+++ b/nptl/sysdeps/x86_64/pthreaddef.h
@@ -27,8 +27,9 @@
 /* Minimal stack size after allocating thread descriptor and guard size.  */
 #define MINIMAL_REST_STACK	2048
 
-/* Alignment requirement for TCB.  */
-#define TCB_ALIGNMENT		16
+/* Alignment requirement for TCB.  Need to store post-AVX vector registers
+   in the TCB and we want the storage to be aligned at 32-byte.  */
+#define TCB_ALIGNMENT		32
 
 
 /* Location of current stack frame.  The frame pointer is not usable.  */
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index e39eb5f..41b5e6d 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -117,12 +117,7 @@ typedef struct
 # define TLS_TCB_SIZE sizeof (struct pthread)
 
 /* Alignment requirements for the TCB.  */
-//# define TLS_TCB_ALIGN __alignof__ (struct pthread)
-// Normally the above would be correct  But we have to store post-AVX
-// vector registers in the TCB and we want the storage to be aligned.
-// unfortunately there isn't yet a type for these values and hence no
-// 32-byte alignment requirement.  Make this explicit, for now.
-# define TLS_TCB_ALIGN 32
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
 
 /* The TCB can have any size and the memory following the address the
    thread pointer points to is unspecified.  Allocate the TCB there.  */

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

commit a99e880cd8826e07630a2d208180541adeb89b75
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Wed Oct 6 13:48:51 2010 -0400

    Add test case for strstr problem.
    (cherry picked from commit 67a67b950be9741a4cf1ff3e75572204b06bec2e)

diff --git a/ChangeLog b/ChangeLog
index b83a6b1..9b5d92a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-06  Ulrich Drepper  <drepper@gmail.com>
+
+	* string/bug-strstr1.c: New file.
+	* string/Makefile: Add rules to build and run bug-strstr1.
+
 2010-10-05  Eric Blake  <eblake@redhat.com>
 
 	[BZ #12092]
diff --git a/string/Makefile b/string/Makefile
index db9b508..4ade150 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -54,7 +54,8 @@ tests		:= tester inl-tester noinl-tester testcopy test-ffs	\
 		   bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap	\
 		   tst-strtok tst-strxfrm bug-strcoll1 tst-strfry	\
 		   bug-strtok1 $(addprefix test-,$(strop-tests))	\
-		   bug-envz1 tst-strxfrm2 tst-endian tst-svc2
+		   bug-envz1 tst-strxfrm2 tst-endian tst-svc2		\
+		   bug-strstr1
 distribute	:= memcopy.h pagecopy.h tst-svc.expect test-string.h	\
 		   str-two-way.h
 
@@ -73,6 +74,7 @@ CFLAGS-tst-strlen.c = -fno-builtin
 CFLAGS-stratcliff.c = -fno-builtin
 CFLAGS-test-ffs.c = -fno-builtin
 CFLAGS-tst-inlcall.c = -fno-builtin
+CFLAGS-bug-strstr1.c = -fno-builtin
 
 ifeq ($(cross-compiling),no)
 tests: $(objpfx)tst-svc.out

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

commit 831daea2c92d35caeba600e9d9052348466e2d83
Author: Eric Blake <eblake@redhat.com>
Date:   Wed Oct 6 13:48:07 2010 -0400

    Fix strstr and memmem algorithm.
    (cherry picked from commit 5fb308bca2f333dcc835945be85e165cd7843d5b)

diff --git a/ChangeLog b/ChangeLog
index 08e448c..b83a6b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-05  Eric Blake  <eblake@redhat.com>
+
+	[BZ #12092]
+	* string/str-two-way.h (two_way_long_needle): Always clear memory
+	when skipping input due to the shift table.
+
 2010-10-03  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #12077]
diff --git a/string/bug-strstr1.c b/string/bug-strstr1.c
new file mode 100644
index 0000000..889de12
--- /dev/null
+++ b/string/bug-strstr1.c
@@ -0,0 +1,26 @@
+#include <stdio.h>
+#include <string.h>
+
+int main (int argc, char** argv)
+{
+  const char haystack[] =
+    "F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD_C3_A7_20_EF_BF_BD";
+
+  const char needle[] =
+    "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+
+  const char* sub = strstr (haystack, needle);
+
+  if (sub != NULL)
+    {
+      int j;
+
+      fprintf (stderr, "BUG: expected NULL, got:\n%s\n%s\n", sub, needle);
+      for (j = 0; needle[j] != '\0'; ++j)
+        putchar (needle[j] == sub[j] ? ' ' : '^');
+      puts ("");
+      return 1;
+    }
+
+  return 0;
+}
diff --git a/string/str-two-way.h b/string/str-two-way.h
index 87ed8a0..73c99d9 100644
--- a/string/str-two-way.h
+++ b/string/str-two-way.h
@@ -350,8 +350,8 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
 		     a byte out of place, there can be no match until
 		     after the mismatch.  */
 		  shift = needle_len - period;
-		  memory = 0;
 		}
+	      memory = 0;
 	      j += shift;
 	      continue;
 	    }

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

commit 38e894eec8a26e302859840cd1f2de4387e24357
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sun Oct 3 22:10:30 2010 -0400

    Fix handling of tail bytes of buffer in SSE2/SSSE3 x86-64 version strn{,case}cmp
    
    (cherry picked from commit 45db99c7d03e497a3320907e722270fb7ee852f3)

diff --git a/ChangeLog b/ChangeLog
index 5b36411..08e448c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-10-03  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12077]
+	* sysdeps/x86_64/strcmp.S: Fix handling of remaining bytes in buffer
+	for strncmp and strncasecmp.
+	* string/stratcliff.c: Add tests for strcmp and strncmp.
+	* wcsmbs/wcsatcliff.c: Adjust for stratcliff change.
+
 2010-06-02  Kirill A. Shutemov  <kirill@shutemov.name>
 
 	* elf/dl-reloc.c: Flush cache after solving TEXTRELs if arch
diff --git a/string/stratcliff.c b/string/stratcliff.c
index 2bb5982..5165be2 100644
--- a/string/stratcliff.c
+++ b/string/stratcliff.c
@@ -1,5 +1,6 @@
 /* Test for string function add boundaries of usable memory.
-   Copyright (C) 1996,1997,1999-2003,2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1996,1997,1999-2003,2007,2009,2010
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -47,6 +48,8 @@
 # define MEMCPY memcpy
 # define MEMPCPY mempcpy
 # define MEMCHR memchr
+# define STRCMP strcmp
+# define STRNCMP strncmp
 #endif
 
 
@@ -70,12 +73,12 @@ do_test (void)
   if (adr == MAP_FAILED || dest == MAP_FAILED)
     {
       if (errno == ENOSYS)
-        puts ("No test, mmap not available.");
+	puts ("No test, mmap not available.");
       else
-        {
-          printf ("mmap failed: %m");
-          result = 1;
-        }
+	{
+	  printf ("mmap failed: %m");
+	  result = 1;
+	}
     }
   else
     {
@@ -93,8 +96,8 @@ do_test (void)
 
       /* strlen/wcslen test */
       for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
-        {
-          for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
+	{
+	  for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
 	    {
 	      adr[inner] = L('\0');
 
@@ -107,12 +110,12 @@ do_test (void)
 
 	      adr[inner] = L('T');
 	    }
-        }
+	}
 
       /* strnlen/wcsnlen test */
       for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
-        {
-          for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
+	{
+	  for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
 	    {
 	      adr[inner] = L('\0');
 
@@ -126,9 +129,9 @@ do_test (void)
 
 	      adr[inner] = L('T');
 	    }
-        }
+	}
       for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
-        {
+	{
 	  for (inner = MAX (outer, nchars - 64); inner <= nchars; ++inner)
 	    {
 	      if (STRNLEN (&adr[outer], inner - outer)
@@ -139,11 +142,11 @@ do_test (void)
 		  result = 1;
 		}
 	    }
-        }
+	}
 
       /* strchr/wcschr test */
       for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
-        {
+	{
 	  for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
 	    {
 	      for (inner = middle; inner < nchars; ++inner)
@@ -167,7 +170,7 @@ do_test (void)
 		  adr[middle] = L('T');
 		}
 	    }
-        }
+	}
 
       /* Special test.  */
       adr[nchars - 1] = L('\0');
@@ -180,7 +183,7 @@ do_test (void)
 
       /* strrchr/wcsrchr test */
       for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
-        {
+	{
 	  for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
 	    {
 	      for (inner = middle; inner < nchars; ++inner)
@@ -204,11 +207,11 @@ do_test (void)
 		  adr[middle] = L('T');
 		}
 	    }
-        }
+	}
 
       /* memchr test */
       for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
-        {
+	{
 	  for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
 	    {
 	      adr[middle] = L('V');
@@ -224,9 +227,9 @@ do_test (void)
 
 	      adr[middle] = L('T');
 	    }
-        }
+	}
       for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
-        {
+	{
 	  CHAR *cp = MEMCHR (&adr[outer], L('V'), nchars - outer);
 
 	  if (cp != NULL)
@@ -235,13 +238,13 @@ do_test (void)
 		      STRINGIFY (MEMCHR), outer);
 	      result = 1;
 	    }
-        }
+	}
 
       /* This function only exists for single-byte characters.  */
 #ifndef WCSTEST
       /* rawmemchr test */
       for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
-        {
+	{
 	  for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
 	    {
 	      adr[middle] = L('V');
@@ -257,13 +260,13 @@ do_test (void)
 
 	      adr[middle] = L('T');
 	    }
-        }
+	}
 #endif
 
       /* strcpy/wcscpy test */
       for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
-        {
-          for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
+	{
+	  for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
 	    {
 	      adr[inner] = L('\0');
 
@@ -277,7 +280,74 @@ do_test (void)
 
 	      adr[inner] = L('T');
 	    }
-        }
+	}
+
+      /* strcmp/wcscmp tests */
+      for (outer = 1; outer < 32; ++outer)
+	for (middle = 0; middle < 16; ++middle)
+	  {
+	    MEMSET (adr + middle, L('T'), 256);
+	    adr[256] = L('\0');
+	    MEMSET (dest + nchars - outer, L('T'), outer - 1);
+	    dest[nchars - 1] = L('\0');
+
+	    if (STRCMP (adr + middle, dest + nchars - outer) <= 0)
+	      {
+		printf ("%s 1 flunked for outer = %d, middle = %d\n",
+			STRINGIFY (STRCMP), outer, middle);
+		result = 1;
+	      }
+
+	    if (STRCMP (dest + nchars - outer, adr + middle) >= 0)
+	      {
+		printf ("%s 2 flunked for outer = %d, middle = %d\n",
+			STRINGIFY (STRCMP), outer, middle);
+		result = 1;
+	      }
+	  }
+
+      /* strncmp/wcsncmp tests */
+      for (outer = 1; outer < 32; ++outer)
+	for (middle = 0; middle < 16; ++middle)
+	  {
+	    MEMSET (adr + middle, L('T'), 256);
+	    adr[256] = L('\0');
+	    MEMSET (dest + nchars - outer, L('T'), outer - 1);
+	    dest[nchars - 1] = L('U');
+
+	    for (inner = 0; inner < outer; ++inner)
+	      {
+		if (STRNCMP (adr + middle, dest + nchars - outer, inner) != 0)
+		  {
+		    printf ("%s 1 flunked for outer = %d, middle = %d, "
+			    "inner = %d\n",
+			    STRINGIFY (STRNCMP), outer, middle, inner);
+		    result = 1;
+		  }
+
+		if (STRNCMP (dest + nchars - outer, adr + middle, inner) != 0)
+		  {
+		    printf ("%s 2 flunked for outer = %d, middle = %d, "
+			    "inner = %d\n",
+			    STRINGIFY (STRNCMP), outer, middle, inner);
+		    result = 1;
+		  }
+	      }
+
+	    if (STRNCMP (adr + middle, dest + nchars - outer, outer) >= 0)
+	      {
+		printf ("%s 1 flunked for outer = %d, middle = %d, full\n",
+			STRINGIFY (STRNCMP), outer, middle);
+		result = 1;
+	      }
+
+	    if (STRNCMP (dest + nchars - outer, adr + middle, outer) <= 0)
+	      {
+		printf ("%s 2 flunked for outer = %d, middle = %d, full\n",
+			STRINGIFY (STRNCMP), outer, middle);
+		result = 1;
+	      }
+	  }
 
       /* strncpy/wcsncpy tests */
       adr[nchars - 1] = L('T');
@@ -295,12 +365,12 @@ do_test (void)
 		  result = 1;
 		}
 	    }
-        }
+	}
       adr[nchars - 1] = L('\0');
 
       for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
-        {
-          for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
+	{
+	  for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
 	    {
 	      size_t len;
 
@@ -334,12 +404,12 @@ do_test (void)
 
 	      adr[inner] = L('T');
 	    }
-        }
+	}
 
       /* stpcpy/wcpcpy test */
       for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
-        {
-          for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
+	{
+	  for (inner = MAX (outer, nchars - 64); inner < nchars; ++inner)
 	    {
 	      adr[inner] = L('\0');
 
@@ -352,7 +422,7 @@ do_test (void)
 
 	      adr[inner] = L('T');
 	    }
-        }
+	}
 
       /* stpncpy/wcpncpy test */
       adr[nchars - 1] = L('T');
@@ -374,8 +444,8 @@ do_test (void)
       adr[nchars - 1] = L('\0');
 
       for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
-        {
-          for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
+	{
+	  for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
 	    {
 	      adr[middle] = L('\0');
 
@@ -393,7 +463,7 @@ do_test (void)
 
 	      adr[middle] = L('T');
 	    }
-        }
+	}
 
       /* memcpy/wmemcpy test */
       for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
diff --git a/sysdeps/x86_64/strcmp.S b/sysdeps/x86_64/strcmp.S
index 650ec17..e0847a2 100644
--- a/sysdeps/x86_64/strcmp.S
+++ b/sysdeps/x86_64/strcmp.S
@@ -313,7 +313,7 @@ LABEL(nibble_ashr_1):
 	jnz	LABEL(ashr_1_exittail)	/* find null char*/
 
 #ifdef USE_AS_STRNCMP
-	cmp	$14, %r11
+	cmp	$15, %r11
 	jbe	LABEL(ashr_1_exittail)
 #endif
 
@@ -438,7 +438,7 @@ LABEL(nibble_ashr_2):
 	jnz	LABEL(ashr_2_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$13, %r11
+	cmp	$14, %r11
 	jbe	LABEL(ashr_2_exittail)
 #endif
 
@@ -560,7 +560,7 @@ LABEL(nibble_ashr_3):
 	jnz	LABEL(ashr_3_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$12, %r11
+	cmp	$13, %r11
 	jbe	LABEL(ashr_3_exittail)
 #endif
 
@@ -682,7 +682,7 @@ LABEL(nibble_ashr_4):
 	jnz	LABEL(ashr_4_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$11, %r11
+	cmp	$12, %r11
 	jbe	LABEL(ashr_4_exittail)
 #endif
 
@@ -804,7 +804,7 @@ LABEL(nibble_ashr_5):
 	jnz	LABEL(ashr_5_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$10, %r11
+	cmp	$11, %r11
 	jbe	LABEL(ashr_5_exittail)
 #endif
 
@@ -926,7 +926,7 @@ LABEL(nibble_ashr_6):
 	jnz	LABEL(ashr_6_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$9, %r11
+	cmp	$10, %r11
 	jbe	LABEL(ashr_6_exittail)
 #endif
 
@@ -1048,7 +1048,7 @@ LABEL(nibble_ashr_7):
 	jnz	LABEL(ashr_7_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$8, %r11
+	cmp	$9, %r11
 	jbe	LABEL(ashr_7_exittail)
 #endif
 
@@ -1170,7 +1170,7 @@ LABEL(nibble_ashr_8):
 	jnz	LABEL(ashr_8_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$7, %r11
+	cmp	$8, %r11
 	jbe	LABEL(ashr_8_exittail)
 #endif
 
@@ -1292,7 +1292,7 @@ LABEL(nibble_ashr_9):
 	jnz	LABEL(ashr_9_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$6, %r11
+	cmp	$7, %r11
 	jbe	LABEL(ashr_9_exittail)
 #endif
 
@@ -1414,7 +1414,7 @@ LABEL(nibble_ashr_10):
 	jnz	LABEL(ashr_10_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$5, %r11
+	cmp	$6, %r11
 	jbe	LABEL(ashr_10_exittail)
 #endif
 
@@ -1536,7 +1536,7 @@ LABEL(nibble_ashr_11):
 	jnz	LABEL(ashr_11_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$4, %r11
+	cmp	$5, %r11
 	jbe	LABEL(ashr_11_exittail)
 #endif
 
@@ -1658,7 +1658,7 @@ LABEL(nibble_ashr_12):
 	jnz	LABEL(ashr_12_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$3, %r11
+	cmp	$4, %r11
 	jbe	LABEL(ashr_12_exittail)
 #endif
 
@@ -1780,7 +1780,7 @@ LABEL(nibble_ashr_13):
 	jnz	LABEL(ashr_13_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$2, %r11
+	cmp	$3, %r11
 	jbe	LABEL(ashr_13_exittail)
 #endif
 
@@ -1902,7 +1902,7 @@ LABEL(nibble_ashr_14):
 	jnz	LABEL(ashr_14_exittail)
 
 #ifdef USE_AS_STRNCMP
-	cmp	$1, %r11
+	cmp	$2, %r11
 	jbe	LABEL(ashr_14_exittail)
 #endif
 
@@ -2026,8 +2026,8 @@ LABEL(nibble_ashr_15):
 	jnz	LABEL(ashr_15_exittail)
 
 #ifdef USE_AS_STRNCMP
-	test	%r11, %r11
-	je	LABEL(ashr_15_exittail)
+	cmpq	$1, %r11
+	jbe	LABEL(ashr_15_exittail)
 #endif
 
 	pxor	%xmm0, %xmm0
diff --git a/wcsmbs/wcsatcliff.c b/wcsmbs/wcsatcliff.c
index b29571f..95afff6 100644
--- a/wcsmbs/wcsatcliff.c
+++ b/wcsmbs/wcsatcliff.c
@@ -16,6 +16,8 @@
 #define MEMCPY wmemcpy
 #define MEMPCPY wmempcpy
 #define MEMCHR wmemchr
+#define STRCMP wcscmp
+#define STRNCMP wcsncmp
 
 
 #include "../string/stratcliff.c"

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

commit 0a15401613d381271618c7d4a2cac549ba3f2a2c
Author: Kirill A. Shutemov <kirill@shutemov.name>
Date:   Mon Jun 14 17:23:01 2010 -0700

    Flush cache after solving TEXTRELs if arch requires it.
    (cherry picked from commit 80da2e093c0e465cfa6e561488aac51c236b6fd2)

diff --git a/ChangeLog b/ChangeLog
index 1ec9227..5b36411 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-02  Kirill A. Shutemov  <kirill@shutemov.name>
+
+	* elf/dl-reloc.c: Flush cache after solving TEXTRELs if arch
+	requires it.
+
 2010-06-02  Andreas Schwab  <schwab@redhat.com>
 
 	* nis/nss_nis/nis-initgroups.c (get_uid): Properly resize buffer.
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 6c00691..23cb59c 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -1,5 +1,5 @@
 /* Relocate a shared object and resolve its references to other loaded objects.
-   Copyright (C) 1995-2006, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1995-2006, 2008, 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
@@ -307,6 +307,10 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
 	  goto call_error;
 	}
 
+#ifdef CLEAR_CACHE
+      CLEAR_CACHE (textrels->start, textrels->start + textrels->len);
+#endif
+
       textrels = textrels->next;
     }
 

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

commit 88731ee9162c68b851d94e2b8f3dcb1a5f88f11f
Author: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
Date:   Mon Jun 14 16:56:22 2010 -0700

    [sh] Fix incorrect location of ifndef for __ASSUME_FUTEX_CLOCK_REALTIME.
    (cherry picked from commit 4bc93b30337482a0ad1758b4ba069704d09c39da)

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 08a55ee..dc3b4dc 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
+
+	* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
+	location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
+
 2009-11-27  Andreas Schwab  <schwab@redhat.com>
 
 	* sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
index 49b4e6d..0d02083 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
+/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -282,6 +282,7 @@ __lll_timedlock_wait:
 	rts
 	 mov.l	@r15+, r12
 
+# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 	.align	2
 # ifdef PIC
 .Lgot:
@@ -293,7 +294,6 @@ __lll_timedlock_wait:
 	.long	__have_futex_clock_realtime
 # endif
 
-# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 .Lreltmo:
 	/* Check for a valid timeout value.  */
 	mov.l	@(4,r6), r1

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

commit a4c0656f24f9a969060104beed261f5b6fb5cc80
Author: Andreas Schwab <schwab@redhat.com>
Date:   Mon Jun 14 16:54:43 2010 -0700

    Fix use of extend_alloca in NIS
    (cherry picked from commit caa78cf824f98d6f02f2e39cb9cf253c8553946f)

diff --git a/ChangeLog b/ChangeLog
index 1732fe5..1ec9227 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-02  Andreas Schwab  <schwab@redhat.com>
+
+	* nis/nss_nis/nis-initgroups.c (get_uid): Properly resize buffer.
+
 2010-06-07  Jakub Jelinek  <jakub@redhat.com>
 
 	* libio/stdio.h (sscanf, vsscanf): Use __REDIRECT_NTH instead of
diff --git a/nis/nss_nis/nis-initgroups.c b/nis/nss_nis/nis-initgroups.c
index a5a3ba6..85b9eee 100644
--- a/nis/nss_nis/nis-initgroups.c
+++ b/nis/nss_nis/nis-initgroups.c
@@ -139,7 +139,7 @@ get_uid (const char *user, uid_t *uidp)
       if (r != ERANGE)
 	break;
 
-      extend_alloca (buf, buflen, 2 * buflen);
+      buf = extend_alloca (buf, buflen, 2 * buflen);
     }
 
   return 1;

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

commit f4b045b4b91642b18bc5cb7721d2a2bcef1aedc6
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Jun 14 08:18:26 2010 -0700

    Fix a couple of __REDIRECT () __THROW occurrences
    
    This patch fixes some cases which fail to parse with C++.
    (cherry picked from commit f32f28695d938597ad93177dc83225dcb3c69f74)

diff --git a/ChangeLog b/ChangeLog
index b03035f..1732fe5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-07  Jakub Jelinek  <jakub@redhat.com>
+
+	* libio/stdio.h (sscanf, vsscanf): Use __REDIRECT_NTH instead of
+	__REDIRECT followed by __THROW.
+	* wcsmbs/wchar.h (swscanf, vswscanf): Likewise.
+	* posix/getopt.h (getopt): Likewise.
+
 2010-05-26  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #11640]
diff --git a/libio/stdio.h b/libio/stdio.h
index d7d241c..a6d24e5 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -427,9 +427,9 @@ extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
 		       __isoc99_fscanf) __wur;
 extern int __REDIRECT (scanf, (__const char *__restrict __format, ...),
 		       __isoc99_scanf) __wur;
-extern int __REDIRECT (sscanf, (__const char *__restrict __s,
-				__const char *__restrict __format, ...),
-		       __isoc99_sscanf) __THROW;
+extern int __REDIRECT_NTH (sscanf, (__const char *__restrict __s,
+				    __const char *__restrict __format, ...),
+			   __isoc99_sscanf);
 # else
 extern int __isoc99_fscanf (FILE *__restrict __stream,
 			    __const char *__restrict __format, ...) __wur;
@@ -481,11 +481,11 @@ extern int __REDIRECT (vfscanf,
 extern int __REDIRECT (vscanf, (__const char *__restrict __format,
 				_G_va_list __arg), __isoc99_vscanf)
      __attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
-extern int __REDIRECT (vsscanf,
-		       (__const char *__restrict __s,
-			__const char *__restrict __format, _G_va_list __arg),
-		       __isoc99_vsscanf)
-     __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
+extern int __REDIRECT_NTH (vsscanf,
+			   (__const char *__restrict __s,
+			    __const char *__restrict __format,
+			    _G_va_list __arg), __isoc99_vsscanf)
+     __attribute__ ((__format__ (__scanf__, 2, 0)));
 #  else
 extern int __isoc99_vfscanf (FILE *__restrict __s,
 			     __const char *__restrict __format,
diff --git a/posix/getopt.h b/posix/getopt.h
index ff0251d..6e2fa27 100644
--- a/posix/getopt.h
+++ b/posix/getopt.h
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009
+   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009,2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -158,9 +158,9 @@ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
    additional functionality can be disable at runtime.  This redirection
    helps to also do this at runtime.  */
 #  ifdef __REDIRECT
-  extern int __REDIRECT (getopt, (int ___argc, char *const *___argv,
-				  const char *__shortopts),
-			 __posix_getopt) __THROW;
+  extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv,
+				      const char *__shortopts),
+			     __posix_getopt);
 #  else
 extern int __posix_getopt (int ___argc, char *const *___argv,
 			   const char *__shortopts) __THROW;
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 7a65911..eb5b244 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -658,10 +658,10 @@ extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,
 extern int __REDIRECT (wscanf, (__const wchar_t *__restrict __format, ...),
 		       __isoc99_wscanf)
      /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
-extern int __REDIRECT (swscanf, (__const wchar_t *__restrict __s,
-				 __const wchar_t *__restrict __format, ...),
-		       __isoc99_swscanf)
-     __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
+extern int __REDIRECT_NTH (swscanf, (__const wchar_t *__restrict __s,
+				     __const wchar_t *__restrict __format,
+				     ...), __isoc99_swscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
 #  else
 extern int __isoc99_fwscanf (__FILE *__restrict __stream,
 			     __const wchar_t *__restrict __format, ...);
@@ -712,10 +712,10 @@ extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,
 extern int __REDIRECT (vwscanf, (__const wchar_t *__restrict __format,
 				 __gnuc_va_list __arg), __isoc99_vwscanf)
      /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
-extern int __REDIRECT (vswscanf, (__const wchar_t *__restrict __s,
-				  __const wchar_t *__restrict __format,
-				  __gnuc_va_list __arg), __isoc99_vswscanf)
-     __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
+extern int __REDIRECT_NTH (vswscanf, (__const wchar_t *__restrict __s,
+				      __const wchar_t *__restrict __format,
+				      __gnuc_va_list __arg), __isoc99_vswscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
 #  else
 extern int __isoc99_vfwscanf (__FILE *__restrict __s,
 			      __const wchar_t *__restrict __format,

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

Summary of changes:
 ChangeLog                                      |   57 ++++++++++
 elf/dl-deps.c                                  |    2 +-
 elf/dl-load.c                                  |   20 ++--
 elf/dl-open.c                                  |    2 +-
 elf/dl-reloc.c                                 |    6 +-
 elf/rtld.c                                     |   16 +--
 include/dlfcn.h                                |    1 +
 libio/stdio.h                                  |   16 ++--
 nis/nss_nis/nis-initgroups.c                   |    2 +-
 nptl/ChangeLog                                 |   12 ++
 nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S |    4 +-
 nptl/sysdeps/x86_64/pthreaddef.h               |    5 +-
 nptl/sysdeps/x86_64/tls.h                      |    7 +-
 posix/getopt.h                                 |    8 +-
 string/Makefile                                |    4 +-
 string/bug-strstr1.c                           |   26 +++++
 string/str-two-way.h                           |    2 +-
 string/stratcliff.c                            |  144 ++++++++++++++++++------
 sysdeps/generic/ldsodefs.h                     |    6 +-
 sysdeps/x86_64/multiarch/strchr.S              |    4 +-
 sysdeps/x86_64/strcmp.S                        |   32 +++---
 wcsmbs/wchar.h                                 |   16 ++--
 wcsmbs/wcsatcliff.c                            |    2 +
 23 files changed, 281 insertions(+), 113 deletions(-)
 create mode 100644 string/bug-strstr1.c


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



More information about the Glibc-cvs mailing list