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

[commits] r9223 - in /trunk: libc/ libc/elf/ libc/malloc/ libc/misc/sys/ libc/resolv/ libc/resolv/nss_dns/ libc/string/bits/ libc/sysd...



Author: joseph
Date: Tue Nov 10 17:44:15 2009
New Revision: 9223

Log:
Merge changes between r9190 and r9222 from /fsf/trunk.

Modified:
    trunk/libc/ChangeLog
    trunk/libc/elf/dl-sym.c
    trunk/libc/elf/ifuncmain3.c
    trunk/libc/malloc/memusagestat.c
    trunk/libc/misc/sys/uio.h
    trunk/libc/resolv/mapv4v6hostent.h
    trunk/libc/resolv/nss_dns/dns-host.c
    trunk/libc/string/bits/string3.h
    trunk/libc/sysdeps/powerpc/fpu/e_sqrt.c
    trunk/libc/sysdeps/powerpc/fpu/e_sqrtf.c
    trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h
    trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
    trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
    trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
    trunk/ports/ChangeLog.alpha
    trunk/ports/ChangeLog.arm
    trunk/ports/ChangeLog.m68k
    trunk/ports/ChangeLog.mips
    trunk/ports/sysdeps/arm/memcpy.S
    trunk/ports/sysdeps/arm/memmove.S
    trunk/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
    trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
    trunk/ports/sysdeps/unix/sysv/linux/arm/clone.S
    trunk/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
    trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
    trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h

Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Tue Nov 10 17:44:15 2009
@@ -1,3 +1,54 @@
+2009-11-10  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* resolv/mapv4v6hostent.h (map_v4v6_hostent): Return non-zero if
+	out of buffer space.
+	* resolv/nss_dns/dns-host.c (getanswer_r): Check for
+	map_v4v6_hostent running out of space.
+
+2009-11-10  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* string/bits/string3.h (memset): If the second parameter is constant
+	and zero there is likely no transposition.
+	Patch by Caolan McNamara <caolanm@xxxxxxxxxxx
+
+2009-11-04  Philippe De Muyter  <phdm@xxxxxxxxx>
+
+	* sysdeps/powerpc/fpu/e_sqrt.c: Fix spelling of (Newton-)Raphson.
+	* sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
+
+2009-10-30  Holger Hans Peter Freyther  <zecke@xxxxxxxxxxx>
+
+	* malloc/memusagestat.c (main): Fix spelling in an error message.
+
+2009-11-01  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* elf/dl-sym.c (do_sym): Properly handle STT_GNU_IFUNC symbols.
+	* elf/ifuncmain3.c (main): Test dlopen STT_GNU_IFUNC symbol.
+
+2009-11-03  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Add
+	readahead.
+
+2009-11-03  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	* sysdeps/powerpc/powerpc64/dl-machine.h (resolve_ifunc): Don't
+	relocate opd entry when resolving prelink conflicts.
+
+2009-11-04  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	* misc/sys/uio.h (preadv, pwritev): Fix type of last argument
+	when -D_FILE_OFFSET_BITS=64.
+
+	* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (fallocate): Fix types
+	of last two arguments when -D_FILE_OFFSET_BITS=64.
+	* sysdeps/unix/sysv/linux/i386/bits/fcntl.h (fallocate): Likewise.
+	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h (fallocate): Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (fallocate): Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (fallocate): Likewise.
+	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (fallocate): Likewise.
+	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h (fallocate): Likewise.
+
 2009-11-03  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
 
 	[BZ #4457]

Modified: trunk/libc/elf/dl-sym.c
==============================================================================
--- trunk/libc/elf/dl-sym.c (original)
+++ trunk/libc/elf/dl-sym.c Tue Nov 10 17:44:15 2009
@@ -193,8 +193,13 @@
 
       /* Resolve indirect function address.  */
       if (__builtin_expect (ELFW(ST_TYPE) (ref->st_info) == STT_GNU_IFUNC, 0))
-	value
-	  = ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (value)) ();
+	{
+	  DL_FIXUP_VALUE_TYPE fixup
+	    = DL_FIXUP_MAKE_VALUE (result, (ElfW(Addr)) value);
+	  fixup =
+	    ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (fixup)) ();
+	  value = (void *) DL_FIXUP_VALUE_CODE_ADDR (fixup);
+	}
 
 #ifdef SHARED
       /* Auditing checkpoint: we have a new binding.  Provide the

Modified: trunk/libc/elf/ifuncmain3.c
==============================================================================
--- trunk/libc/elf/ifuncmain3.c (original)
+++ trunk/libc/elf/ifuncmain3.c Tue Nov 10 17:44:15 2009
@@ -45,6 +45,15 @@
       printf ("cannot load: %s\n", dlerror ());
       return 1;
     }
+
+  p = dlsym (h, "foo");
+  if (p == NULL)
+    {
+      printf ("symbol not found: %s\n", dlerror ());
+      return 1;
+    }
+  if ((*p) () != -1)
+    abort ();
 
   f = dlsym (h, "get_foo_p");
   if (f == NULL)

Modified: trunk/libc/malloc/memusagestat.c
==============================================================================
--- trunk/libc/malloc/memusagestat.c (original)
+++ trunk/libc/malloc/memusagestat.c Tue Nov 10 17:44:15 2009
@@ -181,7 +181,7 @@
       || st.st_size < 2 * sizeof (struct entry))
     {
       close (fd);
-      error (EXIT_FAILURE, 0, "input file as incorrect size");
+      error (EXIT_FAILURE, 0, "input file has incorrect size");
     }
   /* Compute number of data entries.  */
   total = st.st_size / sizeof (struct entry) - 2;

