]> Savannah Git Hosting - gnulib.git/commitdiff
year2038-recommended: new module
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 29 Apr 2023 18:44:13 +0000 (11:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 29 Apr 2023 18:46:25 +0000 (11:46 -0700)
Remove year2038-required and largefile-required, replacing
the former with year2038-recommended and simply removing
the latter.  This syncs with Autoconf master.
* MODULES.html.sh, NEWS, doc/largefile.texi:
* all-modules (exclude): Exclude year2038-recommended, not -required.
* doc/posix-headers/sys_types.texi, doc/posix-headers/time.texi:
* doc/year2038.texi: Mention this.
* m4/largefile.m4: Sync from Autoconf.  Override existing macros
if AC_SYS_YEAR2038_RECOMMENDED is not defined, rather than if
AC_SYS_LARGEFILE_REQUIRED is not defined.
* modules/largefile-required, modules/year2038-required: Removed.
* modules/year2038: Do not depend on largefile; simply
use m4/largefile.m4, since we shouldn’t need the extra goodies
largefile supplies.
* modules/year2038-recommended: New module.

13 files changed:
ChangeLog
MODULES.html.sh
NEWS
all-modules
doc/largefile.texi
doc/posix-headers/sys_types.texi
doc/posix-headers/time.texi
doc/year2038.texi
m4/largefile.m4
modules/largefile-required [deleted file]
modules/year2038
modules/year2038-recommended [new file with mode: 0644]
modules/year2038-required [deleted file]

index 1ceda3c354f1503d760ad9913957bda04b55bf6c..e25324c3debdc5c4f36a54610825aa7454db8800 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2023-04-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       year2038-recommended: new module
+       Remove year2038-required and largefile-required, replacing
+       the former with year2038-recommended and simply removing
+       the latter.  This syncs with Autoconf master.
+       * MODULES.html.sh, NEWS, doc/largefile.texi:
+       * all-modules (exclude): Exclude year2038-recommended, not -required.
+       * doc/posix-headers/sys_types.texi, doc/posix-headers/time.texi:
+       * doc/year2038.texi: Mention this.
+       * m4/largefile.m4: Sync from Autoconf.  Override existing macros
+       if AC_SYS_YEAR2038_RECOMMENDED is not defined, rather than if
+       AC_SYS_LARGEFILE_REQUIRED is not defined.
+       * modules/largefile-required, modules/year2038-required: Removed.
+       * modules/year2038: Do not depend on largefile; simply
+       use m4/largefile.m4, since we shouldn’t need the extra goodies
+       largefile supplies.
+       * modules/year2038-recommended: New module.
+
 2023-04-28  Bruno Haible  <bruno@clisp.org>
 
        stdio: Avoid different configure results in different testdirs.
index 5892711519b4fbf4634941566065ee67711175f0..01d8762fe5b04e4bd3be208a98a9cc08552d764b 100755 (executable)
@@ -1769,7 +1769,7 @@ func_all_modules ()
   func_module time-h
   func_module time_rz
   func_module year2038
-  func_module year2038-required
+  func_module year2038-recommended
   func_end_table
 
   element="Extra functions based on ANSI C 89"
@@ -2818,7 +2818,6 @@ func_all_modules ()
   func_module fts
   func_module isdir
   func_module largefile
-  func_module largefile-required
   func_module lchmod
   func_module lchown
   func_module mkancesdirs
diff --git a/NEWS b/NEWS
index fcfaf4906b125baa26e80d95d849de4d49f7501c..1457cb1413f8b8904852bae15ac1df1e183f1342 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -74,6 +74,12 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2023-04-28  largefile-required
+            year2038-required
+                            Modules removed, for consistency with Autoconf
+                            master.  Use new module year2038-recommended
+                            instead of year2038-required.
+
 2023-03-25  mtx             This module no longer provides the function
                             call_once.  To get this function, use the new
                             separate module 'call_once'.
index 5b742245cc34a1137678730925c0a1fb35c3dddb..571e2a97dbbe8122da66ad4e31cc7cdddd8dcbb2 100755 (executable)
@@ -89,7 +89,7 @@ exclude_for_mingw="$exclude_for_mingw forkpty-tests forkpty login_tty-tests logi
 exclude_for_msvc="$exclude_for_mingw"
 
 # Command-line option processing.
-exclude="year2038-required"
+exclude="year2038-recommended"
 while test $# -gt 0; do
   case "$1" in
     --for-mingw | --for-ming | --for-min | --for-mi )
