diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2008-07-07 18:11:39 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2008-07-07 18:11:39 +0000 |
commit | cb0cc59cface870d089ba7427d152c89659c3cbe (patch) | |
tree | 56477ea485f556d5b22d6b579b4ba904d23d042a /libc/time | |
parent | 048017797c433364375bb5916a512d84d7c46591 (diff) |
Merge changes between r6403 and r6509 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@6510 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/time')
-rw-r--r-- | libc/time/mktime.c | 6 | ||||
-rw-r--r-- | libc/time/strptime_l.c | 14 |
2 files changed, 6 insertions, 14 deletions
diff --git a/libc/time/mktime.c b/libc/time/mktime.c index e299375a1..e47d69615 100644 --- a/libc/time/mktime.c +++ b/libc/time/mktime.c @@ -1,5 +1,5 @@ /* Convert a `struct tm' to a time_t value. - Copyright (C) 1993-1999, 2002-2006, 2007 Free Software Foundation, Inc. + Copyright (C) 1993-1999, 2002-2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Eggert <eggert@twinsun.com>. @@ -293,7 +293,9 @@ __mktime_internal (struct tm *tp, int mday = tp->tm_mday; int mon = tp->tm_mon; int year_requested = tp->tm_year; - int isdst = tp->tm_isdst; + /* Normalize the value. */ + int isdst = ((tp->tm_isdst >> (8 * sizeof (tp->tm_isdst) - 1)) + | (tp->tm_isdst != 0)); /* 1 if the previous probe was DST. */ int dst2; diff --git a/libc/time/strptime_l.c b/libc/time/strptime_l.c index c089b30ef..58741b78b 100644 --- a/libc/time/strptime_l.c +++ b/libc/time/strptime_l.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2004, 2005, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,22 +34,13 @@ #endif -#ifndef __P -# if defined __GNUC__ || (defined __STDC__ && __STDC__) -# define __P(args) args -# else -# define __P(args) () -# endif /* GCC. */ -#endif /* Not __P. */ - - #if ! HAVE_LOCALTIME_R && ! defined localtime_r # ifdef _LIBC # define localtime_r __localtime_r # else /* Approximate localtime_r as best we can in its absence. */ # define localtime_r my_localtime_r -static struct tm *localtime_r __P ((const time_t *, struct tm *)); +static struct tm *localtime_r (const time_t *, struct tm *); static struct tm * localtime_r (t, tp) const time_t *t; @@ -956,7 +947,6 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) else { s.decided = loc; - s.era_cnt = -1; break; } |