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

[commits] r11761 - in /trunk: libc/ libc/debug/ libc/elf/ libc/include/ libc/localedata/ libc/malloc/ libc/math/ libc/nptl/ libc/nptl/...



Author: joseph
Date: Tue Oct 12 13:15:00 2010
New Revision: 11761

Log:
Merge changes between r11460 and r11760 from /fsf/trunk.

	* sysdeps/powerpc/powerpc32/e500/fpu/feupdateenv.c (feupdateenv):
	Add libm_hidden_ver.
	* sysdeps/powerpc/powerpc32/e500/fpu/ftestexcept.c (fetestexcept):
	Add libm_hidden_def.

Added:
    trunk/libc/posix/bug-regex31.c
      - copied unchanged from r11760, fsf/trunk/libc/posix/bug-regex31.c
    trunk/libc/posix/bug-regex31.input
      - copied unchanged from r11760, fsf/trunk/libc/posix/bug-regex31.input
    trunk/libc/string/bug-strstr1.c
      - copied unchanged from r11760, fsf/trunk/libc/string/bug-strstr1.c
    trunk/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
      - copied unchanged from r11760, fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
    trunk/libc/sysdeps/powerpc/powerpc32/rtld-memset.c
      - copied unchanged from r11760, fsf/trunk/libc/sysdeps/powerpc/powerpc32/rtld-memset.c
    trunk/libc/sysdeps/powerpc/powerpc64/rtld-memset.c
      - copied unchanged from r11760, fsf/trunk/libc/sysdeps/powerpc/powerpc64/rtld-memset.c
    trunk/ports/sysdeps/alpha/memchr.c
      - copied unchanged from r11760, fsf/trunk/ports/sysdeps/alpha/memchr.c
    trunk/ports/sysdeps/unix/sysv/linux/alpha/fstatfs64.c
      - copied unchanged from r11760, fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/fstatfs64.c
    trunk/ports/sysdeps/unix/sysv/linux/alpha/fstatvfs.c
      - copied unchanged from r11760, fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/fstatvfs.c
    trunk/ports/sysdeps/unix/sysv/linux/alpha/fstatvfs64.c
      - copied unchanged from r11760, fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/fstatvfs64.c
    trunk/ports/sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c
      - copied unchanged from r11760, fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c
    trunk/ports/sysdeps/unix/sysv/linux/alpha/statfs64.c
      - copied unchanged from r11760, fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/statfs64.c
    trunk/ports/sysdeps/unix/sysv/linux/alpha/statvfs.c
      - copied unchanged from r11760, fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/statvfs.c
    trunk/ports/sysdeps/unix/sysv/linux/alpha/statvfs64.c
      - copied unchanged from r11760, fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/statvfs64.c
Removed:
    trunk/ports/sysdeps/alpha/alphaev6/memchr.S
    trunk/ports/sysdeps/alpha/memchr.S