index b5bfa5116a24c562f9e6a105bcc800ac6370c6ae..574753f10abb3a74356b599ce457878836adf051 100644 (file)
@@ -1,22 +1,25 @@
 @node Large File Support
 @section Large File Support
 
-The Gnulib @samp{largefile-required} module provides support for files
-2 GiB and larger, or with device or inode numbers exceeding 32 bits.
-To this effect, it ensures that types like @code{off_t} and
+This module provides support for files 2 GiB and larger, or with
+device or inode numbers exceeding 32 bits.
+To this effect, it attempts to ensure that types like @code{off_t} and
 @code{ino_t} are 64-bit,
 at least on the following platforms:
 glibc, Mac OS X, FreeBSD, NetBSD, OpenBSD, AIX, HP-UX, IRIX, Solaris,
 Cygwin, mingw, MSVC.
 
-The Gnulib @samp{largefile} module is similar, except that it gives
+If the types cannot be made 64-bit, @command{configure} issues a
+warning and proceeds.
+
+This module gives
 @command{configure} an option @samp{--disable-largefile} that
 suppresses support for large files.  This may be useful if the package
 links to other libraries whose user-facing ABIs still require
 @code{off_t} or most other file-related types to be 32-bit on your
 platform.
 
-Both modules also add to @command{configure} an option
+This module also adds to @command{configure} an option
 @code{--enable-year2038}, needed on some platforms to access files
 with timestamps past the year 2038.  @xref{Avoiding the year 2038
 problem}.
index 7590e7869508b96b2091c56473ec1ce3542a4ea5..8739cc2625d6062414bb4c65937594db537ee7c3 100644 (file)
@@ -38,7 +38,6 @@ are signed integer types that are wider than @code{long}:
 glibc x32
 @end itemize
 
-This module, together with the modules @code{largefile-required}
-or @code{largefile}, also defines the type
+This module, together with the module @code{largefile}, also defines the type
 @code{off_t} to a 64-bit integer type on some platforms:
 mingw, MSVC 14.
index 70814d6cda05e71b6c0b2f813fbed92a657df27a..c1e22b936903a4046940de86091c26497847b3a9 100644 (file)
@@ -18,8 +18,7 @@ expressions:
 NetBSD 5.0.
 @end itemize
 
-Portability problems fixed by the Gnulib module
-@code{year2038} or @code{year2038-required}:
+Portability problems fixed by the Gnulib module @code{year2038}:
 @itemize
 @item
 On some platforms where @code{time_t} defaults to 32-bit but can be
index f0f6d51516005c8c28b23682d5a9cd7ee454802a..59646018313cbf3f52cbd13b81b553346ab42ef2 100644 (file)
@@ -1,7 +1,7 @@
 @node Avoiding the year 2038 problem
 @section Avoiding the year 2038 problem
 
-The ``year 2038 problem'' denotes unpredictable behaviour that will
+The @dfn{year 2038 problem} denotes unpredictable behaviour that will
 likely occur in the year 2038, for programs that use a 32-bit signed
 integer @samp{time_t} type that cannot represent timestamps on or
 after 2038-01-19 03:14:08 UTC@.  See
@@ -26,32 +26,32 @@ suppresses support for post-2038 timestamps.  This may be useful if
 the package links to other libraries whose user-facing ABIs still
 require @code{time_t} to be 32-bit on your platform.
 
-The Gnulib module @samp{year2038-required} is like @samp{year2038},
-except it rejects platforms where @code{time_t} cannot represent
-timestamps after 2038, and it lacks a @option{--disable-year2038}
-option.  If this module is used and a 32-platform cannot support
+The Gnulib module @samp{year2038-recommended} is like @samp{year2038},
+except it by default rejects platforms where @code{time_t} cannot represent
+timestamps after 2038.  If this module is used and a 32-platform cannot support
 64-bit @code{time_t}, one can still fix the year-2038 problem by using
 a 64-bit instead of a 32-bit build, as noted in the architecture list
 below.  If all else fails one can configure with
-@samp{ac_year2038_required=no}; however, the resulting programs will
+@option{--disable-year2038}; however, the resulting programs will
 mishandle timestamps after 2038.
 
-The Gnulib module @samp{year2038-required} is
-recommended for packages intended for use on 32-bit platforms
-after the year 2038.  However, if your package needs to support
+The Gnulib module @samp{year2038-recommended} is designed
+for packages intended for use on 32-bit platforms
+after the year 2038.  If your package is commonly built on
 32-bit platforms that will not be used after the year 2038,
-you can use the @samp{year2038} module instead.
+you can use the @samp{year2038} module instead, to save builders
+the trouble of configuring with @option{--disable-year2038}.
 
 If the Gnulib module @samp{largefile} is used but neither
-@samp{year2038} nor @samp{year2038-required} is used,
+@samp{year2038} nor @samp{year2038-recommended} is used,
 @command{configure} will have an option @option{--enable-year2038}
 that causes @code{configure} to behave as if @samp{year2038} was used.
 This is for packages that have long used @samp{largefile} but have not
 gotten around to upgrading their Gnulib module list to include
-@samp{year2038} or @samp{year2038-required}.
+@samp{year2038} or @samp{year2038-recommended}.
 @xref{Large File Support}.
 
-With the @samp{year2038-required} module, @command{configure} by
+With the @samp{year2038-recommended} module, @command{configure} by
 default should work on the following 32-bit platforms (or 32-bit ABIs
 in bi-arch systems):
 
@@ -70,18 +70,18 @@ OpenBSD 5.5 (2014) and later on x86,
 @item
 FreeBSD/arm,
 @item
-Minix 3.3.
+Minix 3.3 (2014).
 @end itemize
 
 @noindent
-Whereas @command{configure} with @samp{year2038-required} will fail on
-earlier versions of the abovementioned platforms if a version is listed,
-and it will also fail on all versions of the following older 32-bit
-platforms or ABIs:
+Whereas with @samp{year2038-recommended}, @command{configure} should
+by default fail on earlier versions of the abovementioned platforms if
+a version is listed, and it should also by default fail on all
+versions of the following older 32-bit platforms or ABIs:
 
 @itemize
 @item
-Android,
+Android on ARMv7 or x86,
 @item
 Mac OS X 10.6 (2009) and earlier on x86 and powerpc,
 @item
index 46b019a670157be2cf842980a25a37c45a6db9bd..8d4bb7c2e222e1a3ee261a9efed781ab26e7e5c4 100644 (file)
@@ -24,8 +24,8 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
  ]])
 )
 
