summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-05-03 12:49:10 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-05-03 12:49:10 +0000
commit7145fac593684e0df4113ff20c4436a6e5ae467b (patch)
tree0b3bb7c867bf9391e1f78ca1a06834236a0c252e /libc
parent8b6643eeb2b42676b295575d0caa59300fefd3ad (diff)
- implement splice,vmsplice,tee for all arches
- synch F_LINUX_SPECIFIC_BASE related fcntls for all arches
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/alpha/bits/fcntl.h39
-rw-r--r--libc/sysdeps/linux/arm/bits/fcntl.h9
-rw-r--r--libc/sysdeps/linux/bfin/bits/fcntl.h33
-rw-r--r--libc/sysdeps/linux/cris/bits/fcntl.h33
-rw-r--r--libc/sysdeps/linux/e1/bits/fcntl.h57
-rw-r--r--libc/sysdeps/linux/frv/bits/fcntl.h63
-rw-r--r--libc/sysdeps/linux/h8300/bits/fcntl.h57
-rw-r--r--libc/sysdeps/linux/hppa/bits/fcntl.h29
-rw-r--r--libc/sysdeps/linux/i386/bits/fcntl.h7
-rw-r--r--libc/sysdeps/linux/i960/bits/fcntl.h57
-rw-r--r--libc/sysdeps/linux/ia64/bits/fcntl.h41
-rw-r--r--libc/sysdeps/linux/m68k/bits/fcntl.h33
-rw-r--r--libc/sysdeps/linux/microblaze/bits/fcntl.h57
-rw-r--r--libc/sysdeps/linux/mips/bits/fcntl.h23
-rw-r--r--libc/sysdeps/linux/nios/bits/fcntl.h33
-rw-r--r--libc/sysdeps/linux/nios2/bits/fcntl.h33
-rw-r--r--libc/sysdeps/linux/powerpc/bits/fcntl.h39
-rw-r--r--libc/sysdeps/linux/sh/bits/fcntl.h39
-rw-r--r--libc/sysdeps/linux/sh64/bits/fcntl.h63
-rw-r--r--libc/sysdeps/linux/sparc/bits/fcntl.h39
-rw-r--r--libc/sysdeps/linux/v850/bits/fcntl.h57
-rw-r--r--libc/sysdeps/linux/vax/bits/fcntl.h39
-rw-r--r--libc/sysdeps/linux/x86_64/bits/fcntl.h39
-rw-r--r--libc/sysdeps/linux/xtensa/bits/fcntl.h45
24 files changed, 806 insertions, 158 deletions
diff --git a/libc/sysdeps/linux/alpha/bits/fcntl.h b/libc/sysdeps/linux/alpha/bits/fcntl.h
index 9fa9c5a0b..dadde38d7 100644
--- a/libc/sysdeps/linux/alpha/bits/fcntl.h
+++ b/libc/sysdeps/linux/alpha/bits/fcntl.h
@@ -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
@@ -92,9 +95,11 @@
# 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
+
diff --git a/libc/sysdeps/linux/arm/bits/fcntl.h b/libc/sysdeps/linux/arm/bits/fcntl.h
index ad05b533f..3ea24c593 100644
--- a/libc/sysdeps/linux/arm/bits/fcntl.h
+++ b/libc/sysdeps/linux/arm/bits/fcntl.h
@@ -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.
@@ -99,7 +101,7 @@
# 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
+
diff --git a/libc/sysdeps/linux/bfin/bits/fcntl.h b/libc/sysdeps/linux/bfin/bits/fcntl.h
index 544e2145b..fcace52a8 100644
--- a/libc/sysdeps/linux/bfin/bits/fcntl.h
+++ b/libc/sysdeps/linux/bfin/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/cris/bits/fcntl.h b/libc/sysdeps/linux/cris/bits/fcntl.h
index 87e943f78..a107d70fb 100644
--- a/libc/sysdeps/linux/cris/bits/fcntl.h
+++ b/libc/sysdeps/linux/cris/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/e1/bits/fcntl.h b/libc/sysdeps/linux/e1/bits/fcntl.h
index 4b41b4715..d41d353b1 100644
--- a/libc/sysdeps/linux/e1/bits/fcntl.h
+++ b/libc/sysdeps/linux/e1/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/frv/bits/fcntl.h b/libc/sysdeps/linux/frv/bits/fcntl.h
index 69a20966d..02051f179 100644
--- a/libc/sysdeps/linux/frv/bits/fcntl.h
+++ b/libc/sysdeps/linux/frv/bits/fcntl.h
@@ -89,6 +89,14 @@
# 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
+
diff --git a/libc/sysdeps/linux/h8300/bits/fcntl.h b/libc/sysdeps/linux/h8300/bits/fcntl.h
index 4b41b4715..d41d353b1 100644
--- a/libc/sysdeps/linux/h8300/bits/fcntl.h
+++ b/libc/sysdeps/linux/h8300/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/hppa/bits/fcntl.h b/libc/sysdeps/linux/hppa/bits/fcntl.h
index 28600b580..e3e8559fe 100644
--- a/libc/sysdeps/linux/hppa/bits/fcntl.h
+++ b/libc/sysdeps/linux/hppa/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/i386/bits/fcntl.h b/libc/sysdeps/linux/i386/bits/fcntl.h
index c5cc8b2bd..ad1338bfa 100644
--- a/libc/sysdeps/linux/i386/bits/fcntl.h
+++ b/libc/sysdeps/linux/i386/bits/fcntl.h
@@ -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.
@@ -99,7 +101,7 @@
# 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
+
diff --git a/libc/sysdeps/linux/i960/bits/fcntl.h b/libc/sysdeps/linux/i960/bits/fcntl.h
index 7cce16904..ae5fd20cb 100644
--- a/libc/sysdeps/linux/i960/bits/fcntl.h
+++ b/libc/sysdeps/linux/i960/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/ia64/bits/fcntl.h b/libc/sysdeps/linux/ia64/bits/fcntl.h
index e7e7c3039..33bae94c1 100644
--- a/libc/sysdeps/linux/ia64/bits/fcntl.h
+++ b/libc/sysdeps/linux/ia64/bits/fcntl.h
@@ -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
@@ -43,12 +43,15 @@
#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
@@ -93,9 +96,11 @@
# 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
+
diff --git a/libc/sysdeps/linux/m68k/bits/fcntl.h b/libc/sysdeps/linux/m68k/bits/fcntl.h
index 85cc59188..0f535cfc0 100644
--- a/libc/sysdeps/linux/m68k/bits/fcntl.h
+++ b/libc/sysdeps/linux/m68k/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/microblaze/bits/fcntl.h b/libc/sysdeps/linux/microblaze/bits/fcntl.h
index 4b41b4715..d41d353b1 100644
--- a/libc/sysdeps/linux/microblaze/bits/fcntl.h
+++ b/libc/sysdeps/linux/microblaze/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/mips/bits/fcntl.h b/libc/sysdeps/linux/mips/bits/fcntl.h
index 08c868696..e81c59e4f 100644
--- a/libc/sysdeps/linux/mips/bits/fcntl.h
+++ b/libc/sysdeps/linux/mips/bits/fcntl.h
@@ -109,6 +109,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. */
@@ -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
+
diff --git a/libc/sysdeps/linux/nios/bits/fcntl.h b/libc/sysdeps/linux/nios/bits/fcntl.h
index 1d7df4c81..62e1fd1b3 100644
--- a/libc/sysdeps/linux/nios/bits/fcntl.h
+++ b/libc/sysdeps/linux/nios/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/nios2/bits/fcntl.h b/libc/sysdeps/linux/nios2/bits/fcntl.h
index 544e2145b..fcace52a8 100644
--- a/libc/sysdeps/linux/nios2/bits/fcntl.h
+++ b/libc/sysdeps/linux/nios2/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/powerpc/bits/fcntl.h b/libc/sysdeps/linux/powerpc/bits/fcntl.h
index 3dec6923c..680ee7705 100644
--- a/libc/sysdeps/linux/powerpc/bits/fcntl.h
+++ b/libc/sysdeps/linux/powerpc/bits/fcntl.h
@@ -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
@@ -97,9 +100,11 @@
# 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
+
diff --git a/libc/sysdeps/linux/sh/bits/fcntl.h b/libc/sysdeps/linux/sh/bits/fcntl.h
index 10286a88d..81a78c6f5 100644
--- a/libc/sysdeps/linux/sh/bits/fcntl.h
+++ b/libc/sysdeps/linux/sh/bits/fcntl.h
@@ -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.
@@ -97,9 +100,11 @@
# 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
+
diff --git a/libc/sysdeps/linux/sh64/bits/fcntl.h b/libc/sysdeps/linux/sh64/bits/fcntl.h
index 69a20966d..02051f179 100644
--- a/libc/sysdeps/linux/sh64/bits/fcntl.h
+++ b/libc/sysdeps/linux/sh64/bits/fcntl.h
@@ -89,6 +89,14 @@
# 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
+
diff --git a/libc/sysdeps/linux/sparc/bits/fcntl.h b/libc/sysdeps/linux/sparc/bits/fcntl.h
index cb4e6a8c8..93dafdb80 100644
--- a/libc/sysdeps/linux/sparc/bits/fcntl.h
+++ b/libc/sysdeps/linux/sparc/bits/fcntl.h
@@ -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
@@ -104,6 +107,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
#if __WORDSIZE == 64
@@ -116,7 +121,7 @@
# 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
+
diff --git a/libc/sysdeps/linux/v850/bits/fcntl.h b/libc/sysdeps/linux/v850/bits/fcntl.h
index 4b41b4715..d41d353b1 100644
--- a/libc/sysdeps/linux/v850/bits/fcntl.h
+++ b/libc/sysdeps/linux/v850/bits/fcntl.h
@@ -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
+
diff --git a/libc/sysdeps/linux/vax/bits/fcntl.h b/libc/sysdeps/linux/vax/bits/fcntl.h
index fb72b21fa..90aea201e 100644
--- a/libc/sysdeps/linux/vax/bits/fcntl.h
+++ b/libc/sysdeps/linux/vax/bits/fcntl.h
@@ -87,6 +87,14 @@
# 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
+
diff --git a/libc/sysdeps/linux/x86_64/bits/fcntl.h b/libc/sysdeps/linux/x86_64/bits/fcntl.h
index 7114eb87e..6f9710d06 100644
--- a/libc/sysdeps/linux/x86_64/bits/fcntl.h
+++ b/libc/sysdeps/linux/x86_64/bits/fcntl.h
@@ -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.
@@ -111,9 +114,11 @@
# 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
+
diff --git a/libc/sysdeps/linux/xtensa/bits/fcntl.h b/libc/sysdeps/linux/xtensa/bits/fcntl.h
index 2c4e2f01b..3e4931db5 100644
--- a/libc/sysdeps/linux/xtensa/bits/fcntl.h
+++ b/libc/sysdeps/linux/xtensa/bits/fcntl.h
@@ -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
+