autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_SYS_LARGEFILE_REQUIRED vs. AC_SYS_YEAR2038_REQUIRED on MSVC


From: Bruno Haible
Subject: Re: AC_SYS_LARGEFILE_REQUIRED vs. AC_SYS_YEAR2038_REQUIRED on MSVC
Date: Sun, 16 Apr 2023 17:18:07 +0200

Paul Eggert wrote:
> > +[AC_REQUIRE([AC_CANONICAL_HOST])
> Is there some way we can do this without requiring AC_CANONICAL_HOST? 
> We're close to a release for Autoconf, and requiring this at the last 
> minute for AC_SYS_LARGEFILE is a bit of a stretch.
> 
> That is, instead of AS_CASE([$host_os], ...) can  we use 
> AC_PREPROC_IFELSE with the appropriate C preprocessor tests? Or perhaps 
> do the AC_REQUIRE only if gl_LARGEFILE is defined?

Yes. Here are adjusted patches. I moved the AC_REQUIRE([AC_CANONICAL_HOST])
into the part that is only expanded if gl_LARGEFILE is defined.

Inside gnulib, so many macros require AC_CANONICAL_HOST that it's a no-brainer.

Find attached also the testdirs which I used to test the patches:
  - hello-3: no gnulib, just AC_SYS_LARGEFILE_REQUIRED
  - hello-4: no gnulib, just AC_SYS_YEAR2038_REQUIRED
  - testdir3: a gnulib testdir for the modules largefile-required stat
  - testdir4: a gnulib testdir for the modules year2038-required stat

In hello-3/configure and hello-4/configure the word 'host_os' does not occur;
this proves that the AC_REQUIRE([AC_CANONICAL_HOST]) has no effect if gnulib
is not used.

The configure results are exactly the expected outcome from my previous mail.
Summary table:

             mingw64  mingw32  msvc64  msvc32

hello-3        OK       OK     "support not detected" -> fail
hello-4        OK       OK     "support not detected" -> fail
testdir3       OK       OK       OK      OK
testdir4       OK       OK       OK      OK

Details from the configure output:

hello-3/build-mingw32  option to enable large file support... 
-D_FILE_OFFSET_BITS=64
hello-3/build-mingw64  option to enable large file support... 
-D_FILE_OFFSET_BITS=64
hello-3/build-msvc32   option to enable large file support... support not 
detected
hello-3/build-msvc64   option to enable large file support... support not 
detected
hello-4/build-mingw32  option to enable large file support... 
-D_FILE_OFFSET_BITS=64
hello-4/build-mingw64  option to enable large file support... 
-D_FILE_OFFSET_BITS=64
hello-4/build-msvc32   option to enable large file support... support not 
detected
hello-4/build-msvc64   option to enable large file support... support not 
detected
testdir3/build-mingw32 option to enable large file support... 
-D_FILE_OFFSET_BITS=64
testdir3/build-mingw64 option to enable large file support... 
-D_FILE_OFFSET_BITS=64
testdir3/build-msvc32  option to enable large file support... supported through 
gnulib
testdir3/build-msvc64  option to enable large file support... supported through 
gnulib
testdir4/build-mingw32 option to enable large file support... 
-D_FILE_OFFSET_BITS=64
testdir4/build-mingw64 option to enable large file support... 
-D_FILE_OFFSET_BITS=64
testdir4/build-msvc32  option to enable large file support... supported through 
gnulib
testdir4/build-msvc64  option to enable large file support... supported through 
gnulib

hello-4/build-mingw32  option to enable timestamps after Jan 2038... 
-D__MINGW_USE_VC2005_COMPAT
hello-4/build-mingw64  option to enable timestamps after Jan 2038... none needed
testdir4/build-mingw32 option to enable timestamps after Jan 2038... 
-D__MINGW_USE_VC2005_COMPAT
testdir4/build-mingw64 option to enable timestamps after Jan 2038... none needed
testdir4/build-msvc32  option to enable timestamps after Jan 2038... none needed
testdir4/build-msvc64  option to enable timestamps after Jan 2038... none needed

Bruno

Attachment: 0001-AC_SYS_YEAR2038_REQUIRED-Fix-configure-failure-with-.patch
Description: Text Data

Attachment: 0001-year2038-required-Fix-configure-failure-with-MSVC.patch
Description: Text Data

Attachment: testdirs.tar.xz
Description: application/xz-compressed-tar


reply via email to

[Prev in Thread] Current Thread [Next in Thread]