-m4_ifndef([AC_SYS_LARGEFILE_REQUIRED], [
-# Support AC_SYS_LARGEFILE_REQUIRED and Y2038 macros, even if
+m4_ifndef([AC_SYS_YEAR2038_RECOMMENDED], [
+# Support AC_SYS_YEAR2038_RECOMMENDED and related macros, even if
 # Autoconf 2.71 or earlier.  This code is taken from Autoconf master.
 
 # _AC_SYS_YEAR2038_TEST_CODE
@@ -58,8 +58,8 @@ m4_define([_AC_SYS_YEAR2038_OPTIONS], m4_normalize(
                                       dnl 32-bit MinGW (misconfiguration)
 ))
 
-# _AC_SYS_YEAR2038_PROBE([IF-NOT-DETECTED])
-# -----------------------------------------
+# _AC_SYS_YEAR2038_PROBE
+# ----------------------
 # Subroutine of AC_SYS_YEAR2038.  Probe for time_t that can represent
 # time points more than 2**31 - 1 seconds after the epoch (dates after
 # 2038-01-18, see above) and set the cache variable ac_cv_sys_year2038_opts
@@ -72,13 +72,10 @@ m4_define([_AC_SYS_YEAR2038_OPTIONS], m4_normalize(
 # AC_TRY_RUN.  Note also that some systems only support large time_t
 # together with large off_t.
 #
-# If support is not detected, the behavior depends on which of the
-# top-level AC_SYS_YEAR2038 macros was used (see below).
-#
 # If you change this macro you may also need to change
 # _AC_SYS_YEAR2038_OPTIONS.
 AC_DEFUN([_AC_SYS_YEAR2038_PROBE],
-[AC_CACHE_CHECK([for $CC option to enable timestamps after Jan 2038],
+[AC_CACHE_CHECK([for $CC option for timestamps after 2038],
   [ac_cv_sys_year2038_opts],
   [ac_save_CPPFLAGS="$CPPFLAGS"
   ac_opt_found=no
@@ -97,29 +94,7 @@ ac_have_year2038=yes
 AS_CASE([$ac_cv_sys_year2038_opts],
   ["none needed"], [],
   ["support not detected"],
-    [ac_have_year2038=no
-     AS_CASE([$ac_year2038_required,$enable_year2038],
-      [yes,*],
-        [AC_MSG_FAILURE([support for timestamps after Jan 2038 is required])],
-      [*,yes],
-        [# If we're not cross compiling and 'touch' works with a large
-        # timestamp, then we can presume the system supports wider time_t
-        # *somehow* and we just weren't able to detect it.  One common
-        # case that we deliberately *don't* probe for is a system that
-        # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
-        # wide time_t.  (It would be inappropriate for us to override an
-        # intentional use of -m32.)  Error out, demanding use of
-        # --disable-year2038 if this is intentional.
-        AS_IF([test $cross_compiling = no],
-          [AS_IF([TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null],
-            [AS_CASE([`TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null`],
-              [*'Feb  7  2106'* | *'Feb  7 17:10'*],
-              [AC_MSG_FAILURE(m4_text_wrap(
-      [this system appears to support timestamps after January 2038,
-       but no mechanism for enabling wide 'time_t' was detected.
-       Did you mean to build a 64-bit binary? (e.g. 'CC="${CC} -m64"'.)
-       To proceed with 32-bit time_t, configure with '--disable-year2038'.],
-      [], [], [55]))])])])])],
+    [ac_have_year2038=no],
 
   ["-D_TIME_BITS=64"],
     [AC_DEFINE([_TIME_BITS], [64],
@@ -132,7 +107,7 @@ AS_CASE([$ac_cv_sys_year2038_opts],
   ["-U_USE_32_BIT_TIME_T"*],
     [AC_MSG_FAILURE(m4_text_wrap(
       [the 'time_t' type is currently forced to be 32-bit.
-       It will stop working after January 2038.
+       It will stop working after mid-January 2038.
        Remove _USE_32BIT_TIME_T from the compiler flags.],
       [], [], [55]))],
 
@@ -142,44 +117,23 @@ AS_CASE([$ac_cv_sys_year2038_opts],
 
 # _AC_SYS_YEAR2038_ENABLE
 # -----------------------
-# Subroutine of AC_SYS_YEAR2038 and _AC_SYS_YEAR2038_OPT_IN.
 # Depending on which of the YEAR2038 macros was used, add either an
-# --enable-year2038, or a --disable-year2038, or no option at all to
-# the configure script.  Note that this is expanded very late and
+# --enable-year2038 or a --disable-year2038 to
+# the configure script.  This is expanded very late and
 # therefore there cannot be any code in the AC_ARG_ENABLE.  The
 # default value for 'enable_year2038' is emitted unconditionally
 # because the generated code always looks at this variable.
 m4_define([_AC_SYS_YEAR2038_ENABLE],
 [m4_divert_text([DEFAULTS],
-  m4_provide_if([AC_SYS_YEAR2038_REQUIRED],
-    [ac_year2038_required=yes],
-    [ac_year2038_required=no]))dnl
-m4_divert_text([DEFAULTS],
   m4_provide_if([AC_SYS_YEAR2038],
     [enable_year2038=yes],
     [enable_year2038=no]))]dnl
-[m4_provide_if([AC_SYS_YEAR2038_REQUIRED], [],
 [AC_ARG_ENABLE([year2038],
   m4_provide_if([AC_SYS_YEAR2038],
     [AS_HELP_STRING([--disable-year2038],
-      [omit support for dates after Jan 2038])],
+      [don't support timestamps after 2038])],
     [AS_HELP_STRING([--enable-year2038],
-      [include support for dates after Jan 2038])]))])])
-
-# _AC_SYS_YEAR2038_OPT_IN
-# -----------------------
-# If the --enable-year2038 option is given to configure, attempt to
-# detect and activate support for large time_t on 32-bit systems.
-# This macro is automatically invoked by AC_SYS_LARGEFILE when large
-# *file* support is detected.  It does not AC_REQUIRE AC_SYS_LARGEFILE
-# to avoid a dependency loop, and is therefore unsafe to expose as a
-# documented macro.
-AC_DEFUN([_AC_SYS_YEAR2038_OPT_IN],
-[m4_provide_if([_AC_SYS_YEAR2038_PROBE], [], [dnl
-  AS_IF([test "$ac_year2038_required,$enable_year2038" != no,no],
-    [_AC_SYS_YEAR2038_PROBE])
-  AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])
-])])
+      [support timestamps after 2038])]))])
 
 # AC_SYS_YEAR2038
 # ---------------
@@ -187,28 +141,39 @@ AC_DEFUN([_AC_SYS_YEAR2038_OPT_IN],
 # On systems where time_t is not always 64 bits, this probe can be
 # skipped by passing the --disable-year2038 option to configure.
 AC_DEFUN([AC_SYS_YEAR2038],
-[m4_provide_if([AC_SYS_LARGEFILE_REQUIRED], [],
-  [AC_REQUIRE([AC_SYS_LARGEFILE])])]dnl
-[m4_provide_if([_AC_SYS_YEAR2038_PROBE], [], [dnl
-  AS_IF([test "$ac_year2038_required,$enable_year2038" != no,no],
-    [_AC_SYS_YEAR2038_PROBE])
-  AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])
-])])
+[AC_REQUIRE([AC_SYS_LARGEFILE])dnl
+AS_IF([test "$enable_year2038,$ac_have_year2038,$cross_compiling" = yes,no,no],
+ [# If we're not cross compiling and 'touch' works with a large
+  # timestamp, then we can presume the system supports wider time_t
+  # *somehow* and we just weren't able to detect it.  One common
+  # case that we deliberately *don't* probe for is a system that
+  # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
+  # wide time_t.  (It would be inappropriate for us to override an
+  # intentional use of -m32.)  Error out, demanding use of
+  # --disable-year2038 if this is intentional.
+  AS_IF([TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null],
+    [AS_CASE([`TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null`],
+       [*'Feb  7  2106'* | *'Feb  7 17:10'*],
+       [AC_MSG_FAILURE(m4_text_wrap(
+         [this system appears to support timestamps after mid-January 2038,
+          but no mechanism for enabling wide 'time_t' was detected.
+          Did you mean to build a 64-bit binary? (E.g., 'CC="${CC} -m64"'.)
+          To proceed with 32-bit time_t, configure with '--disable-year2038'.],
+         [], [], [55]))])])])])
 
-# AC_SYS_YEAR2038_REQUIRED
-# ------------------------
-# Same as AC_SYS_YEAR2038, but declares that this program *requires*
-# support for large time_t.  If we cannot find any way to make time_t
-# capable of representing values larger than 2**31 - 1, configure will
-# error out.  Furthermore, no --enable-year2038 nor --disable-year2038
-# option will be available.
-AC_DEFUN([AC_SYS_YEAR2038_REQUIRED],
-[m4_provide_if([AC_SYS_LARGEFILE_REQUIRED], [],
-  [AC_REQUIRE([AC_SYS_LARGEFILE])])]dnl
-[m4_provide_if([_AC_SYS_YEAR2038_PROBE], [], [dnl
-  _AC_SYS_YEAR2038_PROBE
-  AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])
-])])
+# AC_SYS_YEAR2038_RECOMMENDED
+# ---------------------------
+# Same as AC_SYS_YEAR2038, but recommend support for large time_t.
+# If we cannot find any way to make time_t capable of representing
+# values larger than 2**31 - 1, error out unless --disable-year2038 is given.
+AC_DEFUN([AC_SYS_YEAR2038_RECOMMENDED],
+[AC_REQUIRE([AC_SYS_YEAR2038])dnl
+AS_IF([test "$enable_year2038,$ac_have_year2038" = yes,no],
+   [AC_MSG_FAILURE(m4_text_wrap(
+      [could not enable timestamps after mid-January 2038.
+       Did you mean to build a 64-bit binary? (E.g., 'CC="${CC} -m64"'.)
+       To proceed with 32-bit time_t, configure with '--disable-year2038'.],
+      [], [], [55]))])])
 
 # _AC_SYS_LARGEFILE_TEST_CODE
 # ---------------------------
@@ -285,9 +250,7 @@ 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],
-       [AC_MSG_FAILURE([support for large files is required])])],
+    [ac_have_largefile=no],
 
   ["-D_FILE_OFFSET_BITS=64"],
     [AC_DEFINE([_FILE_OFFSET_BITS], [64],
@@ -303,30 +266,9 @@ AS_CASE([$ac_cv_sys_largefile_opts],
   [AC_MSG_ERROR(
     [internal error: bad value for \$ac_cv_sys_largefile_opts])])
 
-_AC_SYS_YEAR2038_OPT_IN
-])
-
-# _AC_SYS_LARGEFILE_ENABLE
-# ------------------------
-# Subroutine of AC_SYS_LARGEFILE.  If AC_SYS_LARGEFILE_REQUIRED was
-# not used at any point in this configure script, add a
-# --disable-largefile option to the configure script.  Note that this
-# is expanded very late and therefore there cannot be any code in the
-# AC_ARG_ENABLE.  The default value for 'enable_largefile' is emitted
-# unconditionally because the generated shell code always looks at
-# this variable.
-m4_define([_AC_SYS_LARGEFILE_ENABLE],
-[m4_divert_text([DEFAULTS],
-  m4_provide_if([AC_SYS_LARGEFILE_REQUIRED],
-    [ac_largefile_required=yes],
-    [ac_largefile_required=no]))dnl
-m4_divert_text([DEFAULTS],
-  [enable_largefile=yes])]dnl
-[m4_provide_if([AC_SYS_LARGEFILE_REQUIRED], [],
-   [m4_provide_if([AC_SYS_YEAR2038_REQUIRED], [],
-      [AC_ARG_ENABLE([largefile],
-         [AS_HELP_STRING([--disable-largefile],
-           [omit support for large files])])])])])
+AS_IF([test "$enable_year2038" != no],
+  [_AC_SYS_YEAR2038_PROBE])
+AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])])
 
 # AC_SYS_LARGEFILE
 # ----------------