Modified:
    trunk/libc/ChangeLog
    trunk/libc/ChangeLog.16
    trunk/libc/INSTALL
    trunk/libc/NEWS
    trunk/libc/debug/stack_chk_fail_local.c
    trunk/libc/debug/warning-nop.c
    trunk/libc/elf/dl-close.c
    trunk/libc/elf/dl-libc.c
    trunk/libc/elf/dl-load.c
    trunk/libc/elf/dl-support.c
    trunk/libc/elf/rtld.c
    trunk/libc/include/fenv.h
    trunk/libc/localedata/ChangeLog
    trunk/libc/malloc/mcheck.c
    trunk/libc/math/feupdateenv.c
    trunk/libc/math/ftestexcept.c
    trunk/libc/math/libm-test.inc
    trunk/libc/nptl/ChangeLog
    trunk/libc/nptl/sysdeps/pthread/pthread.h
    trunk/libc/posix/Makefile
    trunk/libc/posix/regcomp.c
    trunk/libc/posix/unistd.h
    trunk/libc/resolv/res_init.c
    trunk/libc/stdio-common/psiginfo.c
    trunk/libc/string/Makefile
    trunk/libc/string/str-two-way.h
    trunk/libc/string/stratcliff.c
    trunk/libc/sysdeps/i386/fpu/feupdateenv.c
    trunk/libc/sysdeps/i386/fpu/ftestexcept.c
    trunk/libc/sysdeps/i386/i686/multiarch/s_fmaf.c
    trunk/libc/sysdeps/ia64/fpu/feupdateenv.c
    trunk/libc/sysdeps/ia64/fpu/ftestexcept.c
    trunk/libc/sysdeps/powerpc/fpu/feupdateenv.c
    trunk/libc/sysdeps/powerpc/fpu/ftestexcept.c
    trunk/libc/sysdeps/s390/fpu/feupdateenv.c
    trunk/libc/sysdeps/s390/fpu/ftestexcept.c
    trunk/libc/sysdeps/s390/s390-32/__longjmp.c
    trunk/libc/sysdeps/s390/s390-32/elf/start.S
    trunk/libc/sysdeps/s390/s390-64/__longjmp.c
    trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h
    trunk/libc/sysdeps/sh/sh4/fpu/ftestexcept.c
    trunk/libc/sysdeps/sparc/fpu/feupdateenv.c
    trunk/libc/sysdeps/sparc/fpu/ftestexcept.c
    trunk/libc/sysdeps/unix/sysv/linux/check_pf.c
    trunk/libc/sysdeps/unix/sysv/linux/getdents.c
    trunk/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
    trunk/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
    trunk/libc/sysdeps/unix/sysv/linux/pathconf.c
    trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list
    trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
    trunk/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
    trunk/libc/sysdeps/x86_64/fpu/feupdateenv.c
    trunk/libc/sysdeps/x86_64/fpu/ftestexcept.c
    trunk/libc/sysdeps/x86_64/multiarch/s_fmaf.c
    trunk/libc/sysdeps/x86_64/strcmp.S
    trunk/libc/wcsmbs/wcsatcliff.c
    trunk/ports/ChangeLog.alpha
    trunk/ports/ChangeLog.arm
    trunk/ports/ChangeLog.eglibc
    trunk/ports/ChangeLog.m68k
    trunk/ports/ChangeLog.mips
    trunk/ports/ChangeLog.powerpc
    trunk/ports/sysdeps/arm/eabi/feupdateenv.c
    trunk/ports/sysdeps/arm/eabi/ftestexcept.c
    trunk/ports/sysdeps/arm/fpu/ftestexcept.c
    trunk/ports/sysdeps/m68k/fpu/feupdateenv.c
    trunk/ports/sysdeps/m68k/fpu/ftestexcept.c
    trunk/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
    trunk/ports/sysdeps/mips/fpu/feupdateenv.c
    trunk/ports/sysdeps/mips/fpu/ftestexcept.c
    trunk/ports/sysdeps/powerpc/nofpu/feupdateenv.c
    trunk/ports/sysdeps/powerpc/nofpu/ftestexcept.c
    trunk/ports/sysdeps/powerpc/powerpc32/e500/fpu/feupdateenv.c
    trunk/ports/sysdeps/powerpc/powerpc32/e500/fpu/ftestexcept.c
    trunk/ports/sysdeps/unix/sysv/linux/alpha/syscalls.list
    trunk/ports/sysdeps/unix/sysv/linux/arm/syscalls.list

Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Tue Oct 12 13:15:00 2010
@@ -1,3 +1,179 @@
+2010-10-12  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	[BZ #12078]
+	* posix/regcomp.c (parse_branch): One more memory leak plugged.
+	* posix/bug-regex31.input: Add test case.
+
+2010-10-11  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* posix/bug-regex31.c: Rewrite to run multiple tests from stdin.
+	* posix/bug-regex31.input: New file.
+
+	[BZ #12078]
+	* posix/regcomp.c (parse_branch): Free memory when allocation failed.
+	(parse_sub_exp): Fix last change, use postorder.
+
+	* posix/bug-regex31.c: New file.
+	* posix/Makefile: Add rules to build and run bug-regex31.
+
+	* posix/regcomp.c (parse_bracket_exp): Add missing re_free calls.
+
+	[BZ #12078]
+	* posix/regcomp.c (parse_sub_exp): Free tree data when it is not used.
+
+	[BZ #12108]
+	* stdio-common/psiginfo.c (psiginfo): Don't expext SIGRTMIN..SIGRTMAX
+	to have entries in sys_siglist.
+
+	[BZ #12093]
+	* sysdeps/unix/sysv/linux/check_pf.c (__check_pf): ->ifa_addr might
+	be NULL.
+
+2010-10-07  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	[BZ #3268]
+	* math/libm-test.inc (fma_test): Add 2 fmaf tests.
+	* sysdeps/ieee754/dbl-64/s_fmaf.c: New file.
+	* sysdeps/i386/i686/multiarch/s_fmaf.c: Include
+	sysdeps/ieee754/dbl-64/s_fmaf.c instead of math/s_fmaf.c.
+	* sysdeps/x86_64/multiarch/s_fmaf.c: Likewise.
+	* include/fenv.h (feupdateenv, fetestexcept): Add libm_hidden_proto.
+	* math/feupdateenv.c (feupdateenv): Add libm_hidden_ver.
+	* sysdeps/i386/fpu/feupdateenv.c (feupdateenv): Likewise.
+	* sysdeps/powerpc/fpu/feupdateenv.c (feupdateenv): Likewise.
+	* sysdeps/x86_64/fpu/feupdateenv.c (feupdateenv): Likewise.
+	* sysdeps/sparc/fpu/feupdateenv.c (feupdateenv): Likewise.
+	* sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Add libm_hidden_def.
+	* sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Likewise.
+	* math/ftestexcept.c (fetestexcept): Likewise.
+	* sysdeps/ia64/fpu/ftestexcept.c (fetestexcept): Likewise.
+	* sysdeps/i386/fpu/ftestexcept.c (fetestexcept): Likewise.
+	* sysdeps/s390/fpu/ftestexcept.c (fetestexcept): Likewise.
+	* sysdeps/powerpc/fpu/ftestexcept.c (fetestexcept): Likewise.
+	* sysdeps/x86_64/fpu/ftestexcept.c (fetestexcept): Likewise.
+	* sysdeps/sparc/fpu/ftestexcept.c (fetestexcept): Likewise.
+	* sysdeps/sh/sh4/fpu/ftestexcept.c (fetestexcept): Likewise.
+
+2010-10-11  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12107]
+	* stdio-common/psiginfo.c (psiginfo): Terminate all strings with
+	newline.
+
+2010-10-06  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* string/bug-strstr1.c: New file.
+	* string/Makefile: Add rules to build and run bug-strstr1.
+
+2010-10-05  Eric Blake  <eblake@xxxxxxxxxx>
+
+	[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@xxxxxxxxx>
+
+	[BZ #12005]
+	* malloc/mcheck.c: Handle large requests.
+
+	[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-09-28  Nobuhiro Iwamatsu  <iwamatsu@xxxxxxxxxxx>
+
+	* sysdeps/sh/sh4/fpu/fpu_control.h: Add 'extern "C"' protection to
+	__set_fpscr.
+
+2010-09-30  Andreas Jaeger  <aj@xxxxxxx>
+
+	* sysdeps/unix/sysv/linux_fsinfo.h (BTRFS_SUPER_MAGIC): Define.
+	(CGROUP_SUPER_MAGIC): Define.
+	* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
+	Handle btrfs and cgroup file systems.
+	* sysdeps/unix/sysv/linux/pathconf.c (__statfs_filesize_max):
+	Likewise.
+
+2010-09-27  Luis Machado  <luisgpm@xxxxxxxxxx>
+
+	* sysdeps/powerpc/powerpc32/rtld-memset.c: New file.
+	* sysdeps/powerpc/powerpc64/rtld-memset.c: New file.
+
+2010-09-29  Andreas Krebbel  <Andreas.Krebbel@xxxxxxxxxx>
+
+	[BZ #12067]
+	* sysdeps/s390/s390-32/elf/start.S: Fix address calculation when
+	trying to locate the ELF header.
+
+2010-09-27  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	[BZ #11611]
+	* sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS):
+	Mask out sign-bit copies when constructing f_fsid.
+
+2010-09-24  Petr Baudis <pasky@xxxxxxx>
+
+	* debug/stack_chk_fail_local.c: Add missing licence exception.
+	* debug/warning-nop.c: Likewise.
+
+2010-09-15  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): When
+	implementing getdents64 using getdents syscall, set d_type if
+	__ASSUME_GETDENTS32_D_TYPE.
+
+2010-09-16  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* elf/dl-close.c (free_slotinfo, free_mem): Move to...
+	* elf/dl-libc.c (free_slotinfo, free_mem): ... here.
+
+2010-09-21  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	[BZ #12037]
+	* posix/unistd.h: Undo change of feature selection for ftruncate from
+	2010-01-11.
+
+2010-09-20  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/x86_64/strcmp.S: Fix another typo in x86-64 strncasecmp limit
+	detection.
+
+2010-09-20  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Add
+	fanotify_mark.
+	* sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list: Likewise.
+
+2010-09-14  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/s390/s390-32/__longjmp.c (__longjmp): Define register
+	variables after CHECK_SP call.
+	* sysdeps/s390/s390-64/__longjmp.c (__longjmp): Likewise.
+
+2010-09-13  Andreas Schwab  <schwab@xxxxxxxxxx>
+	    Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* elf/rtld.c (dl_main): Set GLRO(dl_init_all_dirs) just before
+	re-relocationg ld.so.
+	* elf/dl-support.c (_dl_non_dynamic_init): And here after the
+	_dl_init_paths call.
+	* elf/dl-load.c (_dl_init_paths).  Don't set GLRO(dl_init_all_dirs)
+	here anymore.
+
+2010-09-14  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* resolv/res_init.c (__res_vinit): Count the default server we added.
+
+2010-09-08  Chung-Lin Tang  <cltang@xxxxxxxxxxxxxxxx>
+	    Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	[BZ #11968]
+	* sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
+	(____longjmp_chk): Use %ebx for saving value across system call.
+	Add unwind info.
+
 2010-09-06  Andreas Schwab  <schwab@xxxxxxxxxx>
 
 	* manual/Makefile: Don't mix pattern rules with normal rules.

Modified: trunk/libc/ChangeLog.16
==============================================================================
--- trunk/libc/ChangeLog.16 (original)
+++ trunk/libc/ChangeLog.16 Tue Oct 12 13:15:00 2010
@@ -660,7 +660,7 @@
 	* iconvdata/Makefile (generate-8bit-table): Use LC_ALL=C.
 	(generate-8bit-gap-table): Likewise.
 	($(objpfx)iso8859-7jp.stmp): Likewise.
-	Reported by S.Çağlar Onur <caglar@xxxxxxxxxxxxx>.
+	Reported by S.Çağlar Onur <caglar@xxxxxxxxxxxxx>.
 
 2006-03-21  Joseph S. Myers  <joseph@xxxxxxxxxxxxxxxx>
 
@@ -6927,7 +6927,7 @@
 2005-11-28  Andreas Jaeger  <aj@xxxxxxx>
 
 	* sysdeps/unix/sysv/linux/mips/bits/mman.h (MREMAP_FIXED): Added,
-	Patch by René Rebe <rene@xxxxxxxxxxxx>.
+	Patch by René Rebe <rene@xxxxxxxxxxxx>.
 
 2005-11-27  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
@@ -6939,7 +6939,7 @@
 2005-11-27  Roland McGrath  <roland@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/fchownat.c: Include alloca.h, sysdep.h.
-	Reported by René Rebe <rene@xxxxxxxxxxxx>.
+	Reported by René Rebe <rene@xxxxxxxxxxxx>.
 
 2005-11-27  Ulrich Drepper  <drepper@xxxxxxxxxx>
 

Modified: trunk/libc/INSTALL
==============================================================================
--- trunk/libc/INSTALL (original)
+++ trunk/libc/INSTALL Tue Oct 12 13:15:00 2010
@@ -329,11 +329,12 @@
      Check the FAQ for any special compiler issues on particular
      platforms.
 
-   * GNU `binutils' 2.15 or later
+   * GNU `binutils'
 
      You must use GNU `binutils' (as and ld) to build the GNU C library.
      No other assembler or linker has the necessary functionality at the
-     moment.
+     moment.  The configure scripts checks for the appropriate version
+     for the platform.  Too-old versions will prevent building glibc.
 
    * GNU `texinfo' 3.12f
 
@@ -472,4 +473,3 @@
 errors or omissions in this manual, please report them to the bug
 database.  If you refer to specific sections of the manual, please
 include the section names for easier identification.
-

Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Tue Oct 12 13:15:00 2010
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2010-8-25
+GNU C Library NEWS -- history of user-visible changes.  2010-10-11
 Copyright (C) 1992-2009, 2010 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -9,7 +9,8 @@
 
 * The following bugs are resolved with this release:
 
-  7066, 10851, 11640, 11701, 11840, 11856, 11883, 11903, 11904
+  3268, 7066, 10851, 11611, 11640, 11701, 11840, 11856, 11883, 11903, 11904,
+  11968, 11979, 12005, 12037, 12067, 12077, 12078, 12092, 12093, 12107, 12108
 
 * New Linux interfaces: prlimit, prlimit64, fanotify_init, fanotify_mark
 

Modified: trunk/libc/debug/stack_chk_fail_local.c
==============================================================================
--- trunk/libc/debug/stack_chk_fail_local.c (original)
+++ trunk/libc/debug/stack_chk_fail_local.c Tue Oct 12 13:15:00 2010
@@ -5,6 +5,23 @@
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
+
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file with other
+   programs, and to distribute those programs without any restriction
+   coming from the use of this file. (The GNU Lesser General Public
+   License restrictions do apply in other respects; for example, they
+   cover modification of the file, and distribution when not linked
+   into another program.)
+
+   Note that people who make modified versions of this file are not
+   obligated to grant this special exception for their modified
+   versions; it is their choice whether to do so. The GNU Lesser
+   General Public License gives permission to release a modified
+   version without this exception; this exception also makes it
+   possible to release a modified version which carries forward this
+   exception.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of

Modified: trunk/libc/debug/warning-nop.c
==============================================================================
--- trunk/libc/debug/warning-nop.c (original)
+++ trunk/libc/debug/warning-nop.c Tue Oct 12 13:15:00 2010
@@ -6,6 +6,23 @@
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
+
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file with other
+   programs, and to distribute those programs without any restriction
+   coming from the use of this file. (The GNU Lesser General Public
+   License restrictions do apply in other respects; for example, they
+   cover modification of the file, and distribution when not linked
+   into another program.)
+
+   Note that people who make modified versions of this file are not
+   obligated to grant this special exception for their modified
+   versions; it is their choice whether to do so. The GNU Lesser
+   General Public License gives permission to release a modified
+   version without this exception; this exception also makes it
+   possible to release a modified version which carries forward this
+   exception.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of

Modified: trunk/libc/elf/dl-close.c
==============================================================================
--- trunk/libc/elf/dl-close.c (original)
+++ trunk/libc/elf/dl-close.c Tue Oct 12 13:15:00 2010
@@ -748,77 +748,3 @@
 
   __rtld_lock_unlock_recursive (GL(dl_load_lock));
 }
-
-
-static bool __libc_freeres_fn_section
-free_slotinfo (struct dtv_slotinfo_list **elemp)
-{
-  size_t cnt;
-
-  if (*elemp == NULL)
-    /* Nothing here, all is removed (or there never was anything).  */
-    return true;
-
-  if (!free_slotinfo (&(*elemp)->next))
-    /* We cannot free the entry.  */
-    return false;
-
-  /* That cleared our next pointer for us.  */
-
-  for (cnt = 0; cnt < (*elemp)->len; ++cnt)
-    if ((*elemp)->slotinfo[cnt].map != NULL)
-      /* Still used.  */
-      return false;
-
-  /* We can remove the list element.  */
-  free (*elemp);
-  *elemp = NULL;
-
-  return true;
-}
-
-
-libc_freeres_fn (free_mem)
-{
-  for (Lmid_t nsid = 0; nsid < GL(dl_nns); ++nsid)
-    if (__builtin_expect (GL(dl_ns)[nsid]._ns_global_scope_alloc, 0) != 0
-	&& (GL(dl_ns)[nsid]._ns_main_searchlist->r_nlist
-	    // XXX Check whether we need NS-specific initial_searchlist
-	    == GLRO(dl_initial_searchlist).r_nlist))
-      {
-	/* All object dynamically loaded by the program are unloaded.  Free
-	   the memory allocated for the global scope variable.  */
-	struct link_map **old = GL(dl_ns)[nsid]._ns_main_searchlist->r_list;
-
-	/* Put the old map in.  */
-	GL(dl_ns)[nsid]._ns_main_searchlist->r_list
-	  // XXX Check whether we need NS-specific initial_searchlist
-	  = GLRO(dl_initial_searchlist).r_list;
-	/* Signal that the original map is used.  */
-	GL(dl_ns)[nsid]._ns_global_scope_alloc = 0;
-
-	/* Now free the old map.  */
-	free (old);
-      }
-
-  if (USE___THREAD || GL(dl_tls_dtv_slotinfo_list) != NULL)
-    {
-      /* Free the memory allocated for the dtv slotinfo array.  We can do
-	 this only if all modules which used this memory are unloaded.  */
-#ifdef SHARED
-      if (GL(dl_initial_dtv) == NULL)
-	/* There was no initial TLS setup, it was set up later when
-	   it used the normal malloc.  */
-	free_slotinfo (&GL(dl_tls_dtv_slotinfo_list));
-      else
-#endif
-	/* The first element of the list does not have to be deallocated.
-	   It was allocated in the dynamic linker (i.e., with a different
-	   malloc), and in the static library it's in .bss space.  */
-	free_slotinfo (&GL(dl_tls_dtv_slotinfo_list)->next);
-    }
-
-  void *scope_free_list = GL(dl_scope_free_list);
-  GL(dl_scope_free_list) = NULL;
-  free (scope_free_list);
-}

Modified: trunk/libc/elf/dl-libc.c
==============================================================================
--- trunk/libc/elf/dl-libc.c (original)
+++ trunk/libc/elf/dl-libc.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Handle loading and unloading shared objects for internal libc purposes.
-   Copyright (C) 1999-2002,2004,2005,2006,2009 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002,2004-2006,2009,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Zack Weinberg <zack@xxxxxxxxxxxxxxxxx>, 1999.
 
@@ -219,6 +219,34 @@
   return dlerror_run (do_dlclose, map);
 }
 libc_hidden_def (__libc_dlclose)
+
+
+static bool __libc_freeres_fn_section
+free_slotinfo (struct dtv_slotinfo_list **elemp)
+{
+  size_t cnt;
+
+  if (*elemp == NULL)
+    /* Nothing here, all is removed (or there never was anything).  */
+    return true;
+
+  if (!free_slotinfo (&(*elemp)->next))
+    /* We cannot free the entry.  */
+    return false;
+
+  /* That cleared our next pointer for us.  */
+
+  for (cnt = 0; cnt < (*elemp)->len; ++cnt)
+    if ((*elemp)->slotinfo[cnt].map != NULL)
+      /* Still used.  */
+      return false;
+
+  /* We can remove the list element.  */
+  free (*elemp);
+  *elemp = NULL;
+
+  return true;
+}
 
 
 libc_freeres_fn (free_mem)
@@ -235,20 +263,63 @@
       free (old);
     }
 
-  /* Remove all additional names added to the objects.  */
   for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
-    for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
-      {
-	struct libname_list *lnp = l->l_libname->next;
-
-	l->l_libname->next = NULL;
-
-	while (lnp != NULL)
-	  {
-	    struct libname_list *old = lnp;
-	    lnp = lnp->next;
-	    if (! old->dont_free)
-	    free (old);
-	  }
-      }
-}
+    {
+      /* Remove all additional names added to the objects.  */
+      for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
+	{
+	  struct libname_list *lnp = l->l_libname->next;
+
+	  l->l_libname->next = NULL;
+
+	  while (lnp != NULL)
+	    {
+	      struct libname_list *old = lnp;
+	      lnp = lnp->next;
+	      if (! old->dont_free)
+		free (old);
+	    }
+	}
+
+      if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
+	  && (GL(dl_ns)[ns]._ns_main_searchlist->r_nlist
+	      // XXX Check whether we need NS-specific initial_searchlist
+	      == GLRO(dl_initial_searchlist).r_nlist))
+	{
+	  /* All object dynamically loaded by the program are unloaded.  Free
+	     the memory allocated for the global scope variable.  */
+	  struct link_map **old = GL(dl_ns)[ns]._ns_main_searchlist->r_list;
+
+	  /* Put the old map in.  */
+	  GL(dl_ns)[ns]._ns_main_searchlist->r_list
+	    // XXX Check whether we need NS-specific initial_searchlist
+	    = GLRO(dl_initial_searchlist).r_list;
+	  /* Signal that the original map is used.  */
+	  GL(dl_ns)[ns]._ns_global_scope_alloc = 0;
+
+	  /* Now free the old map.  */
+	  free (old);
+	}
+    }
+
+  if (USE___THREAD || GL(dl_tls_dtv_slotinfo_list) != NULL)
+    {
+      /* Free the memory allocated for the dtv slotinfo array.  We can do
+	 this only if all modules which used this memory are unloaded.  */
+#ifdef SHARED
+      if (GL(dl_initial_dtv) == NULL)
+	/* There was no initial TLS setup, it was set up later when
+	   it used the normal malloc.  */
+	free_slotinfo (&GL(dl_tls_dtv_slotinfo_list));
+      else
+#endif
+	/* The first element of the list does not have to be deallocated.
+	   It was allocated in the dynamic linker (i.e., with a different
+	   malloc), and in the static library it's in .bss space.  */
+	free_slotinfo (&GL(dl_tls_dtv_slotinfo_list)->next);
+    }
+
+  void *scope_free_list = GL(dl_scope_free_list);
+  GL(dl_scope_free_list) = NULL;
+  free (scope_free_list);
+}

Modified: trunk/libc/elf/dl-load.c
==============================================================================
--- trunk/libc/elf/dl-load.c (original)
+++ trunk/libc/elf/dl-load.c Tue Oct 12 13:15:00 2010
@@ -787,9 +787,6 @@
     }
   else
     env_path_list.dirs = (void *) -1;
-
-  /* Remember the last search directory added at startup.  */
-  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
 }
 
 

Modified: trunk/libc/elf/dl-support.c
==============================================================================
--- trunk/libc/elf/dl-support.c (original)
+++ trunk/libc/elf/dl-support.c Tue Oct 12 13:15:00 2010
@@ -266,6 +266,9 @@
      objects.  */
   _dl_init_paths (getenv ("LD_LIBRARY_PATH"));
 
+  /* Remember the last search directory added at startup.  */
+  _dl_init_all_dirs = GL(dl_all_dirs);
+
   _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0';
 
   _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0';

Modified: trunk/libc/elf/rtld.c
==============================================================================
--- trunk/libc/elf/rtld.c (original)
+++ trunk/libc/elf/rtld.c Tue Oct 12 13:15:00 2010
@@ -2291,6 +2291,10 @@
 			  lossage);
     }
 
