r23307: move readahead stuff out of libreplace and make it samba3 specific
authorStefan Metzmacher <metze@samba.org>
Sat, 2 Jun 2007 08:30:42 +0000 (08:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:05 +0000 (12:23 -0500)
as we can't replace this function in libreplace and we do
the some stuff for other function in the same way.

metze

source/configure.in
source/include/includes.h
source/lib/replace/README
source/lib/replace/libreplace.m4
source/lib/replace/replace.h

index 63e343f43f8bd4d29675686769b9a164a229aa3a..1c32bf6d58f07c58e943cd739df73afa35d053bf 100644 (file)
@@ -5925,6 +5925,8 @@ if test x"$samba_cv_HAVE_LINUX_READAHEAD" = x"yes"; then
              [Whether Linux readahead is available])
 fi
 
+AC_HAVE_DECL(readahead, [#include <fcntl.h>])
+
 ############################################
 # See if we have the posix_fadvise syscall.
 
index d1cd27585ec7d75a27de043335b5eb4724ebae0f..0e90004bdbce4d18d035d1bf74813f51786ac394 100644 (file)
@@ -1214,6 +1214,9 @@ LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);
 
 #endif /* HAVE_LDAP */
 
+#if defined(HAVE_LINUX_READAHEAD) && ! defined(HAVE_READAHEAD_DECL)
+ssize_t readahead(int fd, off64_t offset, size_t count);
+#endif
 
 /* TRUE and FALSE are part of the C99 standard and gcc, but
    unfortunately many vendor compilers don't support them.  Use True
index a2f9e2fa29637870a4e7ab3681775b89cf693c2b..77558b2ca96718f95c3e58a950b0697f1c685e70 100644 (file)
@@ -55,11 +55,6 @@ strtoull
 socketpair
 strptime
 
-These external declarations are provided for those systems which lack the
-declaration but provide the function:
-
-readahead
-
 Types:
 bool
 socklen_t
index a030ce2e909c2b51eb6c3ea1d53aeb27494f488e..e9b19b7cf51b45bdf38ba81941de5a8c806a346c 100644 (file)
@@ -155,7 +155,6 @@ AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp socketpair)
 AC_HAVE_DECL(setresuid, [#include <unistd.h>])
 AC_HAVE_DECL(setresgid, [#include <unistd.h>])
 AC_HAVE_DECL(errno, [#include <errno.h>])
-AC_HAVE_DECL(readahead, [#include <fcntl.h>])
 
 AC_CACHE_CHECK([for secure mkstemp],samba_cv_HAVE_SECURE_MKSTEMP,[
 AC_TRY_RUN([#include <stdlib.h>
index 2bda0eab520b7549f5fbc38bf93a3450294b7a61..3cb3c95b694f016b7199b21a29a99400cdbc0f9e 100644 (file)
@@ -111,10 +111,6 @@ extern char *sys_errlist[];
 extern int errno;
 #endif
 
-#if defined(HAVE_LINUX_READAHEAD) && ! defined(HAVE_READAHEAD_DECL)
-ssize_t readahead(int fd, off64_t offset, size_t count);
-#endif
-
 #ifndef HAVE_STRDUP
 #define strdup rep_strdup
 char *rep_strdup(const char *s);