summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in21
1 files changed, 12 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index 993a634cc..6a19bebe8 100644
--- a/configure.in
+++ b/configure.in
@@ -1187,26 +1187,19 @@ fi
# it right. If you find that we don't get it right for your platform,
# you can override our decision below.
case $host in
- *linux*)
- off_t_fmt='#define APR_OFF_T_FMT "ld"'
- case $host in
- s390*)
- size_t_fmt='#define APR_SIZE_T_FMT "ld"'
- ;;
- esac
+ s390*linux*)
+ size_t_fmt='#define APR_SIZE_T_FMT "ld"'
;;
*os2_emx)
off_t_fmt='#define APR_OFF_T_FMT "ld"'
size_t_fmt='#define APR_SIZE_T_FMT "lu"'
;;
*-solaris*)
- off_t_fmt='#define APR_OFF_T_FMT "ld"'
pid_t_fmt='#define APR_PID_T_FMT "ld"'
;;
*aix4*|*aix5*)
ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
size_t_fmt='#define APR_SIZE_T_FMT "ld"'
- off_t_fmt='#define APR_OFF_T_FMT "ld"'
;;
*beos*)
ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
@@ -1218,6 +1211,16 @@ case $host in
;;
esac
+# Override format string for off_t more carefully: only use hard-coded
+# choice if using a 32-bit off_t on platforms which support LFS.
+if test "$ac_cv_sizeof_off_t" = "4"; then
+ case $host in
+ *linux*|*-solaris*|*aix[[45]]*)
+ off_t_fmt='#define APR_OFF_T_FMT "ld"'
+ ;;
+ esac
+fi
+
AC_SUBST(voidp_size)
AC_SUBST(short_value)
AC_SUBST(int_value)