This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix mktime


On Sat, Apr 13, Jakub Jelinek wrote:

> Hi!
> 
> The PR libc/2738 fix was not entirely correct, since even tm with tm_year 69
> is representable in certain timezones. This caused e.g. perl-Date-Calc tests
> to fail. Below is a fix. Years before 69 surely cannot be represented, for
> 69 it computes the year and checks for overflow afterwards.
> 
> 2002-04-13  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* time/mktime.c (__mktime_internal): If year is 69, don't bail out
> 	early, but check whether it overflowed afterwards.
> 	* time/tst-mktime.c (main): Add new tests.

make check does not longer pass for me with this. Output of
tst-mktime.out is:

Wednesday
Dec 31 1969 EST test passed
mktime returned 3749, expected -1

  Thorsten

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Deutschherrenstr. 15-19       D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]