Skip to content

Commit

Permalink
Restore after the tag.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63332 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
sstriker committed May 1, 2002
1 parent 1b41ca2 commit e218a10
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit e218a10

Please sign in to comment.