Jeff,
I found another serious prob with MinGW APR ....

checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
Configuring APR library
Platform: i686-pc-mingw32
checking for working mkdir -p... yes
APR Version: 1.4.3
.....
checking size of ino_t... 2
configure: using ino_t for ino_t

argh!! And later of course:

D:/MinGW/msys/1.0/home/Administrator/apr/apr-1.4.x/apr/file_io/win32/filestat.c: In function 'apr_file_info_get': D:/MinGW/msys/1.0/home/Administrator/apr/apr-1.4.x/apr/file_io/win32/filestat.c:466:19: warning: left shift count >= width of type

and in apr.h I find:
typedef  ino_t           apr_ino_t;

this should be an unsigned __int64 -> apr.hw has:
typedef  apr_uint64_t      apr_ino_t;

configure.in has at line 1845:

ino_t_value=ino_t
APR_CHECK_SIZEOF_EXTENDED(AC_INCLUDES_DEFAULT, ino_t, $ac_cv_sizeof_long)
if test $ac_cv_sizeof_ino_t = 4; then
    if test $ac_cv_sizeof_long = 4; then
        ino_t_value="unsigned long"
    else
        ino_t_value="unsigned int"
    fi
fi
AC_MSG_NOTICE([using $ino_t_value for ino_t])

how can we properly convince configure to use a 64-bit for MinGW here?
I've hacked this:
Index: apr/branches/1.4.x/configure.in
===================================================================
--- apr/branches/1.4.x/configure.in     (Revision 1085987)
+++ apr/branches/1.4.x/configure.in     (Arbeitskopie)
@@ -1842,15 +1842,24 @@
 # 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
-APR_CHECK_SIZEOF_EXTENDED(AC_INCLUDES_DEFAULT, ino_t, $ac_cv_sizeof_long)
-if test $ac_cv_sizeof_ino_t = 4; then
-    if test $ac_cv_sizeof_long = 4; then
-        ino_t_value="unsigned long"
-    else
-        ino_t_value="unsigned int"
+
+# Per OS tuning...
+case $host in
+*mingw*)
+    ino_t_value=apr_int64_t
+    ;;
+*)
+    ino_t_value=ino_t
+ APR_CHECK_SIZEOF_EXTENDED(AC_INCLUDES_DEFAULT, ino_t, $ac_cv_sizeof_long)
+    if test $ac_cv_sizeof_ino_t = 4; then
+        if test $ac_cv_sizeof_long = 4; then
+            ino_t_value="unsigned long"
+        else
+            ino_t_value="unsigned int"
+        fi
     fi
-fi
+    ;;
+esac
 AC_MSG_NOTICE([using $ino_t_value for ino_t])

 # Checks for endianness

and that seems to work - it skips the useless testing for *mingw* and sets the right typedef in apr.h, and the warning is then also gone;
but not sure if its the right patch ...

Gün.





Reply via email to