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

[Commits] r21356 - in /fsf/trunk/libc: ./ manual/ nptl/ ports/ ports/sysdeps/unix/sysv/linux/generic/bits/ ports/sysdeps/unix/sysv/lin...



Author: eglibc
Date: Fri Oct 26 00:01:43 2012
New Revision: 21356

Log:
Import glibc-mainline for 2012-10-26

Added:
    fsf/trunk/libc/scripts/cross-test-ssh.sh   (with props)
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c
    fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/INSTALL
    fsf/trunk/libc/Makeconfig
    fsf/trunk/libc/manual/install.texi
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/Makefile
    fsf/trunk/libc/nptl/tst-basic2.c
    fsf/trunk/libc/nptl/tst-cond-except.c
    fsf/trunk/libc/nptl/tst-cond25.c
    fsf/trunk/libc/nptl/tst-tls6.sh
    fsf/trunk/libc/ports/ChangeLog.ia64
    fsf/trunk/libc/ports/ChangeLog.linux-generic
    fsf/trunk/libc/ports/ChangeLog.m68k
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
    fsf/trunk/libc/sysdeps/mach/hurd/ptrace.c
    fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Oct 26 00:01:43 2012
@@ -1,3 +1,39 @@
+2012-10-25  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+	(__get_clockfreq_via_proc_openprom): Use strtoumax instead
+	of strtoull.
+
+	* sysdeps/sparc/sparc64/multiarch/memcpy.S: Add comments for
+	ifunc-impl-list.c
+	* sysdeps/sparc/sparc64/multiarch/memset.S: Likewise.
+	* sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c: New file.
+	* sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c: New
+	file.
+
+2012-10-25  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+	(__get_clockfreq_via_proc_openprom): Use __getdents instead of
+	__getdirentries.
+
+2012-10-25  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+	    Jim Blandy  <jimb@xxxxxxxxxxxxxxxx>
+
+	* scripts/cross-test-ssh.sh: New file.
+	* manual/install.texi (Configuring and compiling): Document use of
+	cross-test-ssh.sh.
+	* INSTALL: Regenerated.
+
+2012-10-25  Pino Toscano  <toscano.pino@xxxxxxxxxx>
+
+	* sysdeps/mach/hurd/ptrace.c (ptrace): Use __hurd_fail to return
+	EOPNOTSUPP.
+
+2012-10-25  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* Makeconfig (run-program-prefix): Fix comment.
+
 2012-10-24  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 	    Jim Blandy  <jimb@xxxxxxxxxxxxxxxx>
 
@@ -964,7 +1000,7 @@
 	(__SWBLK_T_TYPE): Likewise.
 
 2012-10-01  Patsy Franklin <pfrankli@xxxxxxxxxx>
-            Honza Horak <hhorak@xxxxxxxxxx>
+	    Honza Horak <hhorak@xxxxxxxxxx>
 
 	* nis/yp_xdr.c (xdr_domainname): Use YPMAXDOMAIN as maxsize.
 	(xdr_mapname): Use YPMAXMAP as maxsize.
@@ -1481,7 +1517,7 @@
 
 2012-12-09  Allan McRae  <allan@xxxxxxxxxxxxx>
 
-        * sysdeps/i386/fpu/libm-test-ulps: Update
+	* sysdeps/i386/fpu/libm-test-ulps: Update
 
 2012-09-11  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 

Modified: fsf/trunk/libc/INSTALL
==============================================================================
--- fsf/trunk/libc/INSTALL (original)
+++ fsf/trunk/libc/INSTALL Fri Oct 26 00:01:43 2012
@@ -196,7 +196,13 @@
 to use for programs run on the build system as part of compiling the
 library.  You may need to set `AR' to cross-compiling versions of `ar'
 if the native tools are not configured to work with object files for
