apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r589590 - in /apr/apr/branches/1.2.x: build/apr_common.m4 configure.in
Date Mon, 29 Oct 2007 11:47:33 GMT
Author: jorton
Date: Mon Oct 29 04:47:32 2007
New Revision: 589590

URL: http://svn.apache.org/viewvc?rev=589590&view=rev
Log:
Merge r589583, r584171 from trunk:

* 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.

* build/apr_common.m4 (APR_CHECK_TYPES_COMPATIBLE): Set the cache variable
correctly on success even if actions-if-true are specified.

Modified:
    apr/apr/branches/1.2.x/build/apr_common.m4
    apr/apr/branches/1.2.x/configure.in

Modified: apr/apr/branches/1.2.x/build/apr_common.m4
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/build/apr_common.m4?rev=589590&r1=589589&r2=589590&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/build/apr_common.m4 (original)
+++ apr/apr/branches/1.2.x/build/apr_common.m4 Mon Oct 29 04:47:32 2007
@@ -971,6 +971,7 @@
 AC_CACHE_CHECK([whether $1 and $2 are the same], apr_cvname, [
 AC_TRY_COMPILE(AC_INCLUDES_DEFAULT, [
     int foo[0 - !__builtin_types_compatible_p($1, $2)];
-], [apr_cvname=yes $3], [apr_cvname=no])])
+], [apr_cvname=yes
+$3], [apr_cvname=no])])
 ])
 

Modified: apr/apr/branches/1.2.x/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/configure.in?rev=589590&r1=589589&r2=589590&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/configure.in (original)
+++ apr/apr/branches/1.2.x/configure.in Mon Oct 29 04:47:32 2007
@@ -470,14 +470,6 @@
    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,
@@ -1305,6 +1297,24 @@
    off_t_strfn='strtoi'
 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)
 



Mime
View raw message