From: Paul Eggert Date: Sat, 1 Sep 2018 01:02:48 +0000 (-0700) Subject: mktime, timegm: simplify glibc time64_t X-Git-Tag: v1.0~5450 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=15343c31c678b9a50b7930346b78e19971b0054c;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 3f9cf96241..1ad42cd98a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2018-08-31 Paul Eggert + 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. diff --git a/lib/mktime.c b/lib/mktime.c index 2858764792..a307671feb 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -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 diff --git a/lib/timegm.c b/lib/timegm.c index 275a7a2eca..71276bbe0b 100644 --- a/lib/timegm.c +++ b/lib/timegm.c @@ -24,7 +24,7 @@ #include #ifdef _LIBC -typedef time_t mktime_offset_t; +typedef long int mktime_offset_t; #else # include "mktime-internal.h" #endif