-the target you configured for.
+the target you configured for.  When cross-compiling the GNU C Library,
+it may be tested using `make check
+test-wrapper="SRCDIR/scripts/cross-test-ssh.sh HOSTNAME"', where SRCDIR
+is the absolute directory name for the main source directory and
+HOSTNAME is the host name of a system that can run the newly built
+binaries of the GNU C Library.  The source and build directories must
+be visible at the same locations on both the build system and HOSTNAME.
 
 Installing the C Library
 ========================

Modified: fsf/trunk/libc/Makeconfig
==============================================================================
--- fsf/trunk/libc/Makeconfig (original)
+++ fsf/trunk/libc/Makeconfig Fri Oct 26 00:01:43 2012
@@ -608,7 +608,7 @@
 else
 run-via-rtld-prefix =
 endif
-# $(run-via-rtld-prefix) is a command that, when prepended to the name
+# $(run-program-prefix) is a command that, when prepended to the name
 # of a program built with the newly built library, produces a command
 # that, executed on the build system on which "make" is run, runs that
 # program.

Modified: fsf/trunk/libc/manual/install.texi
==============================================================================
--- fsf/trunk/libc/manual/install.texi (original)
+++ fsf/trunk/libc/manual/install.texi Fri Oct 26 00:01:43 2012
@@ -224,7 +224,14 @@
 run on the build system as part of compiling the library.  You may need to
 set @code{AR} to cross-compiling versions of @code{ar}
 if the native tools are not configured to work with
-object files for the target you configured for.
+object files for the target you configured for.  When cross-compiling
+@theglibc{}, it may be tested using @samp{make check
+test-wrapper="@var{srcdir}/scripts/cross-test-ssh.sh @var{hostname}"},
+where @var{srcdir} is the absolute directory name for the main source
+directory and @var{hostname} is the host name of a system that can run
+the newly built binaries of @theglibc{}.  The source and build
+directories must be visible at the same locations on both the build
+system and @var{hostname}.
 
 
 @node Running make install

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Fri Oct 26 00:01:43 2012
@@ -1,3 +1,20 @@
+2012-10-25  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
+	run tst-tls6.sh.
+	* tst-tls6.sh: Use /bin/bash not /bin/sh.
+
+2012-10-25  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* tst-basic2.c (do_test): Return RESULT, not always zero.
+
+	* tst-cond25.c: Include <stdint.h>
+	(waiter): Add casts to uintptr_t between casting integer<->pointer.
+	(timed_waiter): Likewise.
+	(do_test_wait): Likewise.
+	* tst-cond-except.c (thr): Likewise.
+	(do_test): Use prototype definition.
+
 2012-10-24  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 	    Jim Blandy  <jimb@xxxxxxxxxxxxxxxx>
 

Modified: fsf/trunk/libc/nptl/Makefile
==============================================================================
--- fsf/trunk/libc/nptl/Makefile (original)
+++ fsf/trunk/libc/nptl/Makefile Fri Oct 26 00:01:43 2012
@@ -475,7 +475,7 @@
 		       $(objpfx)tst-tls5moda.so $(objpfx)tst-tls5modb.so \
 		       $(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \
 		       $(objpfx)tst-tls5mode.so $(objpfx)tst-tls5modf.so
-	$(SHELL) $< $(common-objpfx) $(elf-objpfx) \
+	$(BASH) $< $(common-objpfx) $(elf-objpfx) \
 		    $(rtld-installed-name) '$(test-wrapper-env)'
 endif
 

Modified: fsf/trunk/libc/nptl/tst-basic2.c
==============================================================================
--- fsf/trunk/libc/nptl/tst-basic2.c (original)
+++ fsf/trunk/libc/nptl/tst-basic2.c Fri Oct 26 00:01:43 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
 
@@ -112,7 +112,7 @@
 	result = 1;
     }
 
-  return 0;
+  return result;
 }
 
 

Modified: fsf/trunk/libc/nptl/tst-cond-except.c
==============================================================================
--- fsf/trunk/libc/nptl/tst-cond-except.c (original)
+++ fsf/trunk/libc/nptl/tst-cond-except.c Fri Oct 26 00:01:43 2012
@@ -18,6 +18,7 @@
 
 #include <pthread.h>
 #include <stdio.h>
+#include <stdint.h>
 #include <string.h>
 #include <unistd.h>
 
@@ -72,11 +73,11 @@
   pthread_cleanup_pop (1);
 
 out:
-  return (void *)ret;
+  return (void *) (uintptr_t) ret;
 }
 
 int
-do_test ()
+do_test (void)
 {
   pthread_t thread;
   int ret = 0;

Modified: fsf/trunk/libc/nptl/tst-cond25.c
==============================================================================
--- fsf/trunk/libc/nptl/tst-cond25.c (original)
+++ fsf/trunk/libc/nptl/tst-cond25.c Fri Oct 26 00:01:43 2012
@@ -20,6 +20,7 @@
 #include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <string.h>
 #include <errno.h>
 #include <sys/types.h>
@@ -87,13 +88,13 @@
 {
   int i, ret = 0;
   void *tret = NULL;
-  int seq = (int)u;
+  int seq = (uintptr_t) u;
 
   for (i = 0; i < ITERS / NUM; i++)
     {
       if ((ret = pthread_mutex_lock (&mutex)) != 0)
         {
-	  tret = (void *)1;
+	  tret = (void *) (uintptr_t) 1;
 	  printf ("waiter[%u]:mutex_lock failed: %s\n", seq, strerror (ret));
 	  goto out;
 	}
@@ -101,14 +102,14 @@
 
       if ((ret = pthread_cond_wait (&cond, &mutex)) != 0)
         {
-	  tret = (void *)1;
+	  tret = (void *) (uintptr_t) 1;
 	  printf ("waiter[%u]:wait failed: %s\n", seq, strerror (ret));
 	  goto unlock_out;
 	}
 
       if ((ret = pthread_mutex_unlock (&mutex)) != 0)
         {
-	  tret = (void *)1;
+	  tret = (void *) (uintptr_t) 1;
 	  printf ("waiter[%u]:mutex_unlock failed: %s\n", seq, strerror (ret));
 	  goto out;
 	}
@@ -130,7 +131,7 @@
 {
   int i, ret;
   void *tret = NULL;
-  int seq = (int)u;
+  int seq = (uintptr_t) u;
 
   for (i = 0; i < ITERS / NUM; i++)
     {
@@ -138,7 +139,7 @@
 
       if ((ret = clock_gettime(CLOCK_REALTIME, &ts)) != 0)
         {
-	  tret = (void *)1;
+	  tret = (void *) (uintptr_t) 1;
 	  printf ("%u:clock_gettime failed: %s\n", seq, strerror (errno));
 	  goto out;
 	}
@@ -146,7 +147,7 @@
 
       if ((ret = pthread_mutex_lock (&mutex)) != 0)
         {
-	  tret = (void *)1;
+	  tret = (void *) (uintptr_t) 1;
 	  printf ("waiter[%u]:mutex_lock failed: %s\n", seq, strerror (ret));
 	  goto out;
 	}
@@ -155,13 +156,13 @@
       /* We should not time out either.  */
       if ((ret = pthread_cond_timedwait (&cond, &mutex, &ts)) != 0)
         {
-	  tret = (void *)1;
+	  tret = (void *) (uintptr_t) 1;
 	  printf ("waiter[%u]:timedwait failed: %s\n", seq, strerror (ret));
 	  goto unlock_out;
 	}
       if ((ret = pthread_mutex_unlock (&mutex)) != 0)
         {
-	  tret = (void *)1;
+	  tret = (void *) (uintptr_t) 1;
 	  printf ("waiter[%u]:mutex_unlock failed: %s\n", seq, strerror (ret));
 	  goto out;
 	}
@@ -195,7 +196,8 @@
 	  goto out;
 	}
 
-      if ((ret = pthread_mutexattr_setprotocol (&attr, PTHREAD_PRIO_INHERIT)) != 0)
+      if ((ret = pthread_mutexattr_setprotocol (&attr,
+                                                PTHREAD_PRIO_INHERIT)) != 0)
         {
 	  printf ("mutexattr_setprotocol failed: %s\n", strerror (ret));
 	  goto out;
@@ -214,7 +216,8 @@
 	}
 
       for (j = 0; j < NUM; j++)
-        if ((ret = pthread_create (&w[j], NULL, f, (void *)j)) != 0)
+        if ((ret = pthread_create (&w[j], NULL,
+                                   f, (void *) (uintptr_t) j)) != 0)
 	  {
 	    printf ("waiter[%d]: create failed: %s\n", j, strerror (ret));
 	    goto out;

Modified: fsf/trunk/libc/nptl/tst-tls6.sh
==============================================================================
--- fsf/trunk/libc/nptl/tst-tls6.sh (original)
+++ fsf/trunk/libc/nptl/tst-tls6.sh Fri Oct 26 00:01:43 2012
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 # A tls test.
 # Copyright (C) 2003-2012 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.

Modified: fsf/trunk/libc/ports/ChangeLog.ia64
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.ia64 (original)
+++ fsf/trunk/libc/ports/ChangeLog.ia64 Fri Oct 26 00:01:43 2012
@@ -1,3 +1,9 @@
+2012-10-25  Andreas Jaeger  <aj@xxxxxxx>
+
+	* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Remove all
+	definitions and declarations that are provided by
+	<bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
+
 2012-10-19  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist

Modified: fsf/trunk/libc/ports/ChangeLog.linux-generic
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.linux-generic (original)
+++ fsf/trunk/libc/ports/ChangeLog.linux-generic Fri Oct 26 00:01:43 2012
@@ -1,3 +1,9 @@
+2012-10-23  Andreas Jaeger  <aj@xxxxxxx>
+
+	* sysdeps/unix/sysv/linux/generic/bits/fcntl.h: Remove all
+	definitions and declarations that are provided by
+	<bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
+
 2012-10-01  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/generic/bits/typesizes.h

Modified: fsf/trunk/libc/ports/ChangeLog.m68k
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.m68k (original)
+++ fsf/trunk/libc/ports/ChangeLog.m68k Fri Oct 26 00:01:43 2012
@@ -1,3 +1,9 @@
+2012-10-25  Andreas Jaeger  <aj@xxxxxxx>
+
+	* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Remove all
+	definitions and declarations that are provided by
+	<bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
+
 2012-10-19  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist:

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h Fri Oct 26 00:01:43 2012
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for the generic Linux ABI.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   Copyright (C) 2011-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
 
@@ -21,147 +21,12 @@
 # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
 #endif
 
-#include <sys/types.h>
 #include <bits/wordsize.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
 
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
-   located on a few file systems.  */
-#define O_ACCMODE	   0003
-#define O_RDONLY	     00
-#define O_WRONLY	     01
-#define O_RDWR		     02
-#define O_CREAT		   0100	/* not fcntl */
-#define O_EXCL		   0200	/* not fcntl */
-#define O_NOCTTY	   0400	/* not fcntl */
-#define O_TRUNC		  01000	/* not fcntl */
-#define O_APPEND	  02000
-#define O_NONBLOCK	  04000
-#define O_NDELAY	O_NONBLOCK
-#define O_SYNC	       04010000
-#define O_FSYNC		 O_SYNC
-#define O_ASYNC		 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY	0200000	/* Must be a directory.	 */
-# define O_NOFOLLOW	0400000	/* Do not follow links.	 */
-# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT	 040000	/* Direct disk access.	*/
-# define O_NOATIME     01000000 /* Do not set atime.  */
-# define O_PATH	      010000000 /* Resolve pathname but do not open file.  */
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
-   We define the symbols here but let them do the same as O_SYNC since
-   this is a superset.	*/
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC	010000	/* Synchronize data.  */
-# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# if __WORDSIZE == 64
-#  define O_LARGEFILE	0
-# else
-#  define O_LARGEFILE	0100000
-# endif
-#endif
-
-/* Values for the second argument to `fcntl'.  */
-#define F_DUPFD		0	/* Duplicate file descriptor.  */
-#define F_GETFD		1	/* Get file descriptor flags.  */
-#define F_SETFD		2	/* Set file descriptor flags.  */
-#define F_GETFL		3	/* Get file status flags.  */
-#define F_SETFL		4	/* Set file status flags.  */
 #if __WORDSIZE == 64
