* towards c_nstrftime, part 2
@ 2024-02-06 20:37 Bruno Haible
0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2024-02-06 20:37 UTC (permalink / raw)
To: bug-gnulib
There was some change to strftime in glibc. Let me pull it in, to reduce
the diffs. Also, they moved the code from time/strftime.c to time/strftime_l.c.
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.
diff --git a/config/srclist.txt b/config/srclist.txt
index ed61936b64..78f77aafd2 100644
--- a/config/srclist.txt
+++ b/config/srclist.txt
@@ -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)
diff --git a/lib/strftime.c b/lib/strftime.c
index e32cf5bfb0..cf0a81d95e 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-06 20:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 20:37 towards c_nstrftime, part 2 Bruno Haible
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).