From f04dfbc244efb683e395d40c08c86fb93e679167 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 16 Mar 2012 02:48:38 -0700 Subject: mktime: do not assume 'long' is wide enough * time/mktime.c (verify): Move decl up. (long_int): New type. (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it, to remove assumption in the code that 'long' is wide enough to store year values. This assumption is not true on x32 and on some non-glibc platforms. --- ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 3888b871b2..5b99dac31f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2012-05-23 Paul Eggert + mktime: do not assume 'long' is wide enough + * time/mktime.c (verify): Move decl up. + (long_int): New type. + (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it, + to remove assumption in the code that 'long' is wide enough to + store year values. This assumption is not true on x32 and on + some non-glibc platforms. + mktime: merge wrapv change from gnulib * time/mktime.c (WRAPV): New macro. (time_t_avg, time_t_add_ok, time_t_int_add_ok): New static functions. -- cgit v1.2.3-70-g09d2