-# define F_GETLK	5	/* Get record locking info.  */
-# define F_SETLK	6	/* Set record locking info (non-blocking).  */
-# define F_SETLKW	7	/* Set record locking info (blocking).	*/
-/* Not necessary, we always have 64-bit offsets.  */
-# define F_GETLK64	5	/* Get record locking info.  */
-# define F_SETLK64	6	/* Set record locking info (non-blocking).  */
-# define F_SETLKW64	7	/* Set record locking info (blocking).	*/
+# define __O_LARGEFILE	0
 #else
-# ifndef __USE_FILE_OFFSET64
-#  define F_GETLK	5	/* Get record locking info.  */
-#  define F_SETLK	6	/* Set record locking info (non-blocking).  */
-#  define F_SETLKW	7	/* Set record locking info (blocking).	*/
-# else
-#  define F_GETLK	F_GETLK64  /* Get record locking info.	*/
-#  define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
-#  define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
-# endif
-# define F_GETLK64	12	/* Get record locking info.  */
-# define F_SETLK64	13	/* Set record locking info (non-blocking).  */
-# define F_SETLKW64	14	/* Set record locking info (blocking).	*/
-#endif
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN	8	/* Get owner (process receiving SIGIO).  */
-# define F_GETOWN	9	/* Set owner (process receiving SIGIO).  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG	10	/* Set number of signal to be sent.  */
-# define F_GETSIG	11	/* Get number of signal to be sent.  */
-# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
-# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE	1024	/* Set a lease.	 */
-# define F_GETLEASE	1025	/* Enquire what lease is active.  */
-# define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
-# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set.  */
-#endif
-
-/* For F_[GET|SET]FD.  */
-#define FD_CLOEXEC	1	/* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
-#define F_RDLCK		0	/* Read lock.  */
-#define F_WRLCK		1	/* Write lock.	*/
-#define F_UNLCK		2	/* Remove lock.	 */
-
-/* For old implementation of bsd flock().  */
-#define F_EXLCK		4	/* or 3 */
-#define F_SHLCK		8	/* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation.	*/
-# define LOCK_SH	1	/* shared lock */
-# define LOCK_EX	2	/* exclusive lock */
-# define LOCK_NB	4	/* or'd with one of the above to prevent
-				   blocking */
-# define LOCK_UN	8	/* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND	32	/* This is a mandatory flock:	*/
-# define LOCK_READ	64	/* ... which allows concurrent read operations.	 */
-# define LOCK_WRITE	128	/* ... which allows concurrent write operations.  */
-# define LOCK_RW	192	/* ... Which allows concurrent read & write operations.	 */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY.  */
-# define DN_ACCESS	0x00000001	/* File accessed.  */
-# define DN_MODIFY	0x00000002	/* File modified.  */
-# define DN_CREATE	0x00000004	/* File created.  */
-# define DN_DELETE	0x00000008	/* File removed.  */
-# define DN_RENAME	0x00000010	/* File renamed.  */
-# define DN_ATTRIB	0x00000020	/* File changed attibutes.  */
-# define DN_MULTISHOT	0x80000000	/* Don't remove notifier.  */
+# define __O_LARGEFILE	0100000
 #endif
 
 struct flock