+  /* Remember the last search directory added at startup, now that
+     malloc will no longer be the one from dl-minimal.c.  */
+  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
+
   if (! prelinked && rtld_multiple_ref)
     {
       /* There was an explicit ref to the dynamic linker as a shared lib.

Modified: trunk/libc/include/fenv.h
==============================================================================
--- trunk/libc/include/fenv.h (original)
+++ trunk/libc/include/fenv.h Tue Oct 12 13:15:00 2010
@@ -17,5 +17,7 @@
 libm_hidden_proto (fesetenv)
 libm_hidden_proto (fesetround)
 libm_hidden_proto (feholdexcept)
+libm_hidden_proto (feupdateenv)
+libm_hidden_proto (fetestexcept)
 
 #endif

Modified: trunk/libc/localedata/ChangeLog
==============================================================================
--- trunk/libc/localedata/ChangeLog (original)
+++ trunk/libc/localedata/ChangeLog Tue Oct 12 13:15:00 2010
@@ -3079,7 +3079,7 @@
 
 	* charmaps/ISO-8859-16: Swap 0xa5 and 0xab entries.
 
-2001-11-15  Børre Gaup  <boerre.gaup@xxxxx>
+2001-11-15  Børre Gaup  <boerre.gaup@xxxxx>
 
 	* locales/se_NO: New file.
 

Modified: trunk/libc/malloc/mcheck.c
==============================================================================
--- trunk/libc/malloc/mcheck.c (original)
+++ trunk/libc/malloc/mcheck.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,6 @@
 /* Standard debugging hooks for `malloc'.
-   Copyright (C) 1990-1997,1999,2000-2002,2007 Free Software Foundation, Inc.
+   Copyright (C) 1990-1997,1999,2000-2002,2007,2010
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written May 1989 by Mike Haertel.
 
@@ -25,6 +26,7 @@
 # include <stdint.h>
 # include <stdio.h>
 # include <libintl.h>
+# include <errno.h>
 #endif
 
 /* Old hook values.  */
@@ -209,6 +211,12 @@
   if (pedantic)
     mcheck_check_all ();
 
+  if (size > ~((size_t) 0) - (sizeof (struct hdr) + 1))
+    {
+      __set_errno (ENOMEM);
+      return NULL;
+    }
+
   __malloc_hook = old_malloc_hook;
   if (old_malloc_hook != NULL)
     hdr = (struct hdr *) (*old_malloc_hook) (sizeof (struct hdr) + size + 1,
@@ -241,6 +249,12 @@
 
   slop = (sizeof *hdr + alignment - 1) & -alignment;
 
+  if (size > ~((size_t) 0) - (slop + 1))
+    {
+      __set_errno (ENOMEM);
+      return NULL;
+    }
+
   __memalign_hook = old_memalign_hook;
   if (old_memalign_hook != NULL)
     block = (*old_memalign_hook) (alignment, slop + size + 1, caller);
@@ -275,6 +289,12 @@
 
   if (pedantic)
     mcheck_check_all ();
+
+  if (size > ~((size_t) 0) - (sizeof (struct hdr) + 1))
+    {
+      __set_errno (ENOMEM);
+      return NULL;
+    }
 
   if (ptr)
     {

Modified: trunk/libc/math/feupdateenv.c
==============================================================================
--- trunk/libc/math/feupdateenv.c (original)
+++ trunk/libc/math/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2000, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -31,6 +31,7 @@
 strong_alias (__feupdateenv, __old_feupdateenv)
 compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
 #endif
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
 
 stub_warning (feupdateenv)

Modified: trunk/libc/math/ftestexcept.c
==============================================================================
--- trunk/libc/math/ftestexcept.c (original)
+++ trunk/libc/math/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -25,5 +25,6 @@
 {
   return 0;
 }
+libm_hidden_def (fetestexcept)
 stub_warning (fetestexcept)
 #include <stub-tag.h>

Modified: trunk/libc/math/libm-test.inc
==============================================================================
--- trunk/libc/math/libm-test.inc (original)
+++ trunk/libc/math/libm-test.inc Tue Oct 12 13:15:00 2010
@@ -2802,6 +2802,10 @@
   TEST_fff_f (fma, minus_infty, minus_infty, minus_infty, nan_value, INVALID_EXCEPTION);
 
   TEST_fff_f (fma, 1.25L, 0.75L, 0.0625L, 1.0L);
+#ifdef TEST_FLOAT
+  TEST_fff_f (fma, 0x1.7ff8p+13, 0x1.000002p+0, 0x1.ffffp-24, 0x1.7ff802p+13);
+  TEST_fff_f (fma, 0x1.fffp+0, 0x1.00001p+0, -0x1.fffp+0, 0x1.fffp-20);
+#endif
 
   END (fma);
 }

Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Tue Oct 12 13:15:00 2010
@@ -1,3 +1,9 @@
+2010-09-21  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/pthread/pthread.h (pthread_cleanup_push)
+	[!__EXCEPTIONS]: Mangle local variable not_first_call.
+	(pthread_cleanup_push_defer_np): Likewise.
+
 2010-09-03  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are

Modified: trunk/libc/nptl/sysdeps/pthread/pthread.h
==============================================================================
--- trunk/libc/nptl/sysdeps/pthread/pthread.h (original)
+++ trunk/libc/nptl/sysdeps/pthread/pthread.h Tue Oct 12 13:15:00 2010
@@ -650,9 +650,9 @@
     __pthread_unwind_buf_t __cancel_buf;				      \
     void (*__cancel_routine) (void *) = (routine);			      \
     void *__cancel_arg = (arg);						      \
-    int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)	      \
-				      __cancel_buf.__cancel_jmp_buf, 0);      \
-    if (__builtin_expect (not_first_call, 0))				      \
+    int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     \
+					__cancel_buf.__cancel_jmp_buf, 0);    \
+    if (__builtin_expect (__not_first_call, 0))				      \
       {									      \
 	__cancel_routine (__cancel_arg);				      \
 	__pthread_unwind_next (&__cancel_buf);				      \
@@ -685,9 +685,9 @@
     __pthread_unwind_buf_t __cancel_buf;				      \
     void (*__cancel_routine) (void *) = (routine);			      \
     void *__cancel_arg = (arg);						      \
-    int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)	      \
-				      __cancel_buf.__cancel_jmp_buf, 0);      \
-    if (__builtin_expect (not_first_call, 0))				      \
+    int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     \
+					__cancel_buf.__cancel_jmp_buf, 0);    \
+    if (__builtin_expect (__not_first_call, 0))				      \
       {									      \
 	__cancel_routine (__cancel_arg);				      \
 	__pthread_unwind_next (&__cancel_buf);				      \

Modified: trunk/libc/posix/Makefile
==============================================================================
--- trunk/libc/posix/Makefile (original)
+++ trunk/libc/posix/Makefile Tue Oct 12 13:15:00 2010
@@ -94,6 +94,7 @@
 		   bug-regex14 bug-regex15 \
 		   bug-regex21 bug-regex24 \
 		   bug-regex27 bug-regex28 bug-regex29 bug-regex30 \
+		   bug-regex31 \
 		   tst-nice tst-nanosleep \
 		   transbug \
 		   tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
@@ -136,6 +137,7 @@
 	     annexc annexc.out wordexp-tst.out bug-regex2-mem \
 	     bug-regex2.mtrace bug-regex14-mem bug-regex14.mtrace \
 	     bug-regex21-mem bug-regex21.mtrace \
+	     bug-regex31-mem bug-regex31.mtrace \
 	     tst-rxspencer-mem tst-rxspencer.mtrace tst-getconf.out \
 	     tst-pcre-mem tst-pcre.mtrace tst-boost-mem tst-boost.mtrace \
 	     bug-ga2.mtrace bug-ga2-mem bug-glob2.mtrace bug-glob2-mem \
@@ -267,6 +269,7 @@
 # eglibc: ifeq (no,$(cross-compiling))
 tests: $(objpfx)bug-regex2-mem \
   $(objpfx)bug-regex21-mem \
+  $(objpfx)bug-regex31-mem \
   $(objpfx)tst-getconf.out \
   $(objpfx)bug-glob2-mem $(objpfx)tst-vfork3-mem
 ifeq (y,($OPTION_POSIX_REGEXP_GLIBC))
@@ -298,6 +301,11 @@
 
 $(objpfx)bug-regex21-mem: $(objpfx)bug-regex21.out
 	$(common-objpfx)malloc/mtrace $(objpfx)bug-regex21.mtrace > $@
+
+bug-regex31-ENV = MALLOC_TRACE=$(objpfx)bug-regex31.mtrace
+
+$(objpfx)bug-regex31-mem: $(objpfx)bug-regex31.out
+	$(common-objpfx)malloc/mtrace $(objpfx)bug-regex31.mtrace > $@
 
 tst-vfork3-ENV = MALLOC_TRACE=$(objpfx)tst-vfork3.mtrace
 

Modified: trunk/libc/posix/regcomp.c
==============================================================================
--- trunk/libc/posix/regcomp.c (original)
+++ trunk/libc/posix/regcomp.c Tue Oct 12 13:15:00 2010
@@ -2170,16 +2170,21 @@
       exp = parse_expression (regexp, preg, token, syntax, nest, err);
       if (BE (*err != REG_NOERROR && exp == NULL, 0))
 	{
+	  if (tree != NULL)
+	    postorder (tree, free_tree, NULL);
 	  return NULL;
 	}
       if (tree != NULL && exp != NULL)
 	{
-	  tree = create_tree (dfa, tree, exp, CONCAT);
-	  if (tree == NULL)
+	  bin_tree_t *newtree = create_tree (dfa, tree, exp, CONCAT);
+	  if (newtree == NULL)
 	    {
+	      postorder (exp, free_tree, NULL);
+	      postorder (tree, free_tree, NULL);
 	      *err = REG_ESPACE;
 	      return NULL;
 	    }
+	  tree = newtree;
 	}
       else if (tree == NULL)
 	tree = exp;
@@ -2428,7 +2433,11 @@
     {
       tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
       if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
-	*err = REG_EPAREN;
+	{
+	  if (tree != NULL)
+	    postorder (tree, free_tree, NULL);
+	  *err = REG_EPAREN;
+	}
       if (BE (*err != REG_NOERROR, 0))
 	return NULL;
     }
@@ -3055,6 +3064,10 @@
   if (BE (sbcset == NULL, 0))
 #endif /* RE_ENABLE_I18N */
     {
+      re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+      re_free (mbcset);
+#endif
       *err = REG_ESPACE;
       return NULL;
     }

Modified: trunk/libc/posix/unistd.h
==============================================================================
--- trunk/libc/posix/unistd.h (original)
+++ trunk/libc/posix/unistd.h Tue Oct 12 13:15:00 2010
@@ -1020,6 +1020,9 @@
      __THROW __nonnull ((1)) __wur;
 # endif
 
+#endif /* Use BSD || X/Open Unix || POSIX 2008.  */
+
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
 
 /* Truncate the file FD is open on to LENGTH bytes.  */
 # ifndef __USE_FILE_OFFSET64

Modified: trunk/libc/resolv/res_init.c
==============================================================================
--- trunk/libc/resolv/res_init.c (original)
+++ trunk/libc/resolv/res_init.c Tue Oct 12 13:15:00 2010
@@ -430,6 +430,7 @@
 	    statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
 	    statp->nsaddr.sin_family = AF_INET;
 	    statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
+	    statp->nscount = 1;
 	}
 	if (statp->defdname[0] == 0 &&
 	    __gethostname(buf, sizeof(statp->defdname) - 1) == 0 &&

Modified: trunk/libc/stdio-common/psiginfo.c
==============================================================================
--- trunk/libc/stdio-common/psiginfo.c (original)
+++ trunk/libc/stdio-common/psiginfo.c Tue Oct 12 13:15:00 2010
@@ -1,4 +1,4 @@
-/* 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
@@ -85,9 +85,28 @@
 
   const char *desc;
   if (pinfo->si_signo >= 0 && pinfo->si_signo < NSIG
-      && (desc = INTUSE(_sys_siglist)[pinfo->si_signo]) != NULL)
+      && ((desc = INTUSE(_sys_siglist)[pinfo->si_signo]) != NULL
+	  || (pinfo->si_signo >= SIGRTMIN && pinfo->si_signo < SIGRTMAX)))
     {
-      fprintf (fp, "%s (", _(desc));
+      if (desc == NULL)
+	{
+	  if (pinfo->si_signo - SIGRTMIN < SIGRTMAX - pinfo->si_signo)
+	    {
+	      if (pinfo->si_signo == SIGRTMIN)
+		fprintf (fp, "SIGRTMIN (");
+	      else
+		fprintf (fp, "SIGRTMIN+%d (", pinfo->si_signo - SIGRTMIN);
+	    }
+	  else
+	    {
+	      if (pinfo->si_signo == SIGRTMAX)
+		fprintf (fp, "SIGRTMAX (");
+	      else
+		fprintf (fp, "SIGRTMAX-%d (", SIGRTMAX - pinfo->si_signo);
+	    }
+	}
+      else
+	fprintf (fp, "%s (", _(desc));
 
       const char *base = NULL;
       const uint8_t *offarr = NULL;
@@ -165,14 +184,15 @@
 
       if (pinfo->si_signo == SIGILL || pinfo->si_signo == SIGFPE
 	  || pinfo->si_signo == SIGSEGV || pinfo->si_signo == SIGBUS)
-	fprintf (fp, "[%p])", pinfo->si_addr);
+	fprintf (fp, "[%p])\n", pinfo->si_addr);
       else if (pinfo->si_signo == SIGCHLD)
-	fprintf (fp, "%ld %d %ld)", (long int) pinfo->si_pid, pinfo->si_status,
+	fprintf (fp, "%ld %d %ld)\n",
+		 (long int) pinfo->si_pid, pinfo->si_status,
 		 (long int) pinfo->si_uid);
       else if (pinfo->si_signo == SIGPOLL)
-	fprintf (fp, "%ld)", (long int) pinfo->si_band);
-      else
-	fprintf (fp, "%ld %ld)",
+	fprintf (fp, "%ld)\n", (long int) pinfo->si_band);
+      else
+	fprintf (fp, "%ld %ld)\n",
 		 (long int) pinfo->si_pid, (long int) pinfo->si_uid);
     }
   else

Modified: trunk/libc/string/Makefile
==============================================================================
--- trunk/libc/string/Makefile (original)
+++ trunk/libc/string/Makefile Tue Oct 12 13:15:00 2010
@@ -59,7 +59,7 @@
 		   bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap	\
 		   tst-strtok tst-strfry	\
 		   bug-strtok1 $(addprefix test-,$(strop-tests))	\
-		   tst-strxfrm2 tst-endian tst-svc2
+		   tst-strxfrm2 tst-endian tst-svc2 bug-strstr1
 tests-$(OPTION_EGLIBC_ENVZ) += bug-envz1 
 tests-$(OPTION_EGLIBC_LOCALE_CODE) \
 		+= tst-strxfrm bug-strcoll1
@@ -82,6 +82,7 @@
 CFLAGS-stratcliff.c = -fno-builtin
 CFLAGS-test-ffs.c = -fno-builtin
 CFLAGS-tst-inlcall.c = -fno-builtin
+CFLAGS-bug-strstr1.c = -fno-builtin
 
 # eglibc: ifeq ($(cross-compiling),no)
 tests: $(objpfx)tst-svc.out

Modified: trunk/libc/string/str-two-way.h
==============================================================================
--- trunk/libc/string/str-two-way.h (original)
+++ trunk/libc/string/str-two-way.h Tue Oct 12 13:15:00 2010
@@ -350,8 +350,8 @@
 		     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;
 	    }

Modified: trunk/libc/string/stratcliff.c
==============================================================================
--- trunk/libc/string/stratcliff.c (original)
+++ trunk/libc/string/stratcliff.c Tue Oct 12 13:15:00 2010
@@ -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@xxxxxxxxxx>, 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 @@
   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 @@
 
       /* 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 @@
 
 	      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 @@
 
 	      adr[inner] = L('T');
 	    }
-        }
-      for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
-        {
+	}
+      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 @@
 		  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 @@
 		  adr[middle] = L('T');
 		}
 	    }
-        }
+	}
 
       /* Special test.  */
       adr[nchars - 1] = L('\0');
@@ -180,7 +183,7 @@
 
       /* 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 @@
 		  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 @@
 
 	      adr[middle] = L('T');
 	    }
-        }
-      for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
-        {
+	}
+      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 @@
 		      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 @@
 
 	      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 @@
 
 	      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 @@
 		  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 @@
 
 	      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 @@
 
 	      adr[inner] = L('T');
 	    }
-        }
+	}
 
       /* stpncpy/wcpncpy test */
       adr[nchars - 1] = L('T');
@@ -374,8 +444,8 @@
       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 @@
 
 	      adr[middle] = L('T');
 	    }
