summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2007-10-29 11:19:02 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2007-10-29 11:19:02 +0000
commit2a947ef4e70b82b83fbc9a04d867a2dda27c2fb0 (patch)
tree4932898ac59ef50b4371dad41d1d4ff5fbf3374f /configure.in
parent8f256799b32cce2f95797774374888a657ffb98d (diff)
downloadlibapr-2a947ef4e70b82b83fbc9a04d867a2dda27c2fb0.tar.gz
* configure.in: Move the ino_t test outside the enable_lfs=yes branch,
and only define apr_ino_t as unsigned long in the case where a 32-bit ino_t is detected and hence may vary by _FILE_OFFSET_BITS; it's not necessary in the other cases. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@589583 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in26
1 files changed, 18 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index 38791a72f..0e8822c94 100644
--- a/configure.in
+++ b/configure.in
@@ -530,14 +530,6 @@ void main(void)
if test "$apr_cv_use_lfs64" = "yes"; then
APR_ADDTO(CPPFLAGS, [-D_LARGEFILE64_SOURCE])
fi
-
-
- dnl define apr_ino_t in a manner independent of _FILE_OFFSET_BITS setting
- dnl default fallback
- ino_t_value=ino_t
- APR_CHECK_TYPES_COMPATIBLE(ino_t, unsigned long long, ino_t_value="unsigned long long")
- APR_CHECK_TYPES_COMPATIBLE(ino_t, unsigned long, ino_t_value="unsigned long")
- APR_CHECK_TYPES_COMPATIBLE(ino_t, unsigned int, ino_t_value="unsigned int")
fi
AC_ARG_ENABLE(nonportable-atomics,
@@ -1463,6 +1455,24 @@ else
fi
AC_MSG_RESULT($off_t_value)
+# Regardless of whether _LARGEFILE64_SOURCE is used, on 32-bit
+# platforms _FILE_OFFSET_BITS will affect the size of ino_t and hence
+# the build-time ABI may be different from the apparent ABI when using
+# APR with another package which *does* define _FILE_OFFSET_BITS.
+# (Exactly as per the case above with off_t where LFS is *not* used)
+#
+# To be safe, hard-code apr_ino_t as 'unsigned long' iff that is
+# exactly the size of ino_t here; otherwise use ino_t as existing
+# releases did. To be correct, apr_ino_t should have been made an
+# ino64_t as apr_off_t is off64_t, but this can't be done now without
+# breaking ABI.
+ino_t_value=ino_t
+if test "$ac_cv_sizeof_long" = "4"; then
+ APR_CHECK_TYPES_COMPATIBLE(ino_t, unsigned long,
+ ino_t_value="unsigned long")
+fi
+AC_MSG_NOTICE([using $ino_t_value for ino_t])
+
APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then