svn commit: trunk/uClibc/libc/sysdeps/linux/common
Peter S. Mazinger
ps.m at gmx.net
Thu Aug 24 20:07:18 UTC 2006
On Thu, 24 Aug 2006, Peter S. Mazinger wrote:
> On Thu, 24 Aug 2006 vapier at uclibc.org wrote:
>
> > Author: vapier
> > Date: 2006-08-24 12:13:14 -0700 (Thu, 24 Aug 2006)
> > New Revision: 15978
> >
> > Log:
> > implement readahead()
> >
> > Added:
> > trunk/uClibc/libc/sysdeps/linux/common/readahead.c
>
> I disabled the prototype in arch/bits/fcntl.h, do you correct it or should
> I provide the patch?
Appended, Peter
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
-------------- next part --------------
Index: libc/sysdeps/linux/common/readahead.c
===================================================================
--- libc/sysdeps/linux/common/readahead.c (revision 15983)
+++ libc/sysdeps/linux/common/readahead.c (working copy)
@@ -23,7 +23,7 @@
#include <sys/syscall.h>
#include <bits/wordsize.h>
-#ifdef __NR_readahead
+#if defined __NR_readahead && defined __USE_GNU
# define __NR___readahead __NR_readahead
Index: libc/sysdeps/linux/alpha/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/alpha/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/alpha/bits/fcntl.h (working copy)
@@ -190,13 +190,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -213,6 +214,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/arm/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/arm/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/arm/bits/fcntl.h (working copy)
@@ -206,13 +206,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -229,6 +230,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/bfin/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/bfin/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/bfin/bits/fcntl.h (working copy)
@@ -196,13 +196,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -219,6 +220,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/cris/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/cris/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/cris/bits/fcntl.h (working copy)
@@ -197,13 +197,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -220,6 +221,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/hppa/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/hppa/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/hppa/bits/fcntl.h (working copy)
@@ -195,12 +195,13 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -216,6 +217,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/i386/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/i386/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/i386/bits/fcntl.h (working copy)
@@ -198,13 +198,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -221,6 +222,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/ia64/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/ia64/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/ia64/bits/fcntl.h (working copy)
@@ -192,13 +192,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -215,6 +216,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/m68k/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/m68k/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/m68k/bits/fcntl.h (working copy)
@@ -196,13 +196,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -219,6 +220,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/mips/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/mips/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/mips/bits/fcntl.h (working copy)
@@ -220,13 +220,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -243,6 +244,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/nios/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/nios/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/nios/bits/fcntl.h (working copy)
@@ -196,13 +196,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -219,6 +220,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/nios2/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/nios2/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/nios2/bits/fcntl.h (working copy)
@@ -196,13 +196,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -219,6 +220,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/powerpc/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/powerpc/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/powerpc/bits/fcntl.h (working copy)
@@ -198,13 +198,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -221,6 +222,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/sh/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/sh/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/sh/bits/fcntl.h (working copy)
@@ -198,13 +198,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -221,6 +222,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/sparc/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/sparc/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/sparc/bits/fcntl.h (working copy)
@@ -217,13 +217,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -240,6 +241,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/vax/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/vax/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/vax/bits/fcntl.h (working copy)
@@ -167,13 +167,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -190,6 +191,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
Index: libc/sysdeps/linux/x86_64/bits/fcntl.h
===================================================================
--- libc/sysdeps/linux/x86_64/bits/fcntl.h (revision 15983)
+++ libc/sysdeps/linux/x86_64/bits/fcntl.h (working copy)
@@ -212,13 +212,14 @@
__BEGIN_DECLS
-#if 0 /*def __USE_GNU*/
+#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);
@@ -235,6 +236,7 @@
/* In-kernel implementation of tee for pipe buffers. */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+#endif
#endif
More information about the uClibc
mailing list