diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 26 |
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 |