Modified: trunk/libc/misc/sys/uio.h
==============================================================================
--- trunk/libc/misc/sys/uio.h (original)
+++ trunk/libc/misc/sys/uio.h Tue Nov 10 17:44:15 2009
@@ -80,10 +80,10 @@
 # else
 #  ifdef __REDIRECT
 extern ssize_t __REDIRECT (preadv, (int __fd, __const struct iovec *__iovec,
-				    int __count, __off_t __offset),
+				    int __count, __off64_t __offset),
 			   preadv64) __wur;
 extern ssize_t __REDIRECT (pwritev, (int __fd, __const struct iovec *__iovec,
-				     int __count, __off_t __offset),
+				     int __count, __off64_t __offset),
 			   pwritev64) __wur;
 #  else
 #   define preadv preadv64

Modified: trunk/libc/resolv/mapv4v6hostent.h
==============================================================================
--- trunk/libc/resolv/mapv4v6hostent.h (original)
+++ trunk/libc/resolv/mapv4v6hostent.h Tue Nov 10 17:44:15 2009
@@ -57,13 +57,13 @@
     char ac;
 } align;
 
-static void
+static int
 map_v4v6_hostent (struct hostent *hp, char **bpp, int *lenp)
 {
   char **ap;
 
   if (hp->h_addrtype != AF_INET || hp->h_length != INADDRSZ)
-    return;
+    return 0;
   hp->h_addrtype = AF_INET6;
   hp->h_length = IN6ADDRSZ;
   for (ap = hp->h_addr_list; *ap; ap++)
@@ -71,11 +71,8 @@
       int i = sizeof (align) - ((u_long) *bpp % sizeof (align));
 
       if (*lenp < (i + IN6ADDRSZ))
-	{
-	  /* Out of memory.  Truncate address list here.  XXX */
-	  *ap = NULL;
-	  return;
-	}
+	/* Out of memory.  */
+	return 1;
       *bpp += i;
       *lenp -= i;
       map_v4v6_address (*ap, *bpp);
@@ -83,4 +80,5 @@
       *bpp += IN6ADDRSZ;
       *lenp -= IN6ADDRSZ;
     }
+  return 0;
 }

Modified: trunk/libc/resolv/nss_dns/dns-host.c
==============================================================================
--- trunk/libc/resolv/nss_dns/dns-host.c (original)
+++ trunk/libc/resolv/nss_dns/dns-host.c Tue Nov 10 17:44:15 2009
@@ -878,7 +878,8 @@
 		}
 	      bp += n;
 	      linebuflen -= n;
-	      map_v4v6_hostent (result, &bp, &linebuflen);
+	      if (map_v4v6_hostent (result, &bp, &linebuflen))
+		goto too_small;
 	    }
 	  *h_errnop = NETDB_SUCCESS;
 	  return NSS_STATUS_SUCCESS;
@@ -953,7 +954,8 @@
 	}
 
       if (have_to_map)
-	map_v4v6_hostent (result, &bp, &linebuflen);
+	if (map_v4v6_hostent (result, &bp, &linebuflen))
+	  goto too_small;
       *h_errnop = NETDB_SUCCESS;
       return NSS_STATUS_SUCCESS;
     }

Modified: trunk/libc/string/bits/string3.h
==============================================================================
--- trunk/libc/string/bits/string3.h (original)
+++ trunk/libc/string/bits/string3.h Tue Nov 10 17:44:15 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2007, 2009 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
@@ -77,7 +77,8 @@
 __extern_always_inline void *
 __NTH (memset (void *__dest, int __ch, size_t __len))
 {
-  if (__builtin_constant_p (__len) && __len == 0)
+  if (__builtin_constant_p (__len) && __len == 0
+      && (!__builtin_constant_p (__ch) || __ch != 0))
     {
       __warn_memset_zero_len ();
       return __dest;

Modified: trunk/libc/sysdeps/powerpc/fpu/e_sqrt.c
==============================================================================
--- trunk/libc/sysdeps/powerpc/fpu/e_sqrt.c (original)
+++ trunk/libc/sysdeps/powerpc/fpu/e_sqrt.c Tue Nov 10 17:44:15 2009
@@ -35,7 +35,7 @@
 /* The method is based on a description in
    Computation of elementary functions on the IBM RISC System/6000 processor,
    P. W. Markstein, IBM J. Res. Develop, 34(1) 1990.
-   Basically, it consists of two interleaved Newton-Rhapson approximations,
+   Basically, it consists of two interleaved Newton-Raphson approximations,
    one to find the actual square root, and one to find its reciprocal
    without the expense of a division operation.   The tricky bit here
    is the use of the POWER/PowerPC multiply-add operation to get the
@@ -44,7 +44,7 @@
    The argument reduction works by a combination of table lookup to
    obtain the initial guesses, and some careful modification of the
    generated guesses (which mostly runs on the integer unit, while the
-   Newton-Rhapson is running on the FPU).  */
+   Newton-Raphson is running on the FPU).  */
 
 #ifdef __STDC__
 double
@@ -102,7 +102,7 @@
 	  /* complete the INSERT_WORDS (sx, sxi, xi1) operation.  */
 	  sx = iw_u.value;
 
-	  /* Here we have three Newton-Rhapson iterations each of a
+	  /* Here we have three Newton-Raphson iterations each of a
 	     division and a square root and the remainder of the
 	     argument reduction, all interleaved.   */
 	  sd = -(sg * sg - sx);

Modified: trunk/libc/sysdeps/powerpc/fpu/e_sqrtf.c
==============================================================================
--- trunk/libc/sysdeps/powerpc/fpu/e_sqrtf.c (original)
+++ trunk/libc/sysdeps/powerpc/fpu/e_sqrtf.c Tue Nov 10 17:44:15 2009
@@ -35,7 +35,7 @@
 /* The method is based on a description in
    Computation of elementary functions on the IBM RISC System/6000 processor,
    P. W. Markstein, IBM J. Res. Develop, 34(1) 1990.
-   Basically, it consists of two interleaved Newton-Rhapson approximations,
+   Basically, it consists of two interleaved Newton-Raphson approximations,
    one to find the actual square root, and one to find its reciprocal
    without the expense of a division operation.   The tricky bit here
    is the use of the POWER/PowerPC multiply-add operation to get the
@@ -44,7 +44,7 @@
    The argument reduction works by a combination of table lookup to
    obtain the initial guesses, and some careful modification of the
    generated guesses (which mostly runs on the integer unit, while the
-   Newton-Rhapson is running on the FPU).  */
+   Newton-Raphson is running on the FPU).  */
 
 #ifdef __STDC__
 float
@@ -90,7 +90,7 @@
 	  sg = t_sqrt[0];
 	  sy = t_sqrt[1];
 
-	  /* Here we have three Newton-Rhapson iterations each of a
+	  /* Here we have three Newton-Raphson iterations each of a
 	     division and a square root and the remainder of the
 	     argument reduction, all interleaved.   */
 	  sd = -(sg * sg - sx);

Modified: trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h
==============================================================================
--- trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h (original)
+++ trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h Tue Nov 10 17:44:15 2009
@@ -531,13 +531,14 @@
 resolve_ifunc (Elf64_Addr value,
 	       const struct link_map *map, const struct link_map *sym_map)
 {
+#ifndef RESOLVE_CONFLICT_FIND_MAP
   /* The function we are calling may not yet have its opd entry relocated.  */
   Elf64_FuncDesc opd;
   if (map != sym_map
-#if !defined RTLD_BOOTSTRAP && defined SHARED
+# if !defined RTLD_BOOTSTRAP && defined SHARED
       /* Bootstrap map doesn't have l_relocated set for it.  */
       && sym_map != &GL(dl_rtld_map)
-#endif
+# endif
       && !sym_map->l_relocated)
     {
       Elf64_FuncDesc *func = (Elf64_FuncDesc *) value;
@@ -546,6 +547,7 @@
       opd.fd_aux = func->fd_aux;
       value = (Elf64_Addr) &opd;
     }
+#endif
   return ((Elf64_Addr (*) (void)) value) ();
 }
 

