svn commit: samba r22772 - in branches/SAMBA_3_0/source: . lib/replace

derrell at samba.org derrell at samba.org
Thu May 10 01:27:22 GMT 2007


Author: derrell
Date: 2007-05-10 01:27:18 +0000 (Thu, 10 May 2007)
New Revision: 22772

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22772

Log:

- Still working on the fact that readahead() is not declared (on at least one
  OS) but is available for linking.  Instead of running configure tests with
  -Werror-implicit-function-declaration in developer mode (which may lead to
  different library functions being used in developer mode than when not in
  developer mode), add tests for whether readahead is declared.  If not,
  provide a replacement declaration in lib/replace.

Modified:
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/lib/replace/README
   branches/SAMBA_3_0/source/lib/replace/libreplace.m4
   branches/SAMBA_3_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===================================================================
--- branches/SAMBA_3_0/source/configure.in	2007-05-09 21:38:41 UTC (rev 22771)
+++ branches/SAMBA_3_0/source/configure.in	2007-05-10 01:27:18 UTC (rev 22772)
@@ -1337,19 +1337,6 @@
 # implicit declaration warnings without failing the test (in developer mode)
 ac_no_error_on_warning_CFLAGS="${CFLAGS}"
 
-# Since --enable-developer causes warnings to be treated as errors during
-# compilation, we should avoid using features that will fail to compile.
-#
-# We don't want to enable this earlier because the built-in functions such as
-# memset fail to configure properly.
-
-if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes" -a \
-        x"$developer" = xyes; then
-  CFLAGS="${CFLAGS} -Werror-implicit-function-declaration"
-  ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-  ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-fi
-
 echo -n "checking for GPFS GPL libs... "
 save_LIBS="$LIBS"
 LIBS="$LIBS -lgpfs_gpl"

Modified: branches/SAMBA_3_0/source/lib/replace/README
===================================================================
--- branches/SAMBA_3_0/source/lib/replace/README	2007-05-09 21:38:41 UTC (rev 22771)
+++ branches/SAMBA_3_0/source/lib/replace/README	2007-05-10 01:27:18 UTC (rev 22772)
@@ -55,6 +55,11 @@
 socketpair
 strptime
 
+These external declarations are provided for those systems which lack the
+declaration but provide the function:
+
+readahead
+
 Types:
 bool
 socklen_t

Modified: branches/SAMBA_3_0/source/lib/replace/libreplace.m4
===================================================================
--- branches/SAMBA_3_0/source/lib/replace/libreplace.m4	2007-05-09 21:38:41 UTC (rev 22771)
+++ branches/SAMBA_3_0/source/lib/replace/libreplace.m4	2007-05-10 01:27:18 UTC (rev 22772)
@@ -155,6 +155,7 @@
 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>

Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===================================================================
--- branches/SAMBA_3_0/source/lib/replace/replace.h	2007-05-09 21:38:41 UTC (rev 22771)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h	2007-05-10 01:27:18 UTC (rev 22772)
@@ -111,6 +111,11 @@
 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);



More information about the samba-cvs mailing list