summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorstriker <striker@13f79535-47bb-0310-9956-ffa450edef68>2002-05-01 10:47:37 +0000
committerstriker <striker@13f79535-47bb-0310-9956-ffa450edef68>2002-05-01 10:47:37 +0000
commit9f9161ede7bb1ce66cd7680367f5c10a4e1b9ef8 (patch)
treea69115afaf1eba1f2b8acbafaca95cc38b68d6a9 /configure.in
parentda4506bdc4f708b1f8b149c72e8708b8315d1ddc (diff)
downloadlibapr-9f9161ede7bb1ce66cd7680367f5c10a4e1b9ef8.tar.gz
Restore after the tag.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63332 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in33
1 files changed, 32 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 677b3ede8..7a86ac878 100644
--- a/configure.in
+++ b/configure.in
@@ -594,6 +594,38 @@ AC_CHECK_HEADERS(kernel/OS.h)
AC_CHECK_FUNCS(create_area)
AC_CHECK_HEADERS(os2.h)
+dnl Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
+if test "$ac_cv_func_mmap" = "yes" &&
+ test "$ac_cv_file__dev_zero" = "yes"; then
+ AC_MSG_CHECKING(for mmap that can map /dev/zero)
+ AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+ int main()
+ {
+ int fd;
+ void *m;
+ fd = open("/dev/zero", O_RDWR);
+ if (fd < 0) {
+ return 1;
+ }
+ m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+ if (m < 0) { /* aka MAP_FAILED */
+ return 2;
+ }
+ if (munmap(m, sizeof(void*)) < 0) {
+ return 3;
+ }
+ return 0;
+ }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])
+
+ AC_MSG_RESULT($ac_cv_file__dev_zero)
+fi
+
dnl Now we determine which one is our anonymous shmem preference.
haveshmgetanon="0"
havemmapzero="0"
@@ -1248,7 +1280,6 @@ dnl #----------------------------- Checking for Locking Characteristics
echo $ac_n "${nl}Checking for Locking...${nl}"
AC_CHECK_FUNCS(semget semctl flock)
-APR_CHECK_FILE(/dev/zero)
AC_CHECK_HEADERS(semaphore.h)
AC_CHECK_FUNCS(sem_close sem_unlink sem_post sem_wait)