summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2019-03-19 15:12:03 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2019-03-19 15:12:03 +0000
commita69bca5908f1cbc65528eb5fe6811e1ebb6fd7f2 (patch)
treee8e40fc31b11c7774ca44f437aea08dd19ece8b2 /configure.in
parent32fe11efec3444c7f91414336d053059b26f8271 (diff)
downloadapr-a69bca5908f1cbc65528eb5fe6811e1ebb6fd7f2.tar.gz
Deprecate APR_CHECK_TYPES_COMPATIBLE for new APR_CHECK_TYPES_FMT_COMPATIBLE
macro, testing both type compatibility in a more portable way, and verifying the printf format token for these types. Order of preference of long over int is preserved. (Defers off_t fixes for the subsequent patch.) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1855839 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in13
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 3e70170b5..b84fa37d3 100644
--- a/configure.in
+++ b/configure.in
@@ -1768,13 +1768,17 @@ case $host in
;;
esac
-APR_CHECK_TYPES_COMPATIBLE(ssize_t, int, [ssize_t_fmt="d"])
-APR_CHECK_TYPES_COMPATIBLE(ssize_t, long, [ssize_t_fmt="ld"])
-APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned int, [size_t_fmt="u"])
-APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned long, [size_t_fmt="lu"])
+dnl I would expect much of the above to go away with new compile test
+APR_CHECK_TYPES_FMT_COMPATIBLE(ssize_t, long, ld, [ssize_t_fmt="ld"], [
+APR_CHECK_TYPES_FMT_COMPATIBLE(ssize_t, int, d, [ssize_t_fmt="d"])
+])
+APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned long, lu, [size_t_fmt="lu"], [
+APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned int, u, [size_t_fmt="u"])
+])
APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
+dnl the else cases below should no longer occur;
AC_MSG_CHECKING([which format to use for apr_ssize_t])
if test -n "$ssize_t_fmt"; then
AC_MSG_RESULT(%$ssize_t_fmt)
@@ -1792,6 +1796,7 @@ ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
+# else cases below should no longer occur;
AC_MSG_CHECKING([which format to use for apr_size_t])
if test -n "$size_t_fmt"; then
AC_MSG_RESULT(%$size_t_fmt)