nstrftime: Merge glibc strftime changes.
authorBruno Haible <bruno@clisp.org>
Tue, 6 Feb 2024 20:32:13 +0000 (21:32 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 6 Feb 2024 20:32:13 +0000 (21:32 +0100)
This incorporates:
2023-02-07 Use 64-bit time_t interfaces in strftime and strptime

* lib/strftime.c [_LIBC] (time_t, __gmtime_r, mktime): Define as macros.
* config/srclist.txt: Update comment regarding glibc/time/strftime_l.c.

ChangeLog
config/srclist.txt
lib/strftime.c

index 2cf6449d46477bd97e0c3bff21c712437c3fb8df..0a1fe4e5cb2b1b13e5c829b85bb58498865dcc9d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-02-06  Bruno Haible  <bruno@clisp.org>
+
+       nstrftime: Merge glibc strftime changes.
+       This incorporates:
+       2023-02-07 Use 64-bit time_t interfaces in strftime and strptime
+       * lib/strftime.c [_LIBC] (time_t, __gmtime_r, mktime): Define as macros.
+       * config/srclist.txt: Update comment regarding glibc/time/strftime_l.c.
+
 2024-02-06  Bruno Haible  <bruno@clisp.org>
 
        nstrftime, fprintftime: Simplify.
index ed61936b6479bedc4b8579c530fa97a55ac85a4b..78f77aafd27357cd66ae89961712daf06f035474 100644 (file)
@@ -164,7 +164,7 @@ $LIBCSRC time/mktime-internal.h             lib
 #$LIBCSRC sysdeps/unix/dirfd.c         lib gpl
 #$LIBCSRC sysdeps/unix/grantpt.c       lib gpl
 #$LIBCSRC sysdeps/unix/rmdir.c         lib gpl
-#$LIBCSRC time/strftime.c              lib gpl
+#$LIBCSRC time/strftime_l.c            lib gpl (strftime.c)
 # These are close, but we are using the gettext versions.
 #$LIBCSRC misc/mkdtemp.c               lib gpl
 #$LIBCSRC stdlib/setenv.c              lib gpl (setenv.c, unsetenv.c)
index e32cf5bfb07f48587869ab679e10df5aa3b96075..cf0a81d95e1453abe1c9e70b5a62341bcbfbd4d2 100644 (file)
@@ -121,6 +121,10 @@ extern char *tzname[];
 # define mktime_z(tz, tm) mktime (tm)
 # define tzname __tzname
 # define tzset __tzset
+
+# define time_t __time64_t
+# define __gmtime_r(t, tp) __gmtime64_r (t, tp)
+# define mktime(tp) __mktime64 (tp)
 #endif
 
 #ifndef FPRINTFTIME