Modified: trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h Tue Nov 10 17:44:15 2009
@@ -259,8 +259,8 @@
 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
-				   __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
 		       fallocate64);
 #  else
 #   define fallocate fallocate64

Modified: trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h Tue Nov 10 17:44:15 2009
@@ -253,8 +253,8 @@
 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
-				   __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
 		       fallocate64);
 #  else
 #   define fallocate fallocate64

Modified: trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h Tue Nov 10 17:44:15 2009
@@ -259,8 +259,8 @@
 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
-				   __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
 		       fallocate64);
 #  else
 #   define fallocate fallocate64

Modified: trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list Tue Nov 10 17:44:15 2009
@@ -3,3 +3,6 @@
 # System calls with wrappers.
 oldgetrlimit	EXTRA	getrlimit	i:ip	__old_getrlimit	getrlimit@xxxxxxxxx
 oldsetrlimit	EXTRA	setrlimit	i:ip	__old_setrlimit	setrlimit@xxxxxxxxx
+
+# Due to 64bit alignment there is a dummy second parameter
+readahead	-	readahead	i:iiiii	__readahead	readahead

Modified: trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h Tue Nov 10 17:44:15 2009
@@ -279,8 +279,8 @@
 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
-				   __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
 		       fallocate64);
 #  else
 #   define fallocate fallocate64

Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h Tue Nov 10 17:44:15 2009
@@ -259,8 +259,8 @@
 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
-				   __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
 		       fallocate64);
 #  else
 #   define fallocate fallocate64

Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h Tue Nov 10 17:44:15 2009
@@ -278,8 +278,8 @@
 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
-				   __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
 		       fallocate64);
 #  else
 #   define fallocate fallocate64

Modified: trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h Tue Nov 10 17:44:15 2009
@@ -273,8 +273,8 @@
 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
-				   __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
 		       fallocate64);
 #  else
 #   define fallocate fallocate64