-        }
+	}
 
       /* memcpy/wmemcpy test */
       for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)

Modified: trunk/libc/sysdeps/i386/fpu/feupdateenv.c
==============================================================================
--- trunk/libc/sysdeps/i386/fpu/feupdateenv.c (original)
+++ trunk/libc/sysdeps/i386/fpu/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997,99,2000,01,07 Free Software Foundation, Inc.
+   Copyright (C) 1997,99,2000,01,07,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -57,4 +57,5 @@
 compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2);

Modified: trunk/libc/sysdeps/i386/fpu/ftestexcept.c
==============================================================================
--- trunk/libc/sysdeps/i386/fpu/ftestexcept.c (original)
+++ trunk/libc/sysdeps/i386/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2003, 2004, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -38,3 +38,4 @@
 
   return (temp | xtemp) & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/libc/sysdeps/i386/i686/multiarch/s_fmaf.c
==============================================================================
--- trunk/libc/sysdeps/i386/i686/multiarch/s_fmaf.c (original)
+++ trunk/libc/sysdeps/i386/i686/multiarch/s_fmaf.c Tue Oct 12 13:15:00 2010
@@ -33,4 +33,4 @@
 # define __fmaf __fmaf_ia32
 #endif
 
-#include <math/s_fmaf.c>
+#include <sysdeps/ieee754/dbl-64/s_fmaf.c>

