From 0d783f83aadf8f7dd64bf81684942be2cde01df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= Date: Thu, 17 Jun 2021 18:51:16 +0530 Subject: [PATCH 007/N] MINGW configure largefile support for windows builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Алексей Co-authored-by: Christoph Reiter --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index a2cec23..61a7608 100644 --- a/configure.ac +++ b/configure.ac @@ -2487,8 +2487,20 @@ AC_CHECK_SIZEOF(off_t, [], [ ]) AC_MSG_CHECKING(whether to enable large file support) +have_largefile_support=no 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 + +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 at least as big as an off_t. You may need -- 2.33.0