]> Savannah Git Hosting - gnulib.git/commitdiff
mktime, timegm: simplify glibc time64_t
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 1 Sep 2018 01:02:48 +0000 (18:02 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 1 Sep 2018 07:22:53 +0000 (00:22 -0700)
* lib/mktime.c, lib/timegm.c (mktime_offset_t) [_LIBC]:
Now long int, not time_t, since long int is the longstanding type
for this in glibc and there is no need to change it even if time_t
becomes 64 bits - even int would do, though this would be a change
to the glibc generated code.  When this change is merged into
glibc, it should simplify the time_t vs time64_t situation.

ChangeLog
lib/mktime.c
lib/timegm.c

index 3f9cf96241c70425bfb29fb2f44fb55509820b4c..1ad42cd98acd58c4605717b66eb80d774043444b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2018-08-31  Paul Eggert  <eggert@cs.ucla.edu>
 
+       mktime, timegm: simplify glibc time64_t
+       * lib/mktime.c, lib/timegm.c (mktime_offset_t) [_LIBC]:
+       Now long int, not time_t, since long int is the longstanding type
+       for this in glibc and there is no need to change it even if time_t
+       becomes 64 bits - even int would do, though this would be a change
+       to the glibc generated code.  When this change is merged into
+       glibc, it should simplify the time_t vs time64_t situation.
+
        mktime, timegm: simplify merge to glibc
        Move code around to make a merge to glibc easier to audit.
        This should not change behavior.
index 2858764792db53bcd647de08895e4a74893316d9..a307671feb33bea1205ee0318652e6f3852661fd 100644 (file)
@@ -77,7 +77,7 @@
 #endif
 
 #ifdef _LIBC
-typedef time_t mktime_offset_t;
+typedef long int mktime_offset_t;
 #else
 # include "mktime-internal.h"
 #endif
index 275a7a2ecaa51ac4e232900379a98183b11599bf..71276bbe0ba5d8a318107c0c35519beda7ac37e4 100644 (file)
@@ -24,7 +24,7 @@
 #include <time.h>
 
 #ifdef _LIBC
-typedef time_t mktime_offset_t;
+typedef long int mktime_offset_t;
 #else
 # include "mktime-internal.h"
 #endif