On Wed, Jan 28, 2004 at 04:45:26PM -0800, Ben Reser wrote:
> So I guess I'll look into redoing it to use int, long or long long
> instead.

I found some time to look at this.  The types I'm using now match the
formats we were using before.  So we shouldn't have an ABI conflict.  If
we do we had a bug with the formats already.

The one case where this may exist would be 64-bit archs with 64-bit
off_t's.  These platforms could use long long or long for the off_t.
They might choose differently than we have for apr_int64_t.  I don't
know of any other way to deal with this than what was already done with
the LFS platforms that use long for off_t.  We'll simply have to detect
these platforms one by one and apply exceptions for them.

-- 
Ben Reser <[EMAIL PROTECTED]>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
Index: configure.in
===================================================================
RCS file: /home/cvspublic/apr/configure.in,v
retrieving revision 1.567
diff -u -r1.567 configure.in
--- configure.in        1 Feb 2004 16:42:44 -0000       1.567
+++ configure.in        3 Feb 2004 01:00:55 -0000
@@ -1113,11 +1113,6 @@
     stdint=0
 fi
 
-if test "$ac_cv_type_off_t" = "yes"; then
-    off_t_value="off_t"
-else
-    off_t_value="apr_int32_t"
-fi
 if test "$ac_cv_type_size_t" = "yes"; then
     size_t_value="size_t"
 else
@@ -1157,12 +1152,16 @@
 APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
 
 if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_int"; then
+    off_t_value='int'
     off_t_fmt='#define APR_OFF_T_FMT "d"'
 elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long"; then
+    off_t_value='long'
     off_t_fmt='#define APR_OFF_T_FMT "ld"'
 elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long_long"; then
+    off_t_value='apr_int64_t'
     off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT'
 else
+    off_t_value='apr_int64_t'
     off_t_fmt='#error Can not determine the proper size for off_t'
 fi
 
@@ -1197,6 +1196,7 @@
        size_t_fmt='#define APR_SIZE_T_FMT "ld"'
        ;;
    *os2_emx)
+       off_t_value='long'
        off_t_fmt='#define APR_OFF_T_FMT "ld"'
        size_t_fmt='#define APR_SIZE_T_FMT "lu"'
        ;;
@@ -1222,6 +1222,7 @@
 if test "$ac_cv_sizeof_off_t" = "4"; then
    case $host in 
    *linux*|*-solaris*|*aix[[45]]*)
+        off_t_value='long'
         off_t_fmt='#define APR_OFF_T_FMT "ld"'
         ;;
    esac

Reply via email to