]> Savannah Git Hosting - gnulib.git/commit
year2038: support glibc 2.34 _TIME_BITS=64
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 2 Jul 2021 02:29:57 +0000 (19:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 2 Jul 2021 02:33:19 +0000 (19:33 -0700)
commitdc09dc0888485698a8e74205b9df43159aef0f61
treedde82a14a7d2a34c2d72f6decfc7b60fe6ee63a8
parenta1b12914220e2dd1619f2362e384492406231827
year2038: support glibc 2.34 _TIME_BITS=64

In glibc 2.34 on Linux kernels where time_t is traditionally 32-bit,
defining _FILE_OFFSET_BITS=64 and _TIME_BITS=64 makes time_t 64-bit.
Apps must define both macros.  Gnulib applications that use either
the largefile or the year2038 modules will want this behavior;
largefile because it deals with the off_t and ino_t components of
struct stat already, and so should also deal with time_t.
* NEWS, doc/largefile.texi, doc/posix-headers/time.texi:
Mention this.
* m4/largefile.m4: Override two macros even in Autoconf 2.70 and later.
(_AC_SYS_LARGEFILE_MACRO_VALUE): #undef $1 before #defining it, in
case some other Gnulib macro has #defined it.
(AC_SYS_LARGEFILE): Use AS_IF and AS_CASE to propagate AC_REQUIREs.
Invoke gl_YEAR2038_BODY if we need to set _FILE_OFFSET_BITS=64.
* m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): New macro.
(gl_YEAR2038_BODY): New macro, with gl_YEAR2038’s old body; this
macro is designed to be used directly instead of being
AC_REQUIREd.  It takes an argument specifying whether 64-bit is
required.  Set _TIME_BITS=64 if this makes a difference in time_t
width when setting _FILE_OFFSET_BITS=64.  Do not warn about
32-bit time_t more than once.
* modules/largefile (Files): Add year2038.m4.
(Depends-on): Require gl_YEAR2038_EARLY.
ChangeLog
NEWS
doc/largefile.texi
doc/posix-headers/time.texi
m4/largefile.m4
m4/year2038.m4
modules/largefile