@@ -189,151 +54,5 @@
   };
 #endif
 
-#ifdef __USE_GNU
-/* Owner types.  */
-enum __pid_type
-  {
-    F_OWNER_TID = 0,		/* Kernel thread.  */
-    F_OWNER_PID,		/* Process.  */
-    F_OWNER_PGRP,		/* Process group.  */
-    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
-  };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
-struct f_owner_ex
-  {
-    enum __pid_type type;	/* Owner type of ID.  */
-    __pid_t pid;		/* ID of owner.  */
-  };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
-   BSD systems which did not managed to hide these kernel macros.  */
-#ifdef	__USE_BSD
-# define FAPPEND	O_APPEND
-# define FFSYNC		O_FSYNC
-# define FASYNC		O_ASYNC
-# define FNONBLOCK	O_NONBLOCK
-# define FNDELAY	O_NDELAY
-#endif /* Use BSD.  */
-
-/* Advise to `posix_fadvise'.  */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL	0 /* No further special treatment.  */
-# define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
-# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.	 */
-# define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
-# define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
-# define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE.  */
-# define SYNC_FILE_RANGE_WAIT_BEFORE	1 /* Wait upon writeout of all pages
-					     in the range before performing the
-					     write.  */
-# define SYNC_FILE_RANGE_WRITE		2 /* Initiate writeout of all those
-					     dirty pages in the range which are
-					     not presently under writeback.  */
-# define SYNC_FILE_RANGE_WAIT_AFTER	4 /* Wait upon writeout of all pages in
-					     the range after performing the
-					     write.  */
-
-/* Flags for SPLICE and VMSPLICE.  */
-# define SPLICE_F_MOVE		1	/* Move pages instead of copying.  */
-# define SPLICE_F_NONBLOCK	2	/* Don't block on the pipe splicing
-					   (but we may still block on the fd
-					   we splice from/to).  */
-# define SPLICE_F_MORE		4	/* Expect more data.  */
-# define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
-
-
-/* File handle structure.  */
-struct file_handle
-{
-  unsigned int handle_bytes;
-  int handle_type;
-  /* File identifier.  */
-  unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now).  */
-# define MAX_HANDLE_SZ	128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead.  */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-    __THROW;
-
-
-/* Selective file content synch'ing.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
-			    unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
-			 size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
-		       __off64_t *__offout, size_t __len,
-		       unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
-		    unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-#  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
-				   __off64_t __len),
-		       fallocate64);
-#  else
-#   define fallocate fallocate64
-#  endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
-			__off64_t __len);
-# endif
-
-
-/* Map file name to file handle.  */
-extern int name_to_handle_at (int __dfd, const char *__name,
-			      struct file_handle *__handle, int *__mnt_id,
-			      int __flags) __THROW;
-
-/* Open file using the file handle.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
-			      int __flags);
-
-#endif	/* use GNU */
-
-__END_DECLS
+/* Include generic Linux declarations.  */
+#include <bits/fcntl-linux.h>

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h Fri Oct 26 00:01:43 2012
@@ -1,6 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/IA64.
-   Copyright (C) 1999, 2000, 2004, 2006, 2007, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1999-2012 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
@@ -21,131 +20,13 @@
 # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
 #endif
 
-
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
-   located on a few file systems.  */
-#define O_ACCMODE	  0003
-#define O_RDONLY	    00
-#define O_WRONLY	    01
-#define O_RDWR		    02
-#define O_CREAT		  0100	/* not fcntl */
-#define O_EXCL		  0200	/* not fcntl */
-#define O_NOCTTY	  0400	/* not fcntl */
-#define O_TRUNC		 01000	/* not fcntl */
-#define O_APPEND	 02000
-#define O_NONBLOCK	 04000
-#define O_NDELAY	O_NONBLOCK
-#define O_SYNC	      04010000
-#define O_FSYNC		O_SYNC
-#define O_ASYNC		020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY	0200000	/* must be a directory */
-# define O_NOFOLLOW	0400000 /* don't follow links */
-# define O_CLOEXEC	02000000 /* Set close_on_exec.  */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT	040000
-# define O_NOATIME	01000000 /* Do not set atime.  */
-# define O_PATH		010000000 /* Resolve pathname but do not open file.  */
-#endif
-
-#ifdef __USE_LARGEFILE64
 /* Not necessary, files are always with 64bit off_t.  */
