]> Savannah Git Hosting - gnulib.git/commitdiff
autoupdate
authorKarl Berry <karl@freefriends.org>
Fri, 4 Oct 2024 14:58:08 +0000 (07:58 -0700)
committerKarl Berry <karl@freefriends.org>
Fri, 4 Oct 2024 14:58:08 +0000 (07:58 -0700)
lib/mktime-internal.h
lib/timegm.c

index 3e2848c121042470a9c17e2426496b99231be659..0693aaf14028c24ef6c31740f2b033cc9806e13f 100644 (file)
@@ -71,8 +71,9 @@ typedef int mktime_offset_t;
 #endif
 
 /* Subroutine of mktime.  Return the time_t representation of TP and
-   normalize TP, given that a struct tm * maps to a time_t.  If
-   LOCAL, the mapping is performed by localtime_r, otherwise by gmtime_r.
-   Record next guess for localtime-gmtime offset in *OFFSET.  */
-extern __time64_t __mktime_internal (struct tm *tp, bool local,
+   normalize TP, given that a struct tm * maps to a time_t as performed
+   by FUNC.  Record next guess for localtime-gmtime offset in *OFFSET.  */
+extern __time64_t __mktime_internal (struct tm *tp,
+                                     struct tm *(*func) (__time64_t const *,
+                                                         struct tm *),
                                      mktime_offset_t *offset) attribute_hidden;
index 1f1f66c61b84773937fea094dd3bf09d0c40c6c1..e5cf30c0198520caf5e6ca31df0f45f310122d90 100644 (file)
@@ -31,7 +31,7 @@ __timegm64 (struct tm *tmp)
 {
   static mktime_offset_t gmtime_offset;
   tmp->tm_isdst = 0;
-  return __mktime_internal (tmp, false, &gmtime_offset);
+  return __mktime_internal (tmp, __gmtime64_r, &gmtime_offset);
 }
 
 #if defined _LIBC && __TIMESIZE != 64