From 78575a842bce4d8e8c725506da1f826d16b660eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Apr 2002 06:37:43 +0000 Subject: Update. 2002-04-14 Jakub Jelinek * elf/dl-lookup.c (_dl_lookup_symbol): Move add_dependency call to the end of the function. Pass original flags to recursive call if add_dependency failed. (_dl_lookup_versioned_symbol): Likewise. 2002-04-13 Jakub Jelinek * 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. * debug/xtrace.sh: Fix program name in help message. Patch by Roger Luethi . --- time/mktime.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'time/mktime.c') diff --git a/time/mktime.c b/time/mktime.c index 5632f14..1aec223 100644 --- a/time/mktime.c +++ b/time/mktime.c @@ -259,8 +259,10 @@ __mktime_internal (struct tm *tp, int sec_requested = sec; - /* Only years after 1970 are defined. */ - if (year < 70) + /* Only years after 1970 are defined. + If year is 69, it might still be representable due to + timezone differences. */ + if (year < 69) return -1; #if LEAP_SECONDS_POSSIBLE @@ -370,6 +372,14 @@ __mktime_internal (struct tm *tp, return -1; } + if (year == 69) + { + /* If year was 69, need to check whether the time was representable + or not. */ + if (t < 0 || t > 2 * 24 * 60 * 60) + return -1; + } + *tp = tm; return t; } -- cgit v1.1