diff --git a/NEWS b/NEWS index eafd7d69..0f71628d 100644 --- a/NEWS +++ b/NEWS @@ -27,36 +27,33 @@ GNU Autoconf NEWS - User visible changes. ** New features *** New macros AC_SYS_YEAR2038 and AC_SYS_YEAR2038_REQUIRED.  These macros attemptmacro AC_SYS_YEAR2038.  This causes 'configure' to enlargewiden time_t to 64 bits,if possible on systems where it has historically been only 32 bits wide, and therefore (assuming  the usual Unix epoch)time_t by default cannot represent datesfile and other timestamps after mid-January of  2038 (hence the names). The difference between the twoJanuary 2038. Widening is that  AC_SYS_YEAR2038_REQUIRED unconditionally causes 'configure' to error  out if 64-bit time_t is not available.  Enlarging time_t to 64 bits is likely to have the side effect of  enlarging off_tpossible only on 32-bit GNU/Linux x86 and related types to 64 bits as well, as if you  had used AC_SYS_LARGEFILE. See the manual for details.  Library authors should be cautious about adding these macros to  theirARM systems with glibc 2.34 or later. To prevent widening, configure scripts; they can break binary backward compatibility. *** New macro AC_SYS_LARGEFILE_REQUIRED.with --disable-year2038. This macro isalso has the sameeffects as the existing AC_SYS_LARGEFILE exceptAC_SYS_LARGEFILE, because in  practice time_t cannot be widened without large-file sypport.  Application and library builders should take care that it will cause 'configure'packages  configured with --enable-year2038 and --disable-year2038 options  are configured consistently, to error out if 64-bit off_tavoid breaking binary compatibility.  This is not available,similar to longstanding consistency requirements with  --enable-largefile and it does not provide a --disable-largefile option.--disable-largefile. *** AC_SYS_LARGEFILE now optionally arranges to enlargewiden time_t. As an experimental measure to make it easierIt now acts like AC_SYS_YEAR2038, except 'configure' defaults to rebuild old programs--disable-year2038 unless AC_SYS_YEAR2038 is also present.  As with support for dates after Jan 2038, if you regenerate anyAC_SYS_YEAR2038, application and library builders should configure script that usesconsistently. *** New macros AC_SYS_LARGEFILE_REQUIRED and AC_SYS_YEAR2038_REQUIRED.  These act like AC_SYS_LARGEFILE (but not AC_SYS_YEAR2038) using  Autoconf 2.72, it will gain an --enable-year2038 option. When the  program is configured with this option, time_t will be enlarged if  possible, as ifand AC_SYS_YEAR2038 had been used.  Using this option in arespectively,  except that they require large-file and year-2038 support respectively.  As with AC_SYS_YEAR2038, application and library build also potentially breaks binary  backward compatibility.builders should  configure consistently. *** AC_USE_SYSTEM_EXTENSIONS now enables C23 Annex F extensions by defining __STDC_WANT_IEC_60559_EXT__. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index df96280b..ce214284 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8798,71 +8798,109 @@ if the system supports @samp{#!}, @samp{no} if not. @defmac AC_SYS_LARGEFILE @acindex{SYS_LARGEFILE} @cvindex _FILE_OFFSET_BITS @cvindex _TIME_BITS @ovindex CC @cindex Large file support @cindex LFS If the default @code{off_t} type is a 32-bit integer, and therefore cannot be usedto work with files larger than 4 gigabytes, arrange to2 GiB or larger, make a largerwider @code{off_t} available,available if the system supports this. Severalit. Similarly, widen other types related tothe sizes of files and file systems will also be enlarged: @code{ino_t},if possible. These types may include @code{blkcnt_t}, @code{dev_t}, @code{ino_t}, @code{fsblkcnt_t}, @code{fsfilcnt_t}, and possibly @code{dev_t}.@code{rlim_t}. Also, arrange for a @command{configure} option @code{--enable-year2038} to request widening the type @code{time_t} as needed to represent file wand other timestamps after January 2038. This widening is possible only on 32-bit GNU/Linux x86 and ARM systems with glibc 2.34 or later. If year-2038 support is requested but @command{configure} fails to find a large @code{off_t}way to widen @code{time_t} and inspection of the system suggests that this feature is available (whethersomehow, @command{configure} will error out. If you want the default to be @code{--enable-year2038}, you can use @code{AC_SYS_YEAR2038} instead of @code{AC_SYS_LARGEFILE}. In other words, older packages that have long used @code{AC_SYS_LARGEFILE} can have year-2038 support on 32-bit GNU/Linux x86 and ARM systems either by regenerating @file{configure} with current Autoconf and configuring with @option{--enable-year2038}, or not any arrangements were necessary),by using @code{AC_SYS_YEAR2038} and configuring without @option{--disable-year2038}. A future version of Autoconf might change the @code{AC_SYS_LARGEFILE} default to @code{--enable-year2038}; if and when that happens, @code{AC_SYS_LARGEFILE} and @code{AC_SYS_YEAR2038} will become equivalent. @xref{AC_SYS_YEAR2038}. Set the shell variable @code{ac_have_largefile}will be set to @samp{yes}; if not, it will beto @samp{yes} or @code{no} depending on whether a wide @code{off_t} is available, regardless of whether arrangements were necessary. Similarly, set the shell variable @code{ac_have_year2038} to @samp{no}. Preprocessor@code{yes} or @code{no} depending on whether a wide-enough @code{time_t} is available. Define preprocessor macroswill be defined if necessary to make a larger @code{off_t} available. (Fortypes wider; for example, on manyGNU/Linux systems the macromacros @code{_FILE_OFFSET_BITS} willand @code{_TIME_BITS} can be defined.)defined. Some of these macrosonly work only ifthey are defined before the first system header is included; therefore, when using this macro in concert with @code{AC_CONFIG_HEADERS}, make sure that @file{config.h} is included before any system headers. On a few olderobsolete IRIX systems, also change the output variable @code{CC}will also be changed to addspecial compiler optionsthat are needed to enable largefor wide @code{off_t}. Large-file support can be disabled by configuring with the @option{--disable-largefile} option. Note that this hasoption, and year-2038 support can be enabled and disabled via the @option{--enable-year2038} and @option{--disable-year2038} options. These options have no effect on systems where @code{off_t} is 64 bits or largertypes are wide enough by default. Large-file support is required for year-2038 support: if you configure with @option{--disable-largefile} on a platform with 32-bit @code{time_t}, then year-2038 support is not available. Disabling large-file or year-2038 support can have surprising effects, such as causing functions like @code{readdir} and @code{stat} to fail even on a small files (because their @emph{inode numbers} are unrepresentable).file because its inode number or timestamp is out of range. Regardless of whether you use this macro, portable programs should not assume that any of the types listed above fit into a @code{long int}. For example, it is not correctportable to print an arbitrary @code{off_t} or @code{time_t} value @code{X} with @code{printf ("%ld", (long int) X)}. Note that theThe standard C library functions @code{fseek} and @code{ftell} do not use @code{off_t}. If you need to use either of these functions, you should use @code{AC_FUNC_FSEEKO} as well as @code{AC_SYS_LARGEFILE}, and then use their Posix replacements @code{fseeko} and @code{ftello}, which @emph{do} use @code{off_t}, when available.@code{ftello}. @xref{AC_FUNC_FSEEKO}. As of Autoconf 2.72,When using @code{AC_SYS_LARGEFILE} also @emph{optionally} arranges to enlarge @code{time_t}. Thisin different packages that are linked together and that have interfaces that depend on the width of @code{off_t}, @code{time_t} or related types, the simplest thing is tomake it easier to build programs that support timestamps after 2038; many configure scripts will not need to be modified, only regenerated with newer Autoconf. Whenall components the same way. For example, if an application uses @code{AC_SYS_LARGEFILE}is used, and@code{AC_SYS_YEAR2038} is @emph{not} used, @code{time_t} will normallyconfigured with @option{--enable-year2038}, libraries it links to with an @code{off_t}- or @code{time_t}-dependent interface should be left at the system's default size, butconfigured equivalently. Alternatively, you can request it be enlarged by configuring with the @option{--enable-year2038} option. (When @code{AC_SYS_YEAR2038}modify libraries to support both 32- and 64-bit interfaces though this is also used,more work and few libraries other than the C library itself are modified in this way. Applications and libraries should be configured compatibly. If @code{off_t}, @code{time_t} is enlargedor related types appear in a library's public interface, enabling or disabling the library's large-file or year-2038 support may break binary compatibility with applications or with other libraries. Similarly, if possible. @xref{AC_SYS_YEAR2038}.)an application links to a such a library, enabling or disabling the application's large-file support may break binary compatibility with that library. @end defmac @defmac AC_SYS_LARGEFILE_REQUIRED @acindex{SYS_LARGEFILE_REQUIRED} This macro has the same effect as @code{AC_SYS_LARGEFILE}, but also declares that the program being configured @emph{requires}requires support for large files. If a large @code{off_t} is unavailable, @command{configure} will error out. The @option{--disable-largefile} option will not be available. @end defmac Large-file and year-2038 support for applications and libraries should be configured compatibly. @xref{AC_SYS_LARGEFILE}. @end defmac @anchor{AC_SYS_LONG_FILE_NAMES} @defmac AC_SYS_LONG_FILE_NAMES @@ -8885,55 +8923,24 @@ system. If so, set the shell variable @code{ac_cv_sys_posix_termios} to @anchor{AC_SYS_YEAR2038} @defmac AC_SYS_YEAR2038 @acindex{SYS_YEAR2038} @cvindex _TIME_BITS @cindex Year 2038 If the default @code{time_t} typeThis is a signed 32-bit integer, and therefore (assuming the usual Unix epoch) cannot represent timestamps after mid-January of 2038, arrange to make a larger @code{time_t} available, if the system supports this. If a large @code{time_t} is available (whether or not any arrangements were necessary), the shell variable @code{ac_have_year2038} will be set to @samp{yes}; if not,like @code{AC_SYS_LARGEFILE} except it will be setdefaults to @samp{no}. Preprocessor macros will be defined if necessary to make a larger @code{time_t} available. (For example, on some systems the macro @code{_TIME_BITS} will be defined.) Someenabling instead of these macros only work if they are defined before the first system header is included; therefore, when using this macro in concert with @code{AC_CONFIG_HEADERS}, make sure that @file{config.h} is included before any system headers. Supportdisabling year-2038 support. Year-2038 support for timestamps after 2038 can be disabled by configuring with the @option{--disable-year2038} option. Note that this has no effect on systems where @code{time_t} is 64 bits or larger by default. If this option is @emph{not} given,applications and @command{configure} fails to find a way to enable a large @code{time_t}, but inspection of the system suggests that this feature is available @emph{somehow}, it will error out. Regardless of whether you use this macro, portable programslibraries should not assume that @code{time_t} fits into @code{long int}. For example, it is not correct to print an arbitrary @code{time_t} value @code{X} with @code{printf ("%ld", (long int) X)}. @strong{Caution:} If you are developing a shared library, and @code{time_t} appears anywhere in your library's public interface, use of this macro may break binary compatibility with older executables.be configured compatibly. @xref{AC_SYS_LARGEFILE}. @end defmac @defmac AC_SYS_YEAR2038_REQUIRED @acindex{SYS_YEAR2038_REQUIRED} This macro has the same effect as @code{AC_SYS_YEAR2038}, but also declares that the program being configured @emph{requires}requires support for timestamps after mid-January of 2038. If a large @code{time_t} is unavailable, @command{configure} will @emph{unconditionally}unconditionally error out (unlike the behavior of @code{AC_SYS_YEAR2038}).out. The @option{--disable-year2038} option will not be available. @strong{Caution:} If you are developing a shared library,Year-2038 support for applications and @code{time_t} appears anywhere in your library's public interface, use of this macro may break binary compatibility with older executables.libraries should be configured compatibly. @xref{AC_SYS_YEAR2038}. @end defmac @node C and Posix Variants