Skip to content

Commit

Permalink
Add a cache check with which users who cross-compile APR
Browse files Browse the repository at this point in the history
can influence the outcome of the /dev/zero test by setting the variable
ac_cv_mmap__dev_zero=yes


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1875062 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
minfrin committed Mar 10, 2020
1 parent 7e7899c commit d484a5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes for APR 2.0.0

*) Add a cache check with which users who cross-compile APR
can influence the outcome of the /dev/zero test by setting the variable
ac_cv_mmap__dev_zero=yes [Sebastian Kemper <sebastian_ml gmx net>]

*) apr_crypto_commoncrypto: Remove stray reference to -lcrypto that
prevented commoncrypto being enabled. [Graham Leggett]

Expand Down
12 changes: 5 additions & 7 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1092,10 +1092,10 @@ AC_CHECK_FILE(/dev/zero)

# 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>
test "$ac_cv_file__dev_zero" = "yes"; then
AC_CACHE_CHECK([for mmap that can map /dev/zero],
[ac_cv_mmap__dev_zero],
[AC_TRY_RUN([#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifdef HAVE_SYS_MMAN_H
Expand All @@ -1117,9 +1117,7 @@ if test "$ac_cv_func_mmap" = "yes" &&
return 3;
}
return 0;
}], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])

AC_MSG_RESULT($ac_cv_file__dev_zero)
}], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])])
fi

# Now we determine which one is our anonymous shmem preference.
Expand Down

0 comments on commit d484a5b

Please sign in to comment.