]> Savannah Git Hosting - gnulib.git/commitdiff
year2038-required: Fix configure failure with MSVC.
authorBruno Haible <bruno@clisp.org>
Wed, 19 Apr 2023 21:20:54 +0000 (14:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 19 Apr 2023 21:20:54 +0000 (14:20 -0700)
* m4/largefile.m4 (_AC_SYS_LARGEFILE_PROBE): Distinguish the results
"support not detected" and "supported through gnulib". If the result is
"supported through gnulib", don't fail.

ChangeLog
m4/largefile.m4

index 88338a6cdcb34c1762f2ec09b8c7317b5b679edd..5026c8c1cf6ec4f3a74a5ef730f240263915a1e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-04-19  Bruno Haible  <bruno@clisp.org>
+
+       year2038-required: Fix configure failure with MSVC.
+       * m4/largefile.m4 (_AC_SYS_LARGEFILE_PROBE): Distinguish the results
+       "support not detected" and "supported through gnulib". If the result is
+       "supported through gnulib", don't fail.
+
 2023-04-19  Bruno Haible  <bruno@clisp.org>
 
        doc: Add references to changes accepted for future POSIX revisions.
index f741d0df6e9432ee62ae7e9150bcc0f131bc87e3..46b019a670157be2cf842980a25a37c45a6db9bd 100644 (file)
@@ -266,11 +266,24 @@ AC_DEFUN([_AC_SYS_LARGEFILE_PROBE],
     test $ac_opt_found = no || break
   done
   CC="$ac_save_CC"
+  dnl Gnulib implements large file support for native Windows, based on the
+  dnl variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE.
+  m4_ifdef([gl_LARGEFILE], [
+    AC_REQUIRE([AC_CANONICAL_HOST])
+    if test $ac_opt_found != yes; then
+      AS_CASE([$host_os],
+        [mingw*],
+          [ac_cv_sys_largefile_opts="supported through gnulib"
+           ac_opt_found=yes]
+      )
+    fi
+  ])
   test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected"])
 
 ac_have_largefile=yes
 AS_CASE([$ac_cv_sys_largefile_opts],
   ["none needed"], [],
+  ["supported through gnulib"], [],
   ["support not detected"],
     [ac_have_largefile=no
      AS_IF([test $ac_largefile_required,$ac_year2038_required != no,no],