Disable vectored positional IO if no 64bit support
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 6 Mar 2011 16:06:36 +0000 (16:06 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 6 Mar 2011 18:06:36 +0000 (10:06 -0800)
In order to support vectored positional I/O, and large files, we
need there to be an implementation of preadv64 and pwritev64. If
this isn't present, then just disable HAVE_PIOV.

Change-Id: I78b1e09f8a836534f49594300b4f58d661eebd46
Reviewed-on: http://gerrit.openafs.org/4153
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

acinclude.m4

index 245187e..a58f396 100644 (file)
@@ -1327,8 +1327,10 @@ AC_CHECK_FUNCS([ \
        mkstemp \
        pread \
        preadv \
+       preadv64 \
        pwrite \
        pwritev \
+       pwritev64 \
        regcomp \
        regerror \
        regexec \
@@ -1463,13 +1465,13 @@ case $AFS_SYSNAME in
      AC_MSG_RESULT(no)
    fi
    AC_MSG_CHECKING([for vectored positional I/O])
-   if test "$ac_cv_func_preadv" = "yes" && \
-           test "$ac_cv_func_pwritev" = "yes"; then
-      AC_DEFINE(HAVE_PIOV, 1, [define if you have preadv() and pwritev()])
-      AC_MSG_RESULT(yes)
-   else
-     AC_MSG_RESULT(no)
-   fi
+   AS_IF([test "$ac_cv_func_preadv" = "yes" -a \
+               "$ac_cv_func_pwritev" = "yes" -a \
+              "$ac_cv_func_preadv64" = "yes" -a \
+              "$ac_cv_func_pwritev64" = "yes"],
+        [AC_DEFINE(HAVE_PIOV, 1, [define if you have preadv() and pwritev()])
+         AC_MSG_RESULT(yes)],
+        [AC_MSG_RESULT(no)])
    ;;
 esac