apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1836616 - in /apr/apr/trunk: configure.in include/apr.h.in
Date Wed, 25 Jul 2018 11:00:51 GMT
Author: ylavic
Date: Wed Jul 25 11:00:50 2018
New Revision: 1836616

URL: http://svn.apache.org/viewvc?rev=1836616&view=rev
Log:
Provide APR_SIZEOF_OFF_T.

Modified:
    apr/apr/trunk/configure.in
    apr/apr/trunk/include/apr.h.in

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/configure.in?rev=1836616&r1=1836615&r2=1836616&view=diff
==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Wed Jul 25 11:00:50 2018
@@ -1832,6 +1832,7 @@ if test "${ac_cv_sizeof_off_t}${apr_cv_u
     off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT'
     off_t_value='off64_t'
     off_t_strfn='apr_strtoi64'
+    off_t_size=8
 elif test "${ac_cv_sizeof_off_t}x${ac_cv_sizeof_long}" = "4x4"; then
     # Special case: off_t may change size with _FILE_OFFSET_BITS
     # on 32-bit systems with LFS support.  To avoid compatibility
@@ -1840,8 +1841,10 @@ elif test "${ac_cv_sizeof_off_t}x${ac_cv
     off_t_value=long
     off_t_fmt='#define APR_OFF_T_FMT "ld"'
     off_t_strfn='strtol'
+    off_t_size="$ac_cv_sizeof_long"
 elif test "$ac_cv_type_off_t" = "yes"; then
     off_t_value=off_t
+    off_t_size="$ac_cv_sizeof_off_t"
     # off_t is more commonly a long than an int; prefer that case
     # where int and long are the same size.
     if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long"; then
@@ -1862,6 +1865,7 @@ elif test "$ac_cv_type_off_t" = "yes"; t
         off_t_value=apr_int64_t
         off_t_fmt='#define APR_OFF_T_FMT "I64d"'
         off_t_strfn='_strtoi64'
+        off_t_size=8
         ;;
     esac
 else
@@ -1869,9 +1873,11 @@ else
     off_t_value=int
     off_t_fmt='#define APR_OFF_T_FMT "d"'
     off_t_strfn='strtoi'
+    off_t_size=4
 fi
 AC_MSG_RESULT($off_t_value)
 
+
 # Regardless of whether _LARGEFILE64_SOURCE is used, on some
 # 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
@@ -1942,6 +1948,7 @@ AC_SUBST(bigendian)
 AC_SUBST(aprlfs)
 AC_SUBST(have_iovec)
 AC_SUBST(ino_t_value)
+AC_SUBST(off_t_size)
 
 dnl ----------------------------- Checking for string functions
 AC_CHECK_FUNCS(strnicmp, have_strnicmp="1", have_strnicmp="0")

Modified: apr/apr/trunk/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.h.in?rev=1836616&r1=1836615&r2=1836616&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.h.in (original)
+++ apr/apr/trunk/include/apr.h.in Wed Jul 25 11:00:50 2018
@@ -334,6 +334,7 @@ typedef  @int_value@             apr_int
 typedef  unsigned @int_value@    apr_uint32_t;
 
 #define APR_SIZEOF_VOIDP @voidp_size@
+#define APR_SIZEOF_OFF_T @off_t_size@
 
 /*
  * Darwin 10's default compiler (gcc42) builds for both 64 and



Mime
View raw message