-# define O_LARGEFILE	0
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
-   We define the symbols here but let them do the same as O_SYNC since
-   this is a superset.	*/
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC	010000	/* Synchronize data.  */
-# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
-#endif
-
-/* Values for the second argument to `fcntl'.  */
-#define F_DUPFD		0	/* Duplicate file descriptor.  */
-#define F_GETFD		1	/* Get file descriptor flags.  */
-#define F_SETFD		2	/* Set file descriptor flags.  */
-#define F_GETFL		3	/* Get file status flags.  */
-#define F_SETFL		4	/* Set file status flags.  */
-#define F_GETLK		5	/* Get record locking info.  */
-#define F_SETLK		6	/* Set record locking info (non-blocking).  */
-#define F_SETLKW	7	/* Set record locking info (blocking).	*/
+#define __O_LARGEFILE	0
 
 /* Not necessary, we always have 64-bit offsets.  */
 #define F_GETLK64	5	/* Get record locking info.  */
 #define F_SETLK64	6	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	7	/* Set record locking info (blocking).	*/
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN	8	/* Get owner (process receiving SIGIO).  */
-# define F_GETOWN	9	/* Set owner (process receiving SIGIO).  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG	10	/* Set number of signal to be sent.  */
-# define F_GETSIG	11	/* Get number of signal to be sent.  */
-# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
-# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE	1024	/* Set a lease.	 */
-# define F_GETLEASE	1025	/* Enquire what lease is active.  */
-# define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
-# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set.  */
-#endif
-
-/* For F_[GET|SET]FD.  */
-#define FD_CLOEXEC	1	/* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
-#define F_RDLCK		0	/* Read lock.  */
-#define F_WRLCK		1	/* Write lock.	*/
-#define F_UNLCK		2	/* Remove lock.	 */
-
-/* for old implementation of bsd flock () */
-#define F_EXLCK		4	/* or 3 */
-#define F_SHLCK		8	/* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation */
-# define LOCK_SH	1	/* shared lock */
-# define LOCK_EX	2	/* exclusive lock */
-# define LOCK_NB	4	/* or'd with one of the above to prevent
-				   blocking */
-# define LOCK_UN	8	/* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND	32	/* This is a mandatory flock:	*/
-# define LOCK_READ	64	/* ... which allows concurrent read operations.	 */
-# define LOCK_WRITE	128	/* ... which allows concurrent write operations.  */
-# define LOCK_RW	192	/* ... Which allows concurrent read & write operations.	 */
-#endif
-
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY.  */
-# define DN_ACCESS	0x00000001	/* File accessed.  */
-# define DN_MODIFY	0x00000002	/* File modified.  */
-# define DN_CREATE	0x00000004	/* File created.  */
-# define DN_DELETE	0x00000008	/* File removed.  */
-# define DN_RENAME	0x00000010	/* File renamed.  */
-# define DN_ATTRIB	0x00000020	/* File changed attibutes.  */
-# define DN_MULTISHOT	0x80000000	/* Don't remove notifier.  */
-#endif
 
 /* We don't need to support __USE_FILE_OFFSET64.  */
 struct flock
@@ -168,152 +49,5 @@
   };
 #endif
 
