diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-09-19 13:16:14 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-09-19 17:09:08 -0700 |
commit | e1080e7e5f3e62ef737bb3ee5babd7ad66bedfd7 (patch) | |
tree | c1dacc6faff6555f449848449b4c8d5e8d6aad10 /include | |
parent | 8e6fd2bdb21efe2cc1ae7571ff8fb2599db6a05a (diff) | |
download | glibc-e1080e7e5f3e62ef737bb3ee5babd7ad66bedfd7.zip glibc-e1080e7e5f3e62ef737bb3ee5babd7ad66bedfd7.tar.gz glibc-e1080e7e5f3e62ef737bb3ee5babd7ad66bedfd7.tar.bz2 |
Fix mktime localtime offset confusion
[BZ #23603]
* include/time.h (__mktime_internal): The localtime offset is now
of type long int instead of time_t. This is the longstanding type
in glibc, and it is more than enough to represent difference
between localtime and gmtime even if it is 32 bits and time_t is
64. Changing it now will let us avoid an unnecessary change when
time_t is widened to 64 bits on 32-bit platforms.
* time/mktime-internal.h (mktime_offset_t): Now long int.
Diffstat (limited to 'include')
-rw-r--r-- | include/time.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/time.h b/include/time.h index 23d2580..e30c5fc 100644 --- a/include/time.h +++ b/include/time.h @@ -55,11 +55,11 @@ extern void __tz_compute (time_t timer, struct tm *tm, int use_localtime) /* Subroutine of `mktime'. Return the `time_t' representation of TP and normalize TP, given that a `struct tm *' maps to a `time_t' as performed - by FUNC. Keep track of next guess for time_t offset in *OFFSET. */ + by FUNC. Record next guess for localtime-gmtime offset in *OFFSET. */ extern time_t __mktime_internal (struct tm *__tp, struct tm *(*__func) (const time_t *, struct tm *), - time_t *__offset) attribute_hidden; + long int *__offset) attribute_hidden; extern struct tm *__localtime_r (const time_t *__timer, struct tm *__tp) attribute_hidden; |