]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
linux-aio-functions-improved-test-20061011
authorDerrick Brashear <shadow@dementia.org>
Thu, 12 Oct 2006 13:22:28 +0000 (13:22 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 12 Oct 2006 13:22:28 +0000 (13:22 +0000)
detect properly if we have nothing

src/cf/linux-test4.m4

index 4585ea7d43e54a14f161760f0656cf0a390c9c04..2c29423367c1474cdfcddc64aee6c50dcdf53b56 100644 (file)
@@ -648,11 +648,14 @@ AC_DEFUN([LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK], [
 AC_DEFUN([LINUX_DO_SYNC_READ], [
   AC_MSG_CHECKING([for linux do_sync_read()])
   AC_CACHE_VAL([ac_cv_linux_do_sync_read], [
+    save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
     AC_TRY_KBUILD(
 [#include <linux/fs.h>],
 [do_sync_read(NULL, NULL, 0, NULL);],
       ac_cv_linux_do_sync_read=yes,
-      ac_cv_linux_do_sync_read=no)])
+      ac_cv_linux_do_sync_read=no)
+    CPPFLAGS="$save_CPPFLAGS"])
   AC_MSG_RESULT($ac_cv_linux_do_sync_read)
   if test "x$ac_cv_linux_do_sync_read" = "xyes"; then
     AC_DEFINE([DO_SYNC_READ], 1, [define if your kernel has do_sync_read()])
@@ -661,12 +664,16 @@ AC_DEFUN([LINUX_DO_SYNC_READ], [
 AC_DEFUN([LINUX_GENERIC_FILE_AIO_READ], [
   AC_MSG_CHECKING([for linux generic_file_aio_read()])
   AC_CACHE_VAL([ac_cv_linux_generic_file_aio_read], [
+    save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
     AC_TRY_KBUILD(
 [#include <linux/fs.h>],
 [generic_file_aio_read(NULL, NULL, 0, 0);],
       ac_cv_linux_generic_file_aio_read=yes,
-      ac_cv_linux_generic_file_aio_read=no)])
+      ac_cv_linux_generic_file_aio_read=no)
+    CPPFLAGS="$save_CPPFLAGS"])
   AC_MSG_RESULT($ac_cv_linux_generic_file_aio_read)
   if test "x$ac_cv_linux_generic_file_aio_read" = "xyes"; then
     AC_DEFINE([GENERIC_FILE_AIO_READ], 1, [define if your kernel has generic_file_aio_read()])
   fi])
+