mktime: avoid problems on NetBSD 5 / i386
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 29 Jan 2011 05:02:31 +0000 (21:02 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 29 Jan 2011 05:03:04 +0000 (21:03 -0800)
commitb34d68259f1cba7181c8c2a9e4787a46db2836b4
treea42d60781760a11ea5b9addda9bf2b09cf6706f5
parent1424298fee7051224352dacc3f96bdb2f4bfe7db
mktime: avoid problems on NetBSD 5 / i386

* lib/mktime.c (long_int): New type.  This works around a problem
on NetBSD 5 / i386, where 'long int' and 'int' are both 32 bits
but time_t is 64 bits, and where I expect the existing code is
wrong in some cases.
(leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it.
(ydhms_diff): Bring back the compile-time check for wide-enough
year and yday.
ChangeLog
lib/mktime.c