OSDN Git Service

- implement splice,vmsplice,tee for all arches
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 3 May 2008 12:49:10 +0000 (12:49 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 3 May 2008 12:49:10 +0000 (12:49 -0000)
- synch F_LINUX_SPECIFIC_BASE related fcntls for all arches

24 files changed:
libc/sysdeps/linux/alpha/bits/fcntl.h
libc/sysdeps/linux/arm/bits/fcntl.h
libc/sysdeps/linux/bfin/bits/fcntl.h
libc/sysdeps/linux/cris/bits/fcntl.h
libc/sysdeps/linux/e1/bits/fcntl.h
libc/sysdeps/linux/frv/bits/fcntl.h
libc/sysdeps/linux/h8300/bits/fcntl.h
libc/sysdeps/linux/hppa/bits/fcntl.h
libc/sysdeps/linux/i386/bits/fcntl.h
libc/sysdeps/linux/i960/bits/fcntl.h
libc/sysdeps/linux/ia64/bits/fcntl.h
libc/sysdeps/linux/m68k/bits/fcntl.h
libc/sysdeps/linux/microblaze/bits/fcntl.h
libc/sysdeps/linux/mips/bits/fcntl.h
libc/sysdeps/linux/nios/bits/fcntl.h
libc/sysdeps/linux/nios2/bits/fcntl.h
libc/sysdeps/linux/powerpc/bits/fcntl.h
libc/sysdeps/linux/sh/bits/fcntl.h
libc/sysdeps/linux/sh64/bits/fcntl.h
libc/sysdeps/linux/sparc/bits/fcntl.h
libc/sysdeps/linux/v850/bits/fcntl.h
libc/sysdeps/linux/vax/bits/fcntl.h
libc/sysdeps/linux/x86_64/bits/fcntl.h
libc/sysdeps/linux/xtensa/bits/fcntl.h

index 9fa9c5a..dadde38 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995-2000, 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1995-2000,2004,2005,2006,2007 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
@@ -50,6 +50,9 @@
 # define O_NOFOLLOW    0200000 /* Do not follow links.  */
 # define O_DIRECT      02000000 /* Direct disk access.  */
 # define O_NOATIME     04000000 /* Do not set atime.  */
+# if 0
+# define O_CLOEXEC      010000000 /* Set close_on_exec.  */
+# endif
 #endif
 
 #ifdef __USE_LARGEFILE64
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
-/* for F_[GET|SET]FL */
+/* 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() */
@@ -177,6 +182,8 @@ struct flock64
 
 
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -188,6 +195,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -201,21 +217,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index ad05b53..3ea24c5 100644 (file)
@@ -50,7 +50,9 @@
 # define O_NOFOLLOW    0100000 /* Do not follow links.  */
 # define O_DIRECT      0200000 /* Direct disk access.  */
 # define O_NOATIME     01000000 /* Do not set atime.  */
+# if 0
 # define O_CLOEXEC     02000000 /* Set close_on_exec.  */
+# endif
 #endif
 
 /* For now Linux has synchronisity options for data and read operations.
 # define F_GETLEASE    1025    /* Enquire what lease is active.  */
 # define F_NOTIFY      1026    /* Request notfications on a directory.  */
 # define F_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
-                                  close-on-exit set.  */
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FD.  */
@@ -188,6 +190,7 @@ struct flock64
 
 
 #ifdef __USE_GNU
+#if 0
 /* Flags for SYNC_FILE_RANGE.  */
 # define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
                                             in the range before performing the
@@ -198,6 +201,7 @@ struct flock64
 # define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
                                             the range after performing the
                                             write.  */
+#endif
 
 /* Flags for SPLICE and VMSPLICE.  */
 # define SPLICE_F_MOVE         1       /* Move pages instead of copying.  */
@@ -235,6 +239,5 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
 extern ssize_t tee (int __fdin, int __fdout, size_t __len,
                    unsigned int __flags);
 
-#endif
-
 __END_DECLS
+
index 544e214..fcace52 100644 (file)
@@ -96,6 +96,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -182,7 +184,10 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -194,6 +199,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -207,21 +221,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 87e943f..a107d70 100644 (file)
@@ -97,6 +97,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -183,7 +185,10 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -195,6 +200,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -208,21 +222,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 4b41b47..d41d353 100644 (file)
@@ -93,6 +93,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -178,3 +180,58 @@ struct flock64
 # define POSIX_FADV_DONTNEED   4 /* Don't need these pages.  */
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
+
+
+#ifdef __USE_GNU
+#if 0
+/* 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.  */
+#endif
+
+/* 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.  */
+#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;
+
+
+#if 0
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+#endif
+
+/* Splice address range into a pipe.  */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
+
+/* Splice two files together.  */
+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.  */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
+
+__END_DECLS
+
index 69a2096..02051f1 100644 (file)
 # define F_GETSIG      11      /* Get number of signal to be sent.  */
 #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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
+#endif
+
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC     1       /* actually anything with low bit set goes */
 
@@ -154,3 +162,58 @@ struct flock64
 # define POSIX_FADV_DONTNEED   4 /* Don't need these pages.  */
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
+
+
+#ifdef __USE_GNU
+#if 0
+/* 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.  */
+#endif
+
+/* 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.  */
+#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;
+
+
+#if 0
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+#endif
+
+/* Splice address range into a pipe.  */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
+
+/* Splice two files together.  */
+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.  */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
+
+__END_DECLS
+
index 4b41b47..d41d353 100644 (file)
@@ -93,6 +93,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -178,3 +180,58 @@ struct flock64
 # define POSIX_FADV_DONTNEED   4 /* Don't need these pages.  */
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
+
+
+#ifdef __USE_GNU
+#if 0
+/* 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.  */
+#endif
+
+/* 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.  */
+#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;
+
+
+#if 0
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+#endif
+
+/* Splice address range into a pipe.  */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
+
+/* Splice two files together.  */
+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.  */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
+
+__END_DECLS
+
index 28600b5..e3e8559 100644 (file)
@@ -69,7 +69,7 @@
 #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_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.  */
@@ -94,6 +94,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* for F_[GET|SET]FL */
@@ -173,7 +175,10 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -183,6 +188,7 @@ struct flock64
 # define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
                                             the range after performing the
                                             write.  */
+#endif
 
 /* Flags for SPLICE and VMSPLICE.  */
 # define SPLICE_F_MOVE         1       /* Move pages instead of copying.  */
@@ -201,24 +207,25 @@ __BEGIN_DECLS
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
 #if 0
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-    
-#endif
-    
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
+
 __END_DECLS
+
index c5cc8b2..ad1338b 100644 (file)
@@ -50,7 +50,9 @@
 # define O_DIRECTORY   0200000 /* Must be a directory.  */
 # define O_NOFOLLOW    0400000 /* Do not follow links.  */
 # define O_NOATIME     01000000 /* Do not set atime.  */
+# if 0
 # define O_CLOEXEC     02000000 /* Set close_on_exec.  */
+# endif
 #endif
 
 /* For now Linux has synchronisity options for data and read operations.
 # define F_GETLEASE    1025    /* Enquire what lease is active.  */
 # define F_NOTIFY      1026    /* Request notfications on a directory.  */
 # define F_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
-                                  close-on-exit set.  */
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FD.  */
@@ -188,6 +190,7 @@ struct flock64
 
 
 #ifdef __USE_GNU
+#if 0
 /* Flags for SYNC_FILE_RANGE.  */
 # define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
                                             in the range before performing the
@@ -198,6 +201,7 @@ struct flock64
 # define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
                                             the range after performing the
                                             write.  */
+#endif
 
 /* Flags for SPLICE and VMSPLICE.  */
 # define SPLICE_F_MOVE         1       /* Move pages instead of copying.  */
@@ -239,3 +243,4 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
 #endif
 
 __END_DECLS
+
index 7cce169..ae5fd20 100644 (file)
@@ -93,6 +93,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -178,3 +180,58 @@ struct flock64
 # define POSIX_FADV_DONTNEED   4 /* Don't need these pages.  */
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
+
+
+#ifdef __USE_GNU
+#if 0
+/* 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.  */
+#endif
+
+/* 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.  */
+#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;
+
+
+#if 0
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+#endif
+
+/* Splice address range into a pipe.  */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
+
+/* Splice two files together.  */
+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.  */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
+
+__END_DECLS
+
index e7e7c30..33bae94 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/IA64.
-   Copyright (C) 1999, 2000, 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2004, 2006, 2007 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
 #define O_SYNC         010000
 #define O_FSYNC                O_SYNC
 #define O_ASYNC                020000
-#define O_DIRECT       040000
 
 #ifdef __USE_GNU
+# define O_DIRECT      040000
 # define O_DIRECTORY   0200000 /* must be a directory */
 # define O_NOFOLLOW    0400000 /* don't follow links */
 # define O_NOATIME     01000000 /* Do not set atime.  */
+# if 0
+# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
+# endif
 #endif
 
 #ifdef __USE_LARGEFILE64
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
-/* For F_[GET|SET]FL.  */
+/* 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().  */
@@ -179,6 +184,8 @@ struct flock64
 
 
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -190,6 +197,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -203,21 +219,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 85cc591..0f535cf 100644 (file)
@@ -96,6 +96,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -182,7 +184,10 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -194,6 +199,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -207,21 +221,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 4b41b47..d41d353 100644 (file)
@@ -93,6 +93,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -178,3 +180,58 @@ struct flock64
 # define POSIX_FADV_DONTNEED   4 /* Don't need these pages.  */
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
+
+
+#ifdef __USE_GNU
+#if 0
+/* 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.  */
+#endif
+
+/* 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.  */
+#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;
+
+
+#if 0
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+#endif
+
+/* Splice address range into a pipe.  */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
+
+/* Splice two files together.  */
+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.  */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
+
+__END_DECLS
+
index 08c8686..e81c59e 100644 (file)
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -208,6 +210,7 @@ struct flock64
 
 
 #ifdef __USE_GNU
+#if 0
 /* Flags for SYNC_FILE_RANGE.  */
 # define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
                                             in the range before performing the
@@ -218,6 +221,7 @@ struct flock64
 # define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
                                             the range after performing the
                                             write.  */
+#endif
 
 /* Flags for SPLICE and VMSPLICE.  */
 # define SPLICE_F_MOVE         1       /* Move pages instead of copying.  */
@@ -241,21 +245,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 1d7df4c..62e1fd1 100644 (file)
@@ -96,6 +96,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -182,7 +184,10 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -194,6 +199,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -207,21 +221,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 544e214..fcace52 100644 (file)
@@ -96,6 +96,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -182,7 +184,10 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -194,6 +199,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -207,21 +221,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 3dec692..680ee77 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/PowerPC.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2007
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -50,6 +50,9 @@
 # define O_DIRECTORY    040000 /* Must be a directory.  */
 # define O_NOFOLLOW    0100000 /* Do not follow links.  */
 # define O_NOATIME     01000000 /* Do not set atime.  */
+# if 0
+# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
+# endif
 #endif
 
 #ifdef __USE_LARGEFILE64
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
-/* For F_[GET|SET]FL.  */
+/* 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().  */
@@ -185,6 +190,8 @@ struct flock64
 
 
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -196,6 +203,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -209,21 +225,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 10286a8..81a78c6 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004, 2006
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004, 2006, 2007
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -50,6 +50,9 @@
 # define O_DIRECTORY   0200000 /* Must be a directory.  */
 # define O_NOFOLLOW    0400000 /* Do not follow links.  */
 # define O_NOATIME     01000000 /* Do not set atime.  */
+# if 0
+# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
+# endif
 #endif
 
 /* For now Linux has synchronisity options for data and read operations.
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
-/* For F_[GET|SET]FL.  */
+/* 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().  */
@@ -185,6 +190,8 @@ struct flock64
 
 
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -196,6 +203,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -209,21 +225,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 69a2096..02051f1 100644 (file)
 # define F_GETSIG      11      /* Get number of signal to be sent.  */
 #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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
+#endif
+
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC     1       /* actually anything with low bit set goes */
 
@@ -154,3 +162,58 @@ struct flock64
 # define POSIX_FADV_DONTNEED   4 /* Don't need these pages.  */
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
+
+
+#ifdef __USE_GNU
+#if 0
+/* 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.  */
+#endif
+
+/* 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.  */
+#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;
+
+
+#if 0
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+#endif
+
+/* Splice address range into a pipe.  */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
+
+/* Splice two files together.  */
+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.  */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
+
+__END_DECLS
+
index cb4e6a8..93dafdb 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/SPARC.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2007
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -49,6 +49,9 @@
 # define O_NOFOLLOW    0x20000 /* don't follow links */
 # define O_DIRECT      0x100000 /* direct disk access hint */
 # define O_NOATIME     0x200000 /* Do not set atime.  */
+# if 0
+# define O_CLOEXEC     0x400000 /* Set close_on_exit.  */
+# endif
 #endif
 
 #ifdef __USE_LARGEFILE64
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 #if __WORDSIZE == 64
 # define F_SETLKW64    14      /* Set record locking info (blocking).  */
 #endif
 
-/* for F_[GET|SET]FL */
+/* 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().  */
@@ -204,6 +209,8 @@ struct flock64
 
 
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -215,6 +222,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -228,21 +244,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 4b41b47..d41d353 100644 (file)
@@ -93,6 +93,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FL.  */
@@ -178,3 +180,58 @@ struct flock64
 # define POSIX_FADV_DONTNEED   4 /* Don't need these pages.  */
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
+
+
+#ifdef __USE_GNU
+#if 0
+/* 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.  */
+#endif
+
+/* 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.  */
+#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;
+
+
+#if 0
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+#endif
+
+/* Splice address range into a pipe.  */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
+
+/* Splice two files together.  */
+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.  */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
+
+__END_DECLS
+
index fb72b21..90aea20 100644 (file)
 # define F_GETSIG      11      /* Get number of signal to be sent.  */
 #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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
+#endif
+
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC     1       /* actually anything with low bit set goes */
 
@@ -153,7 +161,10 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -165,6 +176,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -178,21 +198,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 7114eb8..6f9710d 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/x86-64.
-   Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2004, 2006, 2007 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
@@ -50,6 +50,9 @@
 # define O_DIRECTORY   0200000 /* Must be a directory.  */
 # define O_NOFOLLOW    0400000 /* Do not follow links.  */
 # define O_NOATIME     01000000 /* Do not set atime.  */
+# if 0
+# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
+# endif
 #endif
 
 /* For now Linux has synchronisity options for data and read operations.
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
-/* For F_[GET|SET]FL.  */
+/* 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().  */
@@ -199,6 +204,8 @@ struct flock64
 
 
 #ifdef __USE_GNU
+#if 0
+/* 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.  */
@@ -210,6 +217,15 @@ struct flock64
                                             write.  */
 #endif
 
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -223,21 +239,20 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
 /* Selective file content synch'ing.  */
 extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
                            unsigned int __flags);
-
+#endif
 
 /* Splice address range into a pipe.  */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
-                    unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
 
 /* Splice two files together.  */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __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.  */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
-    __THROW;
-#endif
-
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
 
 __END_DECLS
+
index 2c4e2f0..3e4931d 100644 (file)
@@ -97,6 +97,8 @@
 # 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_DUPFD_CLOEXEC 1030  /* Duplicate file descriptor with
+                                  close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FD.  */
@@ -183,6 +185,30 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
+#ifdef __USE_GNU
+#if 0
+/* 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.  */
+#endif
+
+/* 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.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU
@@ -191,6 +217,25 @@ __BEGIN_DECLS
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
+#if 0
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
 #endif
 
+/* Splice address range into a pipe.  */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+                        size_t __count, unsigned int __flags);
+
+/* Splice two files together.  */
+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.  */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+                   unsigned int __flags);
+
 __END_DECLS
+