From df7a33d301b0c91a4002c7247dcdff9f50f00191 Mon Sep 17 00:00:00 2001 From: Roumen Petrov Date: Sat, 23 Feb 2013 13:55:00 +0200 Subject: [PATCH 06/16] MINGW: configure largefile support for windows builds --- configure.ac | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 21f4884..eb93a71 100644 --- a/configure.ac +++ b/configure.ac @@ -1825,10 +1825,22 @@ AC_CHECK_SIZEOF(off_t, [], [ ]) AC_MSG_CHECKING(whether to enable large file support) +have_largefile_support=no if test "$have_long_long" = yes then if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then + have_largefile_support=yes +else + case $host in + *-*-mingw*) + dnl Activate on windows platforms (32&64-bit) where off_t(4) < fpos_t(8) + have_largefile_support=yes + ;; + esac +fi +fi +if test $have_largefile_support = yes ; then AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1, [Defined to enable large file support when an off_t is bigger than a long and long long is available and at least as big as an off_t. You may need @@ -1838,9 +1850,6 @@ if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ else AC_MSG_RESULT(no) fi -else - AC_MSG_RESULT(no) -fi AC_CHECK_SIZEOF(time_t, [], [ #ifdef HAVE_SYS_TYPES_H -- 1.7.12.1