@@ -337,30 +279,13 @@ m4_divert_text([DEFAULTS],
 # Additionally, on Linux file systems with 64-bit inodes a file that happens
 # to have a 64-bit inode number cannot be accessed by 32-bit applications on
 # Linux x86/x86_64.  This can occur with file systems such as XFS and NFS.
-# This macro allows configuration to continue if the system doesn't support
-# large files; see also AC_SYS_LARGEFILE_REQUIRED.
 AC_DEFUN([AC_SYS_LARGEFILE],
-[m4_provide_if([_AC_SYS_LARGEFILE_PROBE], [], [dnl
-  AS_IF([test "$ac_largefile_required,$enable_largefile,$ac_year2038_required" != no,no,no],
-    [_AC_SYS_LARGEFILE_PROBE])
-  AC_CONFIG_COMMANDS_PRE([_AC_SYS_LARGEFILE_ENABLE])
-])])
-
-# AC_SYS_LARGEFILE_REQUIRED
-# -------------------------
-# Same as AC_SYS_LARGEFILE, but declares that this program *requires*
-# support for large files.  If we cannot find a combination of compiler
-# options and #defines that makes 'off_t' capable of representing 2**63 - 1,
-# 'configure' will error out.  Furthermore, 'configure' will not offer a
-# --disable-largefile command line option.
-# If both AC_SYS_LARGEFILE and AC_SYS_LARGEFILE_REQUIRED are used in the
-# same configure script -- in either order -- AC_SYS_LARGEFILE_REQUIRED wins.
-AC_DEFUN([AC_SYS_LARGEFILE_REQUIRED],
-[m4_provide_if([_AC_SYS_LARGEFILE_PROBE], [], [dnl
-  _AC_SYS_LARGEFILE_PROBE
-  AC_CONFIG_COMMANDS_PRE([_AC_SYS_LARGEFILE_ENABLE])
-])])
-])# m4_ifndef AC_SYS_LARGEFILE_REQUIRED
+[AC_ARG_ENABLE([largefile],
+   [AS_HELP_STRING([--disable-largefile],
+      [omit support for large files])])dnl
+AS_IF([test "$enable_largefile,$enable_year2038" != no,no],
+  [_AC_SYS_LARGEFILE_PROBE])])
+])# m4_ifndef AC_SYS_YEAR2038_RECOMMENDED
 
 # Enable large files on systems where this is implemented by Gnulib, not by the
 # system headers.