-#ifdef __USE_GNU
-/* Owner types.  */
-enum __pid_type
-  {
-    F_OWNER_TID = 0,		/* Kernel thread.  */
-    F_OWNER_PID,		/* Process.  */
-    F_OWNER_PGRP,		/* Process group.  */
-    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
-  };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
-struct f_owner_ex
-  {
-    enum __pid_type type;	/* Owner type of ID.  */
-    __pid_t pid;		/* ID of owner.  */
-  };
-#endif
-
-
-/* Define some more compatibility macros to be backward compatible with
-   BSD systems which did not managed to hide these kernel macros.  */
-#ifdef	__USE_BSD
-# define FAPPEND	O_APPEND
-# define FFSYNC		O_FSYNC
-# define FASYNC		O_ASYNC
-# define FNONBLOCK	O_NONBLOCK
-# define FNDELAY	O_NDELAY
-#endif /* Use BSD.  */
-
-/* Advise to `posix_fadvise'.  */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL	0 /* No further special treatment.  */
-# define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
-# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.	 */
-# define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
-# define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
-# define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE.  */
-# define SYNC_FILE_RANGE_WAIT_BEFORE	1 /* Wait upon writeout of all pages
-					     in the range before performing the
-					     write.  */
-# define SYNC_FILE_RANGE_WRITE		2 /* Initiate writeout of all those
-					     dirty pages in the range which are
-					     not presently under writeback.  */
-# define SYNC_FILE_RANGE_WAIT_AFTER	4 /* Wait upon writeout of all pages in
-					     the range after performing the
-					     write.  */
-
-/* Flags for SPLICE and VMSPLICE.  */
-# define SPLICE_F_MOVE		1	/* Move pages instead of copying.  */
-# define SPLICE_F_NONBLOCK	2	/* Don't block on the pipe splicing
-					   (but we may still block on the fd
-					   we splice from/to).  */
-# define SPLICE_F_MORE		4	/* Expect more data.  */
-# define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
-
-
-/* File handle structure.  */
-struct file_handle
-{
-  unsigned int handle_bytes;
-  int handle_type;
-  /* File identifier.  */
-  unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now).  */
-# define MAX_HANDLE_SZ	128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead.  */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-    __THROW;
-
-
-/* Selective file content synch'ing.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
-			    unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
-			 size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
-		       __off64_t *__offout, size_t __len,
-		       unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
-		    unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-#  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
-				   __off64_t __len),
-		       fallocate64);
-#  else
-#   define fallocate fallocate64
-#  endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
-			__off64_t __len);
-# endif
-
-
-/* Map file name to file handle.  */
-extern int name_to_handle_at (int __dfd, const char *__name,
-			      struct file_handle *__handle, int *__mnt_id,
-			      int __flags) __THROW;
-
-/* Open file using the file handle.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
-			      int __flags);
-
-#endif
-
-__END_DECLS
+/* Include generic Linux declarations.  */
+#include <bits/fcntl-linux.h>

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h Fri Oct 26 00:01:43 2012
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 2000, 2004, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2000-2012 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
@@ -20,133 +20,10 @@
 # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
 #endif
 
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
-   located on a few file systems.  */
-#define O_ACCMODE	   0003
-#define O_RDONLY	     00
-#define O_WRONLY	     01
-#define O_RDWR		     02
-#define O_CREAT		   0100	/* not fcntl */
-#define O_EXCL		   0200	/* not fcntl */
-#define O_NOCTTY	   0400	/* not fcntl */
-#define O_TRUNC		  01000	/* not fcntl */
-#define O_APPEND	  02000
-#define O_NONBLOCK	  04000
-#define O_NDELAY	O_NONBLOCK
-#define O_SYNC	       04010000
-#define O_FSYNC		 O_SYNC
-#define O_ASYNC		 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY	 040000	/* Must be a directory.	 */
-# define O_NOFOLLOW	0100000	/* Do not follow links.	 */
-# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT	0200000	/* Direct disk access.	*/
-# define O_NOATIME     01000000 /* Do not set atime.  */
-# define O_PATH	      010000000 /* Resolve pathname but do not open file.  */
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
-   We define the symbols here but let them do the same as O_SYNC since
-   this is a superset.	*/
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC	010000	/* Synchronize data.  */
-# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE	0400000
-#endif
-
-/* Values for the second argument to `fcntl'.  */
-#define F_DUPFD		0	/* Duplicate file descriptor.  */
-#define F_GETFD		1	/* Get file descriptor flags.  */
-#define F_SETFD		2	/* Set file descriptor flags.  */
-#define F_GETFL		3	/* Get file status flags.  */
-#define F_SETFL		4	/* Set file status flags.  */
-#ifndef __USE_FILE_OFFSET64
-# define F_GETLK	5	/* Get record locking info.  */
-# define F_SETLK	6	/* Set record locking info (non-blocking).  */
-# define F_SETLKW	7	/* Set record locking info (blocking).	*/
-#else
-# define F_GETLK	F_GETLK64  /* Get record locking info.	*/
-# define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
-# define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
-#endif
-#define F_GETLK64	12	/* Get record locking info.  */
-#define F_SETLK64	13	/* Set record locking info (non-blocking).  */
-#define F_SETLKW64	14	/* Set record locking info (blocking).	*/
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
-# define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG	10	/* Set number of signal to be sent.  */
-# define F_GETSIG	11	/* Get number of signal to be sent.  */
-# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
-# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE	1024	/* Set a lease.	 */
-# define F_GETLEASE	1025	/* Enquire what lease is active.  */
-# define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
-# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set.  */
-#endif
-
-/* For F_[GET|SET]FD.  */
-#define FD_CLOEXEC	1	/* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
-#define F_RDLCK		0	/* Read lock.  */
-#define F_WRLCK		1	/* Write lock.	*/
-#define F_UNLCK		2	/* Remove lock.	 */
-
-/* For old implementation of bsd flock().  */
-#define F_EXLCK		4	/* or 3 */
-#define F_SHLCK		8	/* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation.	*/
-# define LOCK_SH	1	/* shared lock */
-# define LOCK_EX	2	/* exclusive lock */
-# define LOCK_NB	4	/* or'd with one of the above to prevent
-				   blocking */
-# define LOCK_UN	8	/* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND	32	/* This is a mandatory flock:	*/
-# define LOCK_READ	64	/* ... which allows concurrent read operations.	 */
-# define LOCK_WRITE	128	/* ... which allows concurrent write operations.  */
-# define LOCK_RW	192	/* ... Which allows concurrent read & write operations.	 */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY.  */
-# define DN_ACCESS	0x00000001	/* File accessed.  */
-# define DN_MODIFY	0x00000002	/* File modified.  */
-# define DN_CREATE	0x00000004	/* File created.  */
-# define DN_DELETE	0x00000008	/* File removed.  */
-# define DN_RENAME	0x00000010	/* File renamed.  */
-# define DN_ATTRIB	0x00000020	/* File changed attibutes.  */
-# define DN_MULTISHOT	0x80000000	/* Don't remove notifier.  */
-#endif
+#define __O_DIRECTORY	 040000	/* Must be a directory.	 */
+#define __O_NOFOLLOW	0100000	/* Do not follow links.	 */
+#define __O_DIRECT	0200000	/* Direct disk access.	*/
+#define __O_LARGEFILE	0400000
 
 struct flock
   {
@@ -173,148 +50,5 @@
   };
 #endif
 
-#ifdef __USE_GNU
-/* Owner types.  */
-enum __pid_type
-  {
-    F_OWNER_TID = 0,		/* Kernel thread.  */
-    F_OWNER_PID,		/* Process.  */
-    F_OWNER_PGRP,		/* Process group.  */
-    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
-  };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
-struct f_owner_ex
-  {
-    enum __pid_type type;	/* Owner type of ID.  */
-    __pid_t pid;		/* ID of owner.  */
-  };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
-   BSD systems which did not managed to hide these kernel macros.  */
-#ifdef	__USE_BSD
-# define FAPPEND	O_APPEND
-# define FFSYNC		O_FSYNC
-# define FASYNC		O_ASYNC
-# define FNONBLOCK	O_NONBLOCK
-# define FNDELAY	O_NDELAY
-#endif /* Use BSD.  */
-
-/* Advise to `posix_fadvise'.  */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL	0 /* No further special treatment.  */
-# define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
-# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.	 */
-# define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
-# define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
-# define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE.  */
-# define SYNC_FILE_RANGE_WAIT_BEFORE	1 /* Wait upon writeout of all pages
-					     in the range before performing the
-					     write.  */
-# define SYNC_FILE_RANGE_WRITE		2 /* Initiate writeout of all those
-					     dirty pages in the range which are
-					     not presently under writeback.  */
-# define SYNC_FILE_RANGE_WAIT_AFTER	4 /* Wait upon writeout of all pages in
-					     the range after performing the
-					     write.  */
-
-/* Flags for SPLICE and VMSPLICE.  */
-# define SPLICE_F_MOVE		1	/* Move pages instead of copying.  */
-# define SPLICE_F_NONBLOCK	2	/* Don't block on the pipe splicing
-					   (but we may still block on the fd
-					   we splice from/to).  */
-# define SPLICE_F_MORE		4	/* Expect more data.  */
-# define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
-
-
-/* File handle structure.  */
-struct file_handle
-{
-  unsigned int handle_bytes;
-  int handle_type;
-  /* File identifier.  */
-  unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now).  */
-# define MAX_HANDLE_SZ	128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead.  */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-    __THROW;
-
-
-/* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
-			    unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
-			 size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
-		       __off64_t *__offout, size_t __len,
-		       unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
-		    unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-#  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
-				   __off64_t __len),
-		       fallocate64);
-#  else
-#   define fallocate fallocate64
-#  endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
-			__off64_t __len);
-# endif
-
-
-/* Map file name to file handle.  */
-extern int name_to_handle_at (int __dfd, const char *__name,
-			      struct file_handle *__handle, int *__mnt_id,
-			      int __flags) __THROW;
-
-/* Open file using the file handle.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
-			      int __flags);
-
-#endif
-
-__END_DECLS
+/* Include generic Linux declarations.  */
+#include <bits/fcntl-linux.h>