Modified: trunk/ports/ChangeLog.alpha
==============================================================================
--- trunk/ports/ChangeLog.alpha (original)
+++ trunk/ports/ChangeLog.alpha Tue Nov 10 17:44:15 2009
@@ -1,3 +1,9 @@
+2009-11-10  Matt Turner  <mattst88@xxxxxxxxx>
+
+	[BZ #10609]
+	* sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix handling
+	of empty parameters for file names.
+
 2009-07-13  Aurelien Jarno  <aurelien@xxxxxxxxxxx>
 
 	[BZ #10158]

Modified: trunk/ports/ChangeLog.arm
==============================================================================
--- trunk/ports/ChangeLog.arm (original)
+++ trunk/ports/ChangeLog.arm Tue Nov 10 17:44:15 2009
@@ -1,3 +1,15 @@
+2009-11-06  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (fallocate): Fix types
+	of last two arguments when -D_FILE_OFFSET_BITS=64.
+
+2009-11-04  Philip Blundell  <philb@xxxxxxx>
+
+	* sysdeps/unix/sysv/linux/arm/clone.S: Support V4T interworking.
+	* sysdeps/unix/sysv/linux/arm/sysdep.h (__local_syscall_error): Likewise.
+	* sysdeps/arm/memcpy.S: Likewise.
+	* sysdeps/arm/memmove.S: Likewise.
+
 2009-10-29  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define F_OWNER_* and

Modified: trunk/ports/ChangeLog.m68k
==============================================================================
--- trunk/ports/ChangeLog.m68k (original)
+++ trunk/ports/ChangeLog.m68k Tue Nov 10 17:44:15 2009
@@ -1,3 +1,8 @@
+2009-11-07  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (fallocate): Fix types
+	of last two arguments when -D_FILE_OFFSET_BITS=64.
+
 2009-10-30  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	[BZ #10609]

Modified: trunk/ports/ChangeLog.mips
==============================================================================
--- trunk/ports/ChangeLog.mips (original)
+++ trunk/ports/ChangeLog.mips Tue Nov 10 17:44:15 2009
@@ -1,3 +1,8 @@
+2009-11-06  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (fallocate): Fix types
+	of last two arguments when -D_FILE_OFFSET_BITS=64.
+
 2009-10-29  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define F_OWNER_* and

Modified: trunk/ports/sysdeps/arm/memcpy.S
==============================================================================
--- trunk/ports/sysdeps/arm/memcpy.S (original)
+++ trunk/ports/sysdeps/arm/memcpy.S Tue Nov 10 17:44:15 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    Contributed by MontaVista Software, Inc. (written by Nicolas Pitre)
@@ -130,7 +130,12 @@
 		strcsb	r4, [r0], #1
 		strcsb	ip, [r0]
 
+#if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
+		ldmfd	sp!, {r0, r4, lr}
+		bx      lr
+#else
 		ldmfd	sp!, {r0, r4, pc}
+#endif
 
 9:		rsb	ip, ip, #4
 		cmp	ip, #2

Modified: trunk/ports/sysdeps/arm/memmove.S
==============================================================================
--- trunk/ports/sysdeps/arm/memmove.S (original)
+++ trunk/ports/sysdeps/arm/memmove.S Tue Nov 10 17:44:15 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    Contributed by MontaVista Software, Inc. (written by Nicolas Pitre)
@@ -144,7 +144,12 @@
 		strneb	r3, [r0, #-1]!
 		strcsb	r4, [r0, #-1]!
 		strcsb	ip, [r0, #-1]
+#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
+		ldmfd	sp!, {r0, r4, lr}
+		bx      lr
+#else
 		ldmfd	sp!, {r0, r4, pc}
+#endif
 
 9:		cmp	ip, #2
 		ldrgtb	r3, [r1, #-1]!

Modified: trunk/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c Tue Nov 10 17:44:15 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2009 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,6 +46,12 @@
   if (fd != AT_FDCWD && file[0] != '/')
     {
       size_t filelen = strlen (file);
+      if (__builtin_expect (filelen == 0, 0))
+        {
+          __set_errno (ENOENT);
+          return -1;
+        }
+
       static const char procfd[] = "/proc/self/fd/%d/%s";
       /* Buffer for the path name we are going to use.  It consists of
 	 - the string /proc/self/fd/

Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h Tue Nov 10 17:44:15 2009
@@ -259,8 +259,8 @@
 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
-				   __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
 		       fallocate64);
 #  else
 #   define fallocate fallocate64

Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/clone.S
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/clone.S (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/clone.S Tue Nov 10 17:44:15 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008
+/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Pat Beirne <patb@xxxxxxxxxxxxxxxxx>
@@ -96,8 +96,14 @@
 #endif
 	@ pick the function arg and call address off the stack and execute
 	ldr	r0, [sp, #4]
+#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
+	ldr 	ip, [sp], #8
+	mov	lr, pc
+	bx      ip
+#else
 	mov	lr, pc
 	ldr 	pc, [sp], #8
+#endif
 
 	@ and we are done, passing the return value through r0
 	b	PLTJMP(HIDDEN_JUMPTARGET(_exit))

Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/sysdep.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/sysdep.h Tue Nov 10 17:44:15 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006
+/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006, 2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@xxxxxxxxxxxxxx>, August 1995.
@@ -129,6 +129,11 @@
        DO_RET(lr);						\
 1:     .word C_SYMBOL_NAME(rtld_errno) - 0b - 8;
 # else
+#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
+#define POP_PC  ldr     lr, [sp], #4; bx lr
+#else
+#define POP_PC  ldr     pc, [sp], #4
+#endif
 #  define SYSCALL_ERROR_HANDLER					\
 __local_syscall_error:						\
 	str	lr, [sp, #-4]!;					\
@@ -138,7 +143,7 @@
 	rsb	r1, r1, #0;					\
 	str	r1, [r0];					\
 	mvn	r0, #0;						\
-	ldr	pc, [sp], #4;
+	POP_PC;
 # endif
 #else
 # define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */

Modified: trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h Tue Nov 10 17:44:15 2009
@@ -239,8 +239,8 @@
 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
-				   __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
 		       fallocate64);
 #  else
 #   define fallocate fallocate64

Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h Tue Nov 10 17:44:15 2009
@@ -272,8 +272,8 @@
 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
 # else
 #  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
-				   __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
 		       fallocate64);
 #  else
 #   define fallocate fallocate64