Y2038: make __tz_convert compatible with 64-bit-time

System Internals / glibc - Albert ARIBAUD (3ADEV) [3adev.fr] - 5 December 2018 20:01 EST

Now that __time64_t exists, we can switch internal function __tz_convert from 32-bit to 64-bit time. This involves switching some other internal functions as well, namely __tz_compute and __offtime.

Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu.

- include/time.h (__tz_compute): Replace time_t with __time64_t. (__tz_convert): Replace time_t* with __time64_t. (__offtime): Replace time_t* with __time64_t.
- time/gmtime.c (__gmtime_r): Adjust call to __tz_convert. (gmtime): Likewise.
- time/localtime.c (__localtime_r): Likewise. (localtime): Likewise.
- time/offtime.c: Replace time_t with __time64_t.
- time/tzset.c: Likewise.

72b8692d7e Y2038: make __tz_convert compatible with 64-bit-time
ChangeLog | 15 +++++++++++++++
include/time.h | 8 ++++----
time/gmtime.c | 4 ++--
time/localtime.c | 4 ++--
time/offtime.c | 12 ++++++------
time/tzfile.c | 14 ++++----------
time/tzset.c | 27 ++++++++++-----------------
7 files changed, 43 insertions(+), 41 deletions(-)

Upstream: sourceware.org


  • Share