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 /include | |
parent | bd598da9f454bc1091b4ebe0303b07e6f96ca130 (diff) | |
download | glibc-72b8692d7e640eb85ea0fb7de6d5e797512691c1.tar glibc-72b8692d7e640eb85ea0fb7de6d5e797512691c1.tar.gz glibc-72b8692d7e640eb85ea0fb7de6d5e797512691c1.tar.bz2 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 'include')
-rw-r--r-- | include/time.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/time.h b/include/time.h index 861b1acfb7..37964f7b76 100644 --- a/include/time.h +++ b/include/time.h @@ -46,7 +46,7 @@ extern void __tzfile_default (const char *std, const char *dst, long int stdoff, long int dstoff) attribute_hidden; extern void __tzset_parse_tz (const char *tz) attribute_hidden; -extern void __tz_compute (time_t timer, struct tm *tm, int use_localtime) +extern void __tz_compute (__time64_t timer, struct tm *tm, int use_localtime) __THROW attribute_hidden; /* Subroutine of `mktime'. Return the `time_t' representation of TP and @@ -63,11 +63,11 @@ extern struct tm *__gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp); libc_hidden_proto (__gmtime_r) -/* Compute the `struct tm' representation of *T, +/* Compute the `struct tm' representation of T, offset OFFSET seconds east of UTC, and store year, yday, mon, mday, wday, hour, min, sec into *TP. Return nonzero if successful. */ -extern int __offtime (const time_t *__timer, +extern int __offtime (__time64_t __timer, long int __offset, struct tm *__tp) attribute_hidden; @@ -76,7 +76,7 @@ extern char *__asctime_r (const struct tm *__tp, char *__buf) extern void __tzset (void) attribute_hidden; /* Prototype for the internal function to get information based on TZ. */ -extern struct tm *__tz_convert (const time_t *timer, int use_localtime, +extern struct tm *__tz_convert (__time64_t timer, int use_localtime, struct tm *tp) attribute_hidden; extern int __nanosleep (const struct timespec *__requested_time, |