X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmktime.c;h=772b4f3478f1892ac2b4da4f6bf4ad6b0052cfd8;hb=f792a03ccf327e0e80b60e6b7a013e7f89f9f5ca;hp=3dab58ad813fa1645500f938e872b28b7e9b0ad1;hpb=8b2c2981e6eb29e690d711da01793ad8d99ea372;p=gnulib.git diff --git a/lib/mktime.c b/lib/mktime.c index 3dab58ad8..772b4f347 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -1,5 +1,5 @@ /* Convert a `struct tm' to a time_t value. - Copyright (C) 1993-1999, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1993-1999, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Eggert (eggert@twinsun.com). @@ -77,7 +77,7 @@ verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0); /* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */ static inline int -leapyear (int year) +leapyear (long int year) { /* Don't add YEAR to TM_YEAR_BASE, as that might overflow. Also, work even if YEAR is negative. */ @@ -108,6 +108,7 @@ const unsigned short int __mon_yday[2][13] = # include "time_r.h" # undef __localtime_r # define __localtime_r localtime_r +# define __mktime_internal mktime_internal #endif /* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) - @@ -230,7 +231,8 @@ ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), the monotonic and mostly-unit-linear conversion function CONVERT. Use *OFFSET to keep track of a guess at the offset of the result, compared to what the result would be for UTC without leap seconds. - If *OFFSET's guess is correct, only one CONVERT call is needed. */ + If *OFFSET's guess is correct, only one CONVERT call is needed. + This function is external because it is used also by timegm.c. */ time_t __mktime_internal (struct tm *tp, struct tm *(*convert) (const time_t *, struct tm *), @@ -493,7 +495,6 @@ not_equal_tm (const struct tm *a, const struct tm *b) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) - | (a->tm_mday ^ b->tm_mday) | (a->tm_yday ^ b->tm_yday) | (a->tm_isdst ^ b->tm_isdst)); }