Added: fsf/trunk/libc/scripts/cross-test-ssh.sh
==============================================================================
--- fsf/trunk/libc/scripts/cross-test-ssh.sh (added)
+++ fsf/trunk/libc/scripts/cross-test-ssh.sh Fri Oct 26 00:01:43 2012
@@ -1,0 +1,148 @@
+#! /bin/bash
+# Run a testcase on a remote system, via ssh.
+# Copyright (C) 2012 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
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+# usage: cross-test-ssh.sh [--ssh SSH] HOST COMMAND ...
+# Run with --help flag to get more detailed help.
+
+progname="$(basename $0)"
+env_blacklist='HOME LOGNAME MAIL PATH SHELL SHLVL SSH_CLIENT SSH_CONNECTION
+USER TERM TERMCAP PWD'
+
+usage="usage: ${progname} [--ssh SSH] HOST COMMAND ..."
+help="Run a glibc test COMMAND on the remote machine HOST, via ssh,
+passing environment variables, preserving the current working directory,
+and respecting quoting.
+
+If the '--ssh SSH' flag is present, use SSH as the SSH command,
+instead of ordinary 'ssh'.
+
+To use this to run glibc tests, invoke the tests as follows:
+
+  $ make test-wrapper='ABSPATH/cross-test-ssh.sh HOST' tests
+
+where ABSPATH is the absolute path to this script, and HOST is the
+name of the machine to connect to via ssh.
+
+If you need to connect to the test machine as a different user, you
+may specify that just as you would to SSH:
+
+  $ make test-wrapper='ABSPATH/cross-test-ssh.sh USER@HOST' tests
+
+Naturally, the remote user must have an appropriate public key, and
+you will want to ensure that SSH does not prompt interactively for a
+password on each connection.
+
+HOST and the build machines (on which 'make check' is being run) must
+share a filesystem; all files needed by the tests must be visible at
+the same paths on both machines.
+
+${progname} runs COMMAND in the same directory on the HOST that
+${progname} itself is run in on the build machine.
+
+The command and arguments are passed to the remote host in a way that
+avoids any further shell substitution or expansion, on the assumption
+that the shell on the build machine has already done them
+appropriately.
+
+${progname} propagates the values all environment variables through to
+the remote target, except the following:
+${env_blacklist}"
+
+ssh='ssh'
+while [ $# -gt 0 ]; do
+  case "$1" in
+
+    "--ssh")
+      shift
+      if [ $# -lt 1 ]; then
+        break
+      fi
+      ssh="$1"
+      ;;
+
+    "--help")
+      echo "$usage"
+      echo "$help"
+      exit 0
+      ;;
+
+    *)
+      break
+      ;;
+  esac
+  shift
+done
+
+if [ $# -lt 1 ]; then
+  echo "$usage" >&2
+  echo "Type '${progname} --help' for more detailed help." >&2
+  exit 1
+fi
+
+host="$1"; shift
+
+# Print the sequence of arguments as strings properly quoted for the
+# Bourne shell, separated by spaces.
+bourne_quote ()
+{
+  local arg qarg
+  for arg in "$@"; do
+    qarg=${arg//\'/\'\\\'\'}
+    echo -n "'$qarg' "
+  done
+}
+
+# Remove unnecessary newlines from a Bourne shell command sequence.
+remove_newlines ()
+{
+  sed -n \
+    -e '1h' \
+    -e '2,$H' \
+    -e '${g
+          s/\([^\]\)\n/\1; /g
+          p
+         }'
+}
+
+# Unset all variables from the blacklist.  Then echo all exported
+# variables.  The 'export -p' command adds backslashes for environment
+# variables which contain newlines.
+blacklist_exports ()
+{
+  (unset ${env_blacklist}; export -p) | remove_newlines
+}
+
+# Produce properly quoted Bourne shell arguments for 'env' to carry
+# over the current environment, less blacklisted variables.
+exports="$(blacklist_exports)"
+exports="${exports:+${exports}; }"
+
+# Transform the current argument list into a properly quoted Bourne shell
+# command string.
+command="$(bourne_quote "$@")"
+
+# Add commands to set environment variables and the current directory.
+command="${exports}cd $PWD; ${command}"
+
+# HOST's sshd simply concatenates its arguments with spaces and
+# passes them to some shell.  We want to force the use of /bin/sh,
+# so we need to re-quote the whole command to ensure it appears as
+# the sole argument of the '-c' option.
+full_command="$(bourne_quote "${command}")"
+$ssh "$host" /bin/sh -c "$full_command"

Propchange: fsf/trunk/libc/scripts/cross-test-ssh.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: fsf/trunk/libc/sysdeps/mach/hurd/ptrace.c
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/ptrace.c (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/ptrace.c Fri Oct 26 00:01:43 2012
@@ -160,7 +160,7 @@
     case PTRACE_SINGLESTEP:
       /* This is a machine-dependent kernel RPC on
 	 machines that support it.  Punt.  */
-      return EOPNOTSUPP;
+      return __hurd_fail (EOPNOTSUPP);
 
     case PTRACE_ATTACH:
     case PTRACE_DETACH:
@@ -227,7 +227,7 @@
     case PTRACE_PEEKUSER:
     case PTRACE_POKEUSER:
       /* U area, what's that?  */
-      return EOPNOTSUPP;
+      return __hurd_fail (EOPNOTSUPP);
 
     case PTRACE_GETREGS:
     case PTRACE_SETREGS:
@@ -248,7 +248,7 @@
       return get_regs (MACHINE_THREAD_FLOAT_STATE_FLAVOR,
 		       MACHINE_THREAD_FLOAT_STATE_COUNT);
 #else
-      return EOPNOTSUPP;
+      return __hurd_fail (EOPNOTSUPP);
 #endif
 
     case PTRACE_GETFPAREGS:
@@ -261,7 +261,7 @@
       return get_regs (MACHINE_THREAD_FPA_STATE_FLAVOR,
 		       MACHINE_THREAD_FPA_STATE_COUNT);
 #else
-      return EOPNOTSUPP;
+      return __hurd_fail (EOPNOTSUPP);
 #endif
 
     case PTRACE_POKETEXT:

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c Fri Oct 26 00:01:43 2012
@@ -1,0 +1,1 @@
+#include <sparc64/multiarch/ifunc-impl-list.c>

Added: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c Fri Oct 26 00:01:43 2012
@@ -1,0 +1,75 @@
+/* Enumerate available IFUNC implementations of a function.  sparc version.
+   Copyright (C) 2012 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <assert.h>
+#include <string.h>
+#include <wchar.h>
+#include <ldsodefs.h>
+#include <sysdep.h>
+#include <ifunc-impl-list.h>
+
+/* Fill ARRAY of MAX elements with IFUNC implementations for function
+   NAME and return the number of valid entries.  */
+
+size_t
+__libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
+			size_t max)
+{
+  size_t i = 0;
+  int hwcap;
+
+  hwcap = GLRO(dl_hwcap);
+
+  IFUNC_IMPL (i, name, memcpy,
+	      IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_SPARC_CRYPTO,
+			      __memcpy_niagara4)
+	      IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_SPARC_N2,
+			      __memcpy_niagara2)
+	      IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_SPARC_BLKINIT,
+			      __memcpy_niagara1)
+	      IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_SPARC_ULTRA3,
+			      __memcpy_ultra3)
+	      IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_ultra1));
+
+  IFUNC_IMPL (i, name, mempcpy,
+	      IFUNC_IMPL_ADD (array, i, mempcpy, hwcap & HWCAP_SPARC_CRYPTO,
+			      __mempcpy_niagara4)
+	      IFUNC_IMPL_ADD (array, i, mempcpy, hwcap & HWCAP_SPARC_N2,
+			      __mempcpy_niagara2)
+	      IFUNC_IMPL_ADD (array, i, mempcpy, hwcap & HWCAP_SPARC_BLKINIT,
+			      __mempcpy_niagara1)
+	      IFUNC_IMPL_ADD (array, i, mempcpy, hwcap & HWCAP_SPARC_ULTRA3,
+			      __mempcpy_ultra3)
+	      IFUNC_IMPL_ADD (array, i, mempcpy, 1, __mempcpy_ultra1));
+
+  IFUNC_IMPL (i, name, bzero,
+	      IFUNC_IMPL_ADD (array, i, bzero, hwcap & HWCAP_SPARC_CRYPTO,
+			      __bzero_niagara4)
+	      IFUNC_IMPL_ADD (array, i, bzero, hwcap & HWCAP_SPARC_BLKINIT,
+			      __bzero_niagara1)
+	      IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ultra1));
+
+  IFUNC_IMPL (i, name, memset,
+	      IFUNC_IMPL_ADD (array, i, memset, hwcap & HWCAP_SPARC_CRYPTO,
+			      __memset_niagara4)
+	      IFUNC_IMPL_ADD (array, i, memset, hwcap & HWCAP_SPARC_BLKINIT,
+			      __memset_niagara1)
+	      IFUNC_IMPL_ADD (array, i, memset, 1, __memset_ultra1));
+
+  return i;
+}

Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S Fri Oct 26 00:01:43 2012
@@ -1,4 +1,5 @@
 /* Multiple versions of memcpy
+   All versions must be listed in ifunc-impl-list.c.
    Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
    Contributed by David S. Miller (davem@xxxxxxxxxxxxx)
    This file is part of the GNU C Library.

Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S Fri Oct 26 00:01:43 2012
@@ -1,4 +1,5 @@
 /* Multiple versions of memset and bzero
+   All versions must be listed in ifunc-impl-list.c.
    Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
    Contributed by David S. Miller (davem@xxxxxxxxxxxxx)
    This file is part of the GNU C Library.

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c Fri Oct 26 00:01:43 2012
@@ -91,11 +91,9 @@
     {
       unsigned long int buf[4096 / sizeof (unsigned long int)];
       struct dirent *dirp = (struct dirent *) buf;
-      off_t dbase = (off_t) 0;
       ssize_t len;
 
-      while ((len = __getdirentries (obp_fd, (char *) dirp,
-                                     sizeof (buf), &dbase)) > 0)
+      while ((len = __getdents (obp_fd, (char *) dirp, sizeof (buf))) > 0)
 	{
 	  struct dirent *this_dirp = dirp;
 
@@ -131,7 +129,7 @@
 			  if (read (clkfreq_fd, type_string,
 				    sizeof (type_string)) > 0)
 			    result = (hp_timing_t)
-			      strtoull (type_string, NULL, 16);
+			      strtoumax (type_string, NULL, 16);
 			  close (clkfreq_fd);
 			}
 		    }

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits