mirror of
https://sourceware.org/git/glibc.git
synced 2025-09-01 05:02:03 +03:00
Update.
1999-09-16 Ulrich Drepper <drepper@cygnus.com> * time/getdate.c (__getdate_r): Pass correct year to check_mday. Reported by Vern Staats <staatsvr@asc.hpc.mil>.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
1999-09-16 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* time/getdate.c (__getdate_r): Pass correct year to check_mday.
|
||||||
|
Reported by Vern Staats <staatsvr@asc.hpc.mil>.
|
||||||
|
|
||||||
1999-09-14 Ulrich Drepper <drepper@cygnus.com>
|
1999-09-14 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* db2/mutex/sparc.gcc (TSL_UNSET): Dereference pointer.
|
* db2/mutex/sparc.gcc (TSL_UNSET): Dereference pointer.
|
||||||
|
@@ -25,6 +25,8 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#define TM_YEAR_BASE 1900
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
/* Prototypes for local functions. */
|
||||||
static int first_wday (int year, int mon, int wday);
|
static int first_wday (int year, int mon, int wday);
|
||||||
@@ -225,7 +227,8 @@ __getdate_r (const char *string, struct tm *tp)
|
|||||||
/* Check if the day of month is within range, and if the time can be
|
/* Check if the day of month is within range, and if the time can be
|
||||||
represented in a time_t. We make use of the fact that the mktime
|
represented in a time_t. We make use of the fact that the mktime
|
||||||
call normalizes the struct tm. */
|
call normalizes the struct tm. */
|
||||||
if ((!mday_ok && !check_mday (tp->tm_year, tp->tm_mon, tp->tm_mday))
|
if ((!mday_ok && !check_mday (TM_YEAR_BASE + tp->tm_year, tp->tm_mon,
|
||||||
|
tp->tm_mday))
|
||||||
|| mktime (tp) == (time_t) -1)
|
|| mktime (tp) == (time_t) -1)
|
||||||
return 8;
|
return 8;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user