summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Leggett <minfrin@apache.org>2020-03-10 22:43:11 +0000
committerGraham Leggett <minfrin@apache.org>2020-03-10 22:43:11 +0000
commit53fa8c368e9949dde4ee418a64886649eb5665d9 (patch)
treece09b8d75896e9eee7a445746eecd51e037fcac5
parent1b7323cb739f670d50ff85d6894a37b8d136f8e2 (diff)
downloadapr-53fa8c368e9949dde4ee418a64886649eb5665d9.tar.gz
Backport r1875065
APR's configure script uses AC_TRY_RUN to detect whether the return type of strerror_r is int. When cross-compiling this defaults to no. This commit adds an AC_CACHE_CHECK so users who cross-compile APR may influence the outcome with a configure variable. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1875066 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES7
-rw-r--r--build/apr_common.m411
2 files changed, 11 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index 4ff472a83..bbfd6562f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,13 @@
-*- coding: utf-8 -*-
Changes for APR 1.7.1
+ *) APR's configure script uses AC_TRY_RUN to detect whether the return type
+ of strerror_r is int. When cross-compiling this defaults to no.
+
+ This commit adds an AC_CACHE_CHECK so users who cross-compile APR may
+ influence the outcome with a configure variable. [Sebastian Kemper
+ <sebastian_ml gmx net>]
+
*) 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>]
diff --git a/build/apr_common.m4 b/build/apr_common.m4
index cbf24fe0b..9686e5d85 100644
--- a/build/apr_common.m4
+++ b/build/apr_common.m4
@@ -489,8 +489,9 @@ dnl string.
dnl
dnl
AC_DEFUN([APR_CHECK_STRERROR_R_RC], [
-AC_MSG_CHECKING(for type of return code from strerror_r)
-AC_TRY_RUN([
+AC_CACHE_CHECK([whether return code from strerror_r has type int],
+[ac_cv_strerror_r_rc_int],
+[AC_TRY_RUN([
#include <errno.h>
#include <string.h>
#include <stdio.h>
@@ -506,14 +507,10 @@ main()
}], [
ac_cv_strerror_r_rc_int=yes ], [
ac_cv_strerror_r_rc_int=no ], [
- ac_cv_strerror_r_rc_int=no ] )
+ ac_cv_strerror_r_rc_int=no ] ) ] )
if test "x$ac_cv_strerror_r_rc_int" = xyes; then
AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
- msg="int"
-else
- msg="pointer"
fi
-AC_MSG_RESULT([$msg])
] )
dnl