diff --git a/modules/largefile-required b/modules/largefile-required
deleted file mode 100644 (file)
index eea5ecf..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-Description:
-Require support for files 2 GiB and larger.
-
-Comment:
-This module should not be used as a dependency from a test module,
-otherwise when this module occurs as a tests-related module, it will
-have side effects on the compilation of the main modules in lib/.
-
-Files:
-m4/largefile.m4
-
-Depends-on:
-largefile
-
-configure.ac:
-AC_REQUIRE([AC_SYS_LARGEFILE_REQUIRED])
-
-configure.ac:
-
-Makefile.am:
-
-Include:
-
-License:
-LGPLv2+
-
-Maintainer:
-all
index c44d4dc86896cddd5624df3475caa15e31ce2882..be0124051384729cf5551a8210cabc96ef8d3b35 100644 (file)
@@ -7,9 +7,9 @@ otherwise when this module occurs as a tests-related module, it will
 have side effects on the compilation of the main modules in lib/.
 
 Files:
+m4/largefile.m4
 
 Depends-on:
-largefile
 
 configure.ac-early:
 AC_REQUIRE([AC_SYS_YEAR2038])
diff --git a/modules/year2038-recommended b/modules/year2038-recommended
new file mode 100644 (file)
index 0000000..69109d8
--- /dev/null
@@ -0,0 +1,25 @@
+Description:
+Ensure that 'time_t' can go past the year 2038.
+
+Comment:
+This module should not be used as a dependency from a test module,
+otherwise when this module occurs as a tests-related module, it will
+have side effects on the compilation of the main modules in lib/.
+
+Files:
+m4/largefile.m4
+
+Depends-on:
+
+configure.ac-early:
+AC_REQUIRE([AC_SYS_YEAR2038_RECOMMENDED])
+
+Makefile.am:
+
+Include:
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/year2038-required b/modules/year2038-required
deleted file mode 100644 (file)
index 29dd556..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-Description:
-Ensure that 'time_t' can go past the year 2038.
-
-Comment:
-This module should not be used as a dependency from a test module,
-otherwise when this module occurs as a tests-related module, it will
-have side effects on the compilation of the main modules in lib/.
-
-Files:
-m4/largefile.m4
-
-Depends-on:
-largefile-required
-
-configure.ac-early:
-AC_REQUIRE([AC_SYS_YEAR2038_REQUIRED])
-
-Makefile.am:
-
-Include:
-
-License:
-LGPLv2+
-
-Maintainer:
-all