Modified: trunk/libc/sysdeps/ia64/fpu/feupdateenv.c
==============================================================================
--- trunk/libc/sysdeps/ia64/fpu/feupdateenv.c (original)
+++ trunk/libc/sysdeps/ia64/fpu/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997, 2000, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2000, 2007, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Christian Boissat <Christian.Boissat@xxxxxxx>, 1999.
 
@@ -38,3 +38,4 @@
   /* Success.  */
   return 0;
 }
+libm_hidden_def (feupdateenv)

Modified: trunk/libc/sysdeps/ia64/fpu/ftestexcept.c
==============================================================================
--- trunk/libc/sysdeps/ia64/fpu/ftestexcept.c (original)
+++ trunk/libc/sysdeps/ia64/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2000, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Christian Boissat <Christian.Boissat@xxxxxxx>, 1999.
 
@@ -30,3 +30,4 @@
 
   return (fpsr >> 13) & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/libc/sysdeps/powerpc/fpu/feupdateenv.c
==============================================================================
--- trunk/libc/sysdeps/powerpc/fpu/feupdateenv.c (original)
+++ trunk/libc/sysdeps/powerpc/fpu/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997, 1999, 2000, 2001, 2007, 2008
+   Copyright (C) 1997, 1999, 2000, 2001, 2007, 2008, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -66,4 +66,5 @@
 compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2);

Modified: trunk/libc/sysdeps/powerpc/fpu/ftestexcept.c
==============================================================================
--- trunk/libc/sysdeps/powerpc/fpu/ftestexcept.c (original)
+++ trunk/libc/sysdeps/powerpc/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 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
@@ -31,3 +31,4 @@
      just:  */
   return u.l[1] & excepts;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/libc/sysdeps/s390/fpu/feupdateenv.c
==============================================================================
--- trunk/libc/sysdeps/s390/fpu/feupdateenv.c (original)
+++ trunk/libc/sysdeps/s390/fpu/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Denis Joseph Barrow (djbarrow@xxxxxxxxxx).
 
@@ -38,3 +38,4 @@
   /* Success.  */
   return 0;
 }
+libm_hidden_def (feupdateenv)

Modified: trunk/libc/sysdeps/s390/fpu/ftestexcept.c
==============================================================================
--- trunk/libc/sysdeps/s390/fpu/ftestexcept.c (original)
+++ trunk/libc/sysdeps/s390/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Denis Joseph Barrow (djbarrow@xxxxxxxxxx).
 
@@ -31,3 +31,4 @@
   temp = (temp >> FPC_DXC_SHIFT) | (temp >> FPC_FLAGS_SHIFT);
   return temp & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/libc/sysdeps/s390/s390-32/__longjmp.c
==============================================================================
--- trunk/libc/sysdeps/s390/s390-32/__longjmp.c (original)
+++ trunk/libc/sysdeps/s390/s390-32/__longjmp.c Tue Oct 12 13:15:00 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2005, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2005, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky (schwidefsky@xxxxxxxxxx).
 
@@ -29,15 +29,18 @@
 void
 __longjmp (__jmp_buf env, int val)
 {
-  register int r2 __asm ("%r2") = val == 0 ? 1 : val;
 #ifdef PTR_DEMANGLE
-  register uintptr_t r3 __asm ("%r3") = THREAD_GET_POINTER_GUARD ();
-  register void *r1 __asm ("%r1") = (void *) env;
+  uintptr_t guard = THREAD_GET_POINTER_GUARD ();
 # ifdef CHECK_SP
-  CHECK_SP (env, r3);
+  CHECK_SP (env, guard);
 # endif
 #elif defined CHECK_SP
   CHECK_SP (env, 0);
+#endif
+  register int r2 __asm ("%r2") = val == 0 ? 1 : val;
+#ifdef PTR_DEMANGLE
+  register uintptr_t r3 __asm ("%r3") = guard;
+  register void *r1 __asm ("%r1") = (void *) env;
 #endif
   /* Restore registers and jump back.  */
   asm volatile ("ld   %%f6,48(%1)\n\t"

Modified: trunk/libc/sysdeps/s390/s390-32/elf/start.S
==============================================================================
--- trunk/libc/sysdeps/s390/s390-32/elf/start.S (original)
+++ trunk/libc/sysdeps/s390/s390-32/elf/start.S Tue Oct 12 13:15:00 2010
@@ -108,7 +108,7 @@
 	jne	.L20
 	cl	%r8,4(%r4)     /* p_offset == 0? */
 	jne	.L20
-	l	%r9,8(%r4)     /* r9 = p_vaddr <- ELF header address  */
+	l	%r9,8(%r4)     /* r9 = PT_LOAD.p_vaddr <- ELF header address  */
 	j	.L24
 .L20:	alr	%r4,%r0        /* r4 += AT_PHENT value */
 	brct	%r12,.L19
@@ -124,16 +124,12 @@
 .L22:	alr	%r4,%r0        /* r4 += AT_PHENT value */
 	brct	%r12,.L23
 
-	ltr	%r9,%r9        /* Load address == 0? */
-	jz	.L14           /* No checking for PIE without PT_PHDR.  */
-	j	.L21
-
-.L25:	clr	%r3,%r11       /* PT_PHDR p_vaddr == AT_PHDR? */
-	je	.L21
-	lr	%r9,%r11
-	slr	%r9,%r3        /* elf_header_addr = AT_PHDR - PT_PHDR.p_vaddr */
-
-.L21:	l	%r5,36(%r9)    /* Load the e_flags field.  */
+	j	.L14	       /* No PT_PHDR found - skip checking.  */
+
+.L25:	slr	%r11,%r3       /* AT_PHDR - PT_PHDR.p_vaddr (relocation offset)*/
+	alr	%r9,%r11       /* PT_LOAD.p_vaddr += relocation offset */
+
+	l	%r5,36(%r9)    /* Load the e_flags field.  */
 	tml	%r5,1
 	jz	.L14	       /* Binary does not require highgprs facility.  */
 

Modified: trunk/libc/sysdeps/s390/s390-64/__longjmp.c
==============================================================================
--- trunk/libc/sysdeps/s390/s390-64/__longjmp.c (original)
+++ trunk/libc/sysdeps/s390/s390-64/__longjmp.c Tue Oct 12 13:15:00 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2005, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2005, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky (schwidefsky@xxxxxxxxxx).
 
@@ -29,15 +29,18 @@
 void
 __longjmp (__jmp_buf env, int val)
 {
-  register long int r2 __asm ("%r2") = val == 0 ? 1 : val;
 #ifdef PTR_DEMANGLE
-  register uintptr_t r3 __asm ("%r3") = THREAD_GET_POINTER_GUARD ();
-  register void *r1 __asm ("%r1") = (void *) env;
+  uintptr_t guard = THREAD_GET_POINTER_GUARD ();
 # ifdef CHECK_SP
-  CHECK_SP (env, r3);
+  CHECK_SP (env, guard);
 # endif
 #elif defined CHECK_SP
   CHECK_SP (env, 0);
+#endif
+  register long int r2 __asm ("%r2") = val == 0 ? 1 : val;
+#ifdef PTR_DEMANGLE
+  register uintptr_t r3 __asm ("%r3") = guard;
+  register void *r1 __asm ("%r1") = (void *) env;
 #endif
   /* Restore registers and jump back.  */
   asm volatile ("ld   %%f7,104(%1)\n\t"

Modified: trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h
==============================================================================
--- trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h (original)
+++ trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* FPU control word definitions.  SH version.
-   Copyright (C) 1999, 2000, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 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
@@ -19,6 +19,8 @@
 
 #ifndef _FPU_CONTROL_H
 #define _FPU_CONTROL_H
+
+#include <features.h>
 
 /* masking of interrupts */
 #define _FPU_MASK_VM	0x0800	/* Invalid operation */
@@ -45,14 +47,10 @@
 #define _FPU_GETCW(cw) __asm__ ("sts fpscr,%0" : "=r" (cw))
 
 #if defined __GNUC__
-#ifdef __cplusplus
-extern "C" {
-#endif
+__BEGIN_DECLS
+
 /* GCC provides this function.  */
 extern void __set_fpscr (unsigned long);
-#ifdef __cplusplus
-}
-#endif  /* C++ */
 #define _FPU_SETCW(cw) __set_fpscr ((cw))
 #else
 #define _FPU_SETCW(cw) __asm__ ("lds %0,fpscr" : : "r" (cw))
@@ -61,4 +59,5 @@
 /* Default control word set at startup.	 */
 extern fpu_control_t __fpu_control;
 
+__END_DECLS
 #endif /* _FPU_CONTROL_H */

Modified: trunk/libc/sysdeps/sh/sh4/fpu/ftestexcept.c
==============================================================================
--- trunk/libc/sysdeps/sh/sh4/fpu/ftestexcept.c (original)
+++ trunk/libc/sysdeps/sh/sh4/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2000, 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
@@ -30,3 +30,4 @@
 
   return temp & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/libc/sysdeps/sparc/fpu/feupdateenv.c
==============================================================================
--- trunk/libc/sysdeps/sparc/fpu/feupdateenv.c (original)
+++ trunk/libc/sysdeps/sparc/fpu/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2000, 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
@@ -46,4 +46,5 @@
 compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);

Modified: trunk/libc/sysdeps/sparc/fpu/ftestexcept.c
==============================================================================
--- trunk/libc/sysdeps/sparc/fpu/ftestexcept.c (original)
+++ trunk/libc/sysdeps/sparc/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 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
@@ -28,3 +28,4 @@
 
   return tmp & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/libc/sysdeps/unix/sysv/linux/check_pf.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/check_pf.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/check_pf.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Determine protocol families for which interfaces exist.  Linux version.
-   Copyright (C) 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006, 2007, 2008, 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
@@ -304,10 +304,13 @@
 
   struct ifaddrs *runp;
   for (runp = ifa; runp != NULL; runp = runp->ifa_next)
-    if (runp->ifa_addr->sa_family == PF_INET)
-      *seen_ipv4 = true;
-    else if (runp->ifa_addr->sa_family == PF_INET6)
-      *seen_ipv6 = true;
+    if (runp->ifa_addr != NULL)
+      {
+	if (runp->ifa_addr->sa_family == PF_INET)
+	  *seen_ipv4 = true;
+	else if (runp->ifa_addr->sa_family == PF_INET6)
+	  *seen_ipv6 = true;
+      }
 
   (void) freeifaddrs (ifa);
 #endif

Modified: trunk/libc/sysdeps/unix/sysv/linux/getdents.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/getdents.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/getdents.c Tue Oct 12 13:15:00 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995-2003, 2004, 2006, 2007
+/* Copyright (C) 1993, 1995-2004, 2006, 2007, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -285,7 +285,11 @@
 	DIRENT_SET_DP_INO(dp, kdp->d_ino);
 	dp->d_off = kdp->d_off;
 	dp->d_reclen = new_reclen;
+#ifdef __ASSUME_GETDENTS32_D_TYPE
+	dp->d_type = *((char *) kdp + kdp->d_reclen - 1);
+#else
 	dp->d_type = DT_UNKNOWN;
+#endif
 	memcpy (dp->d_name, kdp->d_name,
 		kdp->d_reclen - offsetof (struct kernel_dirent, d_name));
 

Modified: trunk/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/internal_statvfs.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/internal_statvfs.c Tue Oct 12 13:15:00 2010
@@ -108,6 +108,12 @@
       break;
     case LOGFS_MAGIC_U32:
       fsname = "logfs";
+      break;
+    case BTRFS_SUPER_MAGIC:
+      fsname = "btrfs";
+      break;
+    case CGROUP_SUPER_MAGIC:
+      fsname = "cgroup";
       break;
     }
 
@@ -228,7 +234,8 @@
   buf->f_files = fsbuf->f_files;
   buf->f_ffree = fsbuf->f_ffree;
   if (sizeof (buf->f_fsid) == sizeof (fsbuf->f_fsid))
-    buf->f_fsid = (fsbuf->f_fsid.__val[0]
+    buf->f_fsid = ((fsbuf->f_fsid.__val[0]
+		    & ((1UL << (8 * sizeof (fsbuf->f_fsid.__val[0]))) - 1))
 		   | ((unsigned long int) fsbuf->f_fsid.__val[1]
 		      << (8 * (sizeof (buf->f_fsid)
 			       - sizeof (fsbuf->f_fsid.__val[0])))));

Modified: trunk/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h Tue Oct 12 13:15:00 2010
@@ -23,7 +23,7 @@
 /* These definitions come from the kernel headers.  But we cannot
    include the headers here because of type clashes.  If new
    filesystem types will become available we have to add the
-   appropriate definitions here.*/
+   appropriate definitions here.  */
 
 /* Constant that identifies the `adfs' filesystem.  */
 #define ADFS_SUPER_MAGIC	0xadf5
@@ -35,7 +35,13 @@
 #define AUTOFS_SUPER_MAGIC	0x187
 
 /* Constant that identifies the `bfs' filesystem.  */
-#define BFS_MAGIC		0x1BADFACE
+#define BFS_MAGIC		0x1badface
+
+/* Constant that identifies the `btrfs' filesystem.  */
+#define BTRFS_SUPER_MAGIC	0x9123683e
+
+/* Constant that identifies the `cgroup' filesystem.  */
+#define CGROUP_SUPER_MAGIC	0x27e0eb
 
 /* Constant that identifies the `coda' filesystem.  */
 #define CODA_SUPER_MAGIC	0x73757245
@@ -53,7 +59,7 @@
 #define DEVPTS_SUPER_MAGIC	0x1cd1
 
 /* Constants that identifies the `efs' filesystem.  */
-#define EFS_SUPER_MAGIC		0x414A53
+#define EFS_SUPER_MAGIC		0x414a53
 #define EFS_MAGIC		0x072959
 
 /* Constant that identifies the `ext2' and `ext3' filesystems.  */
@@ -74,7 +80,7 @@
 /* Constant that identifies the `jfs' filesystem.  */
 #define JFS_SUPER_MAGIC		0x3153464a
 
-/* Constant that identifies the `logfs´ filesystem.  */
+/* Constant that identifies the `logfs' filesystem.  */
 #define LOGFS_MAGIC_U32		0xc97e8168u
 
 /* Constants that identify the `minix2' filesystem.  */
@@ -118,7 +124,7 @@
 /* Constant that identifies the `smb' filesystem.  */
 #define SMB_SUPER_MAGIC		0x517b
 
-/* Constant that identifies the `sysfs´ filesystem.  */
+/* Constant that identifies the `sysfs' filesystem.  */
 #define SYSFS_MAGIC		0x62656572
 
 /* Constants that identify the `sysV' filesystem.  */

Modified: trunk/libc/sysdeps/unix/sysv/linux/pathconf.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/pathconf.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/pathconf.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Get file-specific information about a file.  Linux version.
-   Copyright (C) 1991,1995,1996,1998-2003,2008 Free Software Foundation, Inc.
+   Copyright (C) 1991,1995,1996,1998-2003,2008,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
@@ -126,6 +126,9 @@
 
   switch (fsbuf->f_type)
     {
+    case BTRFS_SUPER_MAGIC:
+      return 255;
+
     case EXT2_SUPER_MAGIC:
     case UFS_MAGIC:
     case UFS_CIGAM:
@@ -136,6 +139,7 @@
     case UDF_SUPER_MAGIC:
     case JFS_SUPER_MAGIC:
     case VXFS_SUPER_MAGIC:
+    case CGROUP_SUPER_MAGIC:
       return 64;
 
     case MSDOS_SUPER_MAGIC:

Modified: trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list Tue Oct 12 13:15:00 2010
@@ -5,3 +5,4 @@
 vfork		-	vfork		0	__vfork		vfork
 
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
+fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark

Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list Tue Oct 12 13:15:00 2010
@@ -6,3 +6,4 @@
 getresgid	-	getresgid32	3	getresgid
 
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
+fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark

Modified: trunk/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S Tue Oct 12 13:15:00 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2004,2005,2006,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
@@ -49,9 +49,9 @@
 	.text
 ENTRY(____longjmp_chk)
 	/* Restore registers.  */
-	movq	(JB_RSP*8)(%rdi),%r8
-	movq	(JB_RBP*8)(%rdi),%r9
-	movq	(JB_PC*8)(%rdi),%rdx
+	movq	(JB_RSP*8)(%rdi), %r8
+	movq	(JB_RBP*8)(%rdi), %r9
+	movq	(JB_PC*8)(%rdi), %rdx
 #ifdef PTR_DEMANGLE
 	PTR_DEMANGLE (%r8)
 	PTR_DEMANGLE (%r9)
@@ -63,7 +63,9 @@
 
 	/* Save function parameters.  */
 	movq	%rdi, %r10
-	movl	%esi, %ecx
+	cfi_register (%rdi, %r10)
+	movl	%esi, %ebx
+	cfi_register (%rsi, %rbx)
 
 	xorl	%edi, %edi
 	leaq	-24(%rsp), %rsi
@@ -84,7 +86,9 @@
 .Lfail:	CALL_FAIL
 
 .Lok2:	movq	%r10, %rdi
-	movl	%ecx, %esi
+	cfi_restore (%rdi)
+	movl	%ebx, %esi
+	cfi_restore (%rsi)
 
 .Lok:	/* We add unwind information for the target here.  */
 	cfi_def_cfa(%rdi, 0)
@@ -96,11 +100,11 @@
 	cfi_offset(%r13,JB_R13*8)
 	cfi_offset(%r14,JB_R14*8)
 	cfi_offset(%r15,JB_R15*8)
-	movq	(JB_RBX*8)(%rdi),%rbx
-	movq	(JB_R12*8)(%rdi),%r12
-	movq	(JB_R13*8)(%rdi),%r13
-	movq	(JB_R14*8)(%rdi),%r14
-	movq	(JB_R15*8)(%rdi),%r15
+	movq	(JB_RBX*8)(%rdi), %rbx
+	movq	(JB_R12*8)(%rdi), %r12
+	movq	(JB_R13*8)(%rdi), %r13
+	movq	(JB_R14*8)(%rdi), %r14
+	movq	(JB_R15*8)(%rdi), %r15
 	/* Set return value for setjmp.  */
 	movl	%esi, %eax
 	movq	%r8,%rsp

Modified: trunk/libc/sysdeps/x86_64/fpu/feupdateenv.c
==============================================================================
--- trunk/libc/sysdeps/x86_64/fpu/feupdateenv.c (original)
+++ trunk/libc/sysdeps/x86_64/fpu/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997,99,2000,01,07 Free Software Foundation, Inc.
+   Copyright (C) 1997,99,2000,01,07,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -48,4 +48,5 @@
 compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);

Modified: trunk/libc/sysdeps/x86_64/fpu/ftestexcept.c
==============================================================================
--- trunk/libc/sysdeps/x86_64/fpu/ftestexcept.c (original)
+++ trunk/libc/sysdeps/x86_64/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 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
@@ -31,3 +31,4 @@
 
   return (temp | mxscr) & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/libc/sysdeps/x86_64/multiarch/s_fmaf.c
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/s_fmaf.c (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/s_fmaf.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* FMA version of fmaf.
-   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
@@ -39,4 +39,4 @@
 # define __fmaf __fmaf_sse2
 #endif
 
-#include <math/s_fmaf.c>
+#include <sysdeps/ieee754/dbl-64/s_fmaf.c>

Modified: trunk/libc/sysdeps/x86_64/strcmp.S
==============================================================================
--- trunk/libc/sysdeps/x86_64/strcmp.S (original)
+++ trunk/libc/sysdeps/x86_64/strcmp.S Tue Oct 12 13:15:00 2010
@@ -458,7 +458,7 @@
 	jnz	LABEL(ashr_1_exittail)	/* find null char*/
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$14, %r11
+	cmp	$15, %r11
 	jbe	LABEL(ashr_1_exittail)
 # endif
 
@@ -586,7 +586,7 @@
 	jnz	LABEL(ashr_2_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$13, %r11
+	cmp	$14, %r11
 	jbe	LABEL(ashr_2_exittail)
 # endif
 
@@ -711,7 +711,7 @@
 	jnz	LABEL(ashr_3_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$12, %r11
+	cmp	$13, %r11
 	jbe	LABEL(ashr_3_exittail)
 # endif
 
@@ -836,7 +836,7 @@
 	jnz	LABEL(ashr_4_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$11, %r11
+	cmp	$12, %r11
 	jbe	LABEL(ashr_4_exittail)
 # endif
 
@@ -913,7 +913,7 @@
 	sub	$0xffff, %edx
 	jnz	LABEL(exit)
 
-# if defined USE_AS_STRNCMP || defined USE_AS_STRCASECMP_L
+# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
 	sub	$16, %r11
 	jbe	LABEL(strcmp_exitz)
 # endif
@@ -961,7 +961,7 @@
 	jnz	LABEL(ashr_5_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$10, %r11
+	cmp	$11, %r11
 	jbe	LABEL(ashr_5_exittail)
 # endif
 
@@ -1086,7 +1086,7 @@
 	jnz	LABEL(ashr_6_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$9, %r11
+	cmp	$10, %r11
 	jbe	LABEL(ashr_6_exittail)
 # endif
 
@@ -1211,7 +1211,7 @@
 	jnz	LABEL(ashr_7_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$8, %r11
+	cmp	$9, %r11
 	jbe	LABEL(ashr_7_exittail)
 # endif
 
@@ -1336,7 +1336,7 @@
 	jnz	LABEL(ashr_8_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$7, %r11
+	cmp	$8, %r11
 	jbe	LABEL(ashr_8_exittail)
 # endif
 
@@ -1461,7 +1461,7 @@
 	jnz	LABEL(ashr_9_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$6, %r11
+	cmp	$7, %r11
 	jbe	LABEL(ashr_9_exittail)
 # endif
 
@@ -1586,7 +1586,7 @@
 	jnz	LABEL(ashr_10_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$5, %r11
+	cmp	$6, %r11
 	jbe	LABEL(ashr_10_exittail)
 # endif
 
@@ -1711,7 +1711,7 @@
 	jnz	LABEL(ashr_11_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$4, %r11
+	cmp	$5, %r11
 	jbe	LABEL(ashr_11_exittail)
 # endif
 
@@ -1836,7 +1836,7 @@
 	jnz	LABEL(ashr_12_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$3, %r11
+	cmp	$4, %r11
 	jbe	LABEL(ashr_12_exittail)
 # endif
 
@@ -1961,7 +1961,7 @@
 	jnz	LABEL(ashr_13_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$2, %r11
+	cmp	$3, %r11
 	jbe	LABEL(ashr_13_exittail)
 # endif
 
@@ -2086,7 +2086,7 @@
 	jnz	LABEL(ashr_14_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	cmp	$1, %r11
+	cmp	$2, %r11
 	jbe	LABEL(ashr_14_exittail)
 # endif
 
@@ -2213,8 +2213,8 @@
 	jnz	LABEL(ashr_15_exittail)
 
 # if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
-	test	%r11, %r11
-	je	LABEL(ashr_15_exittail)
+	cmpq	$1, %r11
+	jbe	LABEL(ashr_15_exittail)
 # endif
 
 	pxor	%xmm0, %xmm0

Modified: trunk/libc/wcsmbs/wcsatcliff.c
==============================================================================
--- trunk/libc/wcsmbs/wcsatcliff.c (original)
+++ trunk/libc/wcsmbs/wcsatcliff.c Tue Oct 12 13:15:00 2010
@@ -16,6 +16,8 @@
 #define MEMCPY wmemcpy
 #define MEMPCPY wmempcpy
 #define MEMCHR wmemchr
+#define STRCMP wcscmp
+#define STRNCMP wcsncmp
 
 
 #include "../string/stratcliff.c"

Modified: trunk/ports/ChangeLog.alpha
==============================================================================
--- trunk/ports/ChangeLog.alpha (original)
+++ trunk/ports/ChangeLog.alpha Tue Oct 12 13:15:00 2010
@@ -1,3 +1,28 @@
+2010-09-26  Michael Cree  <mcree@xxxxxxxxxxxx>
+
+	* sysdeps/alpha/memchr.c: Include <bp-sym.h>
+	(__memchr): Add casts for integer arithmetic on pointers.
+
+2010-09-23  Richard Henderson  <rth@xxxxxxxxxx>
+
+	[BZ #12019]
+	* sysdeps/alpha/alphaev6/memchr.S: Remove.
+	* sysdeps/alpha/memchr.S: Remove.
+	* sysdeps/alpha/memchr.c: New.
+
+2010-09-23  Richard Henderson  <rth@xxxxxxxxxx>
+
+	[BZ #1864]
+	* sysdeps/unix/sysv/linux/alpha/fstatfs64.c: New.
+	* sysdeps/unix/sysv/linux/alpha/fstatvfs.c: New.
+	* sysdeps/unix/sysv/linux/alpha/fstatvfs64.c: New.
+	* sysdeps/unix/sysv/linux/alpha/internal_statvfs64.c: New.
+	* sysdeps/unix/sysv/linux/alpha/statfs64.c: New.
+	* sysdeps/unix/sysv/linux/alpha/statvfs.c: New.
+	* sysdeps/unix/sysv/linux/alpha/statvfs64.c: New.
+	* sysdeps/unix/sysv/linux/alpha/syscalls.list (fstatfs, statfs):
+	Define without 64-bit aliases.
+
 2010-05-03  Aurelien Jarno  <aurelien@xxxxxxxxxxx>
  
 	* sysdeps/alpha/memchr.S: Use prefetch load.

Modified: trunk/ports/ChangeLog.arm
==============================================================================
--- trunk/ports/ChangeLog.arm (original)
+++ trunk/ports/ChangeLog.arm Tue Oct 12 13:15:00 2010
@@ -1,3 +1,16 @@
+2010-10-11  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/arm/eabi/feupdateenv.c (feupdateenv): Add
+	libm_hidden_ver.
+	* sysdeps/arm/eabi/ftestexcept.c (fetestexcept): Add
+	libm_hidden_def.
+	* sysdeps/arm/fpu/ftestexcept.c (fetestexcept): Likewise.
+
+2010-09-30  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/arm/syscalls.list: Add entry for
+	fanotify_mark syscall.
+
 2010-08-13  Alexander Kanevskiy  <kad@xxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags):

Modified: trunk/ports/ChangeLog.eglibc
==============================================================================
--- trunk/ports/ChangeLog.eglibc (original)
+++ trunk/ports/ChangeLog.eglibc Tue Oct 12 13:15:00 2010
@@ -1,3 +1,10 @@
+2010-10-12  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/powerpc/powerpc32/e500/fpu/feupdateenv.c (feupdateenv):
+	Add libm_hidden_ver.
+	* sysdeps/powerpc/powerpc32/e500/fpu/ftestexcept.c (fetestexcept):
+	Add libm_hidden_def.
+
 2010-08-12  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/m68k/kernel-features.h (MMAP2_PAGE_SHIFT):

Modified: trunk/ports/ChangeLog.m68k
==============================================================================
--- trunk/ports/ChangeLog.m68k (original)
+++ trunk/ports/ChangeLog.m68k Tue Oct 12 13:15:00 2010
@@ -1,3 +1,12 @@
+2010-10-11  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+
+	* sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Remove fma inlines.
+
+	* sysdeps/m68k/fpu/feupdateenv.c (feupdateenv): Add
+	libm_hidden_ver.
+	* sysdeps/m68k/fpu/ftestexcept.c (feupdateenv): Add
+	libm_hidden_def.
+
 2010-08-25  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h

Modified: trunk/ports/ChangeLog.mips
==============================================================================
--- trunk/ports/ChangeLog.mips (original)
+++ trunk/ports/ChangeLog.mips Tue Oct 12 13:15:00 2010
@@ -1,3 +1,9 @@
+2010-10-11  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Add
+	libm_hidden_def.
+	* sysdeps/mips/fpu/ftestexcept.c (fetestexcept): Likewise.
+
 2010-08-13  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/mips/kernel-features.h

Modified: trunk/ports/ChangeLog.powerpc
==============================================================================
--- trunk/ports/ChangeLog.powerpc (original)
+++ trunk/ports/ChangeLog.powerpc Tue Oct 12 13:15:00 2010
@@ -1,3 +1,10 @@
+2010-10-11  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/powerpc/nofpu/feupdateenv.c (feupdateenv): Add
+	libm_hidden_ver.
+	* sysdeps/powerpc/nofpu/ftestexcept.c (fetestexcept): Add
+	libm_hidden_def.
+
 2010-02-10  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/powerpc/nofpu/fegetenv.c: Add hidden alias.

Modified: trunk/ports/sysdeps/arm/eabi/feupdateenv.c
==============================================================================
--- trunk/ports/sysdeps/arm/eabi/feupdateenv.c (original)
+++ trunk/ports/sysdeps/arm/eabi/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2000, 2008, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -56,4 +56,5 @@
 compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);

Modified: trunk/ports/sysdeps/arm/eabi/ftestexcept.c
==============================================================================
--- trunk/ports/sysdeps/arm/eabi/ftestexcept.c (original)
+++ trunk/ports/sysdeps/arm/eabi/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2005, 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
@@ -41,3 +41,4 @@
   /* Unsupported, return 0.  */
   return 0;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/ports/sysdeps/arm/fpu/ftestexcept.c
==============================================================================
--- trunk/ports/sysdeps/arm/fpu/ftestexcept.c (original)
+++ trunk/ports/sysdeps/arm/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 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
@@ -30,3 +30,4 @@
 
   return temp & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/ports/sysdeps/m68k/fpu/feupdateenv.c
==============================================================================
--- trunk/ports/sysdeps/m68k/fpu/feupdateenv.c (original)
+++ trunk/ports/sysdeps/m68k/fpu/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999-2001,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
 
@@ -47,4 +47,5 @@
 compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);

Modified: trunk/ports/sysdeps/m68k/fpu/ftestexcept.c
==============================================================================
--- trunk/ports/sysdeps/m68k/fpu/ftestexcept.c (original)
+++ trunk/ports/sysdeps/m68k/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
 
@@ -30,3 +30,4 @@
 
   return fpsr & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
==============================================================================
--- trunk/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h (original)
+++ trunk/ports/sysdeps/m68k/m680x0/fpu/bits/mathinline.h Tue Oct 12 13:15:00 2010
@@ -326,13 +326,6 @@
   long int __result;							  \
   __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x));		  \
   return __result;							  \
-}									  \
-									  \
-__m81_inline float_type							  \
-__NTH (__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y,	  \
-				  float_type __z))			  \
-{									  \
-  return (__x * __y) + __z;						  \
 }
 
 __inline_functions (double,)
@@ -397,8 +390,6 @@
 __inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n))
 __inline_forward_c(double,nearbyint, (double __value), (__value))
 __inline_forward_c(long int,lrint, (double __value), (__value))
-__inline_forward_c(double,fma, (double __x, double __y, double __z),
-		   (__x, __y, __z))
 # endif
 # ifdef __USE_GNU
 __inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx),
@@ -419,8 +410,6 @@
 __inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n))
 __inline_forward_c(float,nearbyintf, (float __value), (__value))
 __inline_forward_c(long int,lrintf, (float __value), (__value))
-__inline_forward_c(float,fmaf, (float __x, float __y, float __z),
-		   (__x, __y, __z))
 # endif
 # ifdef __USE_GNU
 __inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx),
@@ -440,9 +429,6 @@
 		   (__x, __n))
 __inline_forward_c(long double,nearbyintl, (long double __value), (__value))
 __inline_forward_c(long int,lrintl, (long double __value), (__value))
-__inline_forward_c(long double,fmal,
-		   (long double __x, long double __y, long double __z),
-		   (__x, __y, __z))
 # endif
 # ifdef __USE_GNU
 __inline_forward(void,sincosl,

Modified: trunk/ports/sysdeps/mips/fpu/feupdateenv.c
==============================================================================
--- trunk/ports/sysdeps/mips/fpu/feupdateenv.c (original)
+++ trunk/ports/sysdeps/mips/fpu/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2002, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@xxxxxxx>, 1998.
 
@@ -41,3 +41,4 @@
   /* Success.  */
   return 0;
 }
+libm_hidden_def (feupdateenv)

Modified: trunk/ports/sysdeps/mips/fpu/ftestexcept.c
==============================================================================
--- trunk/ports/sysdeps/mips/fpu/ftestexcept.c (original)
+++ trunk/ports/sysdeps/mips/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@xxxxxxxxxxxxxxxxxxxxxx>, 1998.
 
@@ -31,3 +31,4 @@
 
   return cw & excepts & FE_ALL_EXCEPT;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/ports/sysdeps/powerpc/nofpu/feupdateenv.c
==============================================================================
--- trunk/ports/sysdeps/powerpc/nofpu/feupdateenv.c (original)
+++ trunk/ports/sysdeps/powerpc/nofpu/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -1,6 +1,6 @@
 /* Install given floating-point environment and raise exceptions
    (soft-float edition).
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2010 Free Software Foundation, Inc.
    Contributed by Aldy Hernandez <aldyh@xxxxxxxxxx>, 2002.
    This file is part of the GNU C Library.
 
@@ -49,4 +49,5 @@
 compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2);

Modified: trunk/ports/sysdeps/powerpc/nofpu/ftestexcept.c
==============================================================================
--- trunk/ports/sysdeps/powerpc/nofpu/ftestexcept.c (original)
+++ trunk/ports/sysdeps/powerpc/nofpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -1,5 +1,5 @@
 /* Test floating-point exceptions (soft-float edition).
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2010 Free Software Foundation, Inc.
    Contributed by Aldy Hernandez <aldyh@xxxxxxxxxx>, 2002.
    This file is part of the GNU C Library.
 
@@ -26,3 +26,4 @@
 {
   return __sim_exceptions & x;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/ports/sysdeps/powerpc/powerpc32/e500/fpu/feupdateenv.c
==============================================================================
--- trunk/ports/sysdeps/powerpc/powerpc32/e500/fpu/feupdateenv.c (original)
+++ trunk/ports/sysdeps/powerpc/powerpc32/e500/fpu/feupdateenv.c Tue Oct 12 13:15:00 2010
@@ -54,4 +54,5 @@
 compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1);
 #endif
 
+libm_hidden_ver (__feupdateenv, feupdateenv)
 versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2);

Modified: trunk/ports/sysdeps/powerpc/powerpc32/e500/fpu/ftestexcept.c
==============================================================================
--- trunk/ports/sysdeps/powerpc/powerpc32/e500/fpu/ftestexcept.c (original)
+++ trunk/ports/sysdeps/powerpc/powerpc32/e500/fpu/ftestexcept.c Tue Oct 12 13:15:00 2010
@@ -30,3 +30,4 @@
 
   return f & excepts;
 }
+libm_hidden_def (fetestexcept)

Modified: trunk/ports/sysdeps/unix/sysv/linux/alpha/syscalls.list
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/alpha/syscalls.list (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/alpha/syscalls.list Tue Oct 12 13:15:00 2010
@@ -53,3 +53,8 @@
 osf_utimes	-	osf_utimes	2	__utimes_tv32  utimes@xxxxxxxxx
 osf_getrusage	-	osf_getrusage	2	__getrusage_tv32  getrusage@xxxxxxxxx
 osf_wait4	-	osf_wait4	2	__wait4_tv32  wait4@xxxxxxxxx
+
+# avoid 64-bit aliases on 32-bit statfs syscalls
+fstatfs		-	fstatfs		i:ip	__fstatfs	fstatfs
+statfs		-	statfs		i:sp	__statfs	statfs
+

Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/syscalls.list
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/syscalls.list (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/syscalls.list Tue Oct 12 13:15:00 2010
@@ -5,3 +5,5 @@
 oldsetrlimit	EXTRA	setrlimit	i:ip	__old_setrlimit	setrlimit@xxxxxxxxx
 
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
+
+fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark