summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2010-12-02 10:04:47 +0000
committerroot <root>2010-12-02 10:04:47 +0000
commitcec9b1185592639231b9f8816e6f819d3a6b3553 (patch)
tree5bf16002053e46986a6b84e56a928fedaff1ee9d
parent31d3c116144301b51fc50ad7934fe6f988b7029c (diff)
*** empty log message ***rel-3_71
-rw-r--r--config.h.in12
-rw-r--r--libeio.m435
2 files changed, 47 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in
index 5841743..82e6318 100644
--- a/config.h.in
+++ b/config.h.in
@@ -15,6 +15,12 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* posix_fadvise(2) is available */
+#undef HAVE_POSIX_FADVISE
+
+/* posix_madvise(2) is available */
+#undef HAVE_POSIX_MADVISE
+
/* pread(2) and pwrite(2) are available */
#undef HAVE_PREADWRITE
@@ -48,6 +54,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* utimes(2) is available */
+#undef HAVE_UTIMES
+
/* Name of package */
#undef PACKAGE
@@ -63,6 +72,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
diff --git a/libeio.m4 b/libeio.m4
index 13f9dfc..5302cfc 100644
--- a/libeio.m4
+++ b/libeio.m4
@@ -119,3 +119,38 @@ int main (void)
],ac_cv_sync_file_range=yes,ac_cv_sync_file_range=no)])
test $ac_cv_sync_file_range = yes && AC_DEFINE(HAVE_SYNC_FILE_RANGE, 1, sync_file_range(2) is available)
+dnl #############################################################################
+dnl # these checks exist for the benefit of IO::AIO
+
+dnl at least uclibc defines _POSIX_ADVISORY_INFO without *any* of the required
+dnl functionality actually being present. ugh.
+AC_CACHE_CHECK(for posix_madvise, ac_cv_posix_madvise, [AC_LINK_IFELSE([
+#include <sys/mman.h>
+int main (void)
+{
+ int res = posix_madvise ((void *)0, (size_t)0, POSIX_MADV_NORMAL);
+ int a = POSIX_MADV_SEQUENTIAL;
+ int b = POSIX_MADV_RANDOM;
+ int c = POSIX_MADV_WILLNEED;
+ int d = POSIX_MADV_DONTNEED;
+ return 0;
+}
+],ac_cv_posix_madvise=yes,ac_cv_posix_madvise=no)])
+test $ac_cv_posix_madvise = yes && AC_DEFINE(HAVE_POSIX_MADVISE, 1, posix_madvise(2) is available)
+
+AC_CACHE_CHECK(for posix_fadvise, ac_cv_posix_fadvise, [AC_LINK_IFELSE([
+#define _XOPEN_SOURCE 600
+#include <fcntl.h>
+int main (void)
+{
+ int res = posix_fadvise ((int)0, (off_t)0, (off_t)0, POSIX_FADV_NORMAL);
+ int a = POSIX_FADV_SEQUENTIAL;
+ int b = POSIX_FADV_NOREUSE;
+ int c = POSIX_FADV_RANDOM;
+ int d = POSIX_FADV_WILLNEED;
+ int e = POSIX_FADV_DONTNEED;
+ return 0;
+}
+],ac_cv_posix_fadvise=yes,ac_cv_posix_fadvise=no)])
+test $ac_cv_posix_fadvise = yes && AC_DEFINE(HAVE_POSIX_FADVISE, 1, posix_fadvise(2) is available)
+