diff options
author | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2018-12-05 21:01:22 +0100 |
---|---|---|
committer | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2018-12-05 21:01:22 +0100 |
commit | 72b8692d7e640eb85ea0fb7de6d5e797512691c1 (patch) | |
tree | 5e98d09fcf975415b8cac7237764d565f6ebddaa /time/localtime.c | |
parent | bd598da9f454bc1091b4ebe0303b07e6f96ca130 (diff) | |
download | glibc-72b8692d7e640eb85ea0fb7de6d5e797512691c1.tar.gz glibc-72b8692d7e640eb85ea0fb7de6d5e797512691c1.tar.xz glibc-72b8692d7e640eb85ea0fb7de6d5e797512691c1.zip |
Y2038: make __tz_convert compatible with 64-bit-time
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.
Diffstat (limited to 'time/localtime.c')
-rw-r--r-- | time/localtime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/time/localtime.c b/time/localtime.c index 8684a8a971..92dbfe0f8c 100644 --- a/time/localtime.c +++ b/time/localtime.c @@ -27,7 +27,7 @@ struct tm _tmbuf; struct tm * __localtime_r (const time_t *t, struct tm *tp) { - return __tz_convert (t, 1, tp); + return __tz_convert (*t, 1, tp); } weak_alias (__localtime_r, localtime_r) @@ -36,6 +36,6 @@ weak_alias (__localtime_r, localtime_r) struct tm * localtime (const time_t *t) { - return __tz_convert (t, 1, &_tmbuf); + return __tz_convert (*t, 1, &_tmbuf); } libc_hidden_def (localtime) |