From: Jim Meyering Date: Mon, 2 Jun 2003 08:22:29 +0000 (+0000) Subject: Fix some minor time-related bugs with POSIX time arguments. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74ab88c51f712b0b7e87c3226b571cab7c894c6c;p=pspp Fix some minor time-related bugs with POSIX time arguments. Some valid time stamps were being rejected (notably -1, and time stamps before 1900 on 64-bit hosts). And some invalid time stamps were being accepted, e.g. September 31. * posixtm.h (posixtime): Return bool instead of time_t, so that we can return (time_t) -1 successfully. --- diff --git a/lib/posixtm.h b/lib/posixtm.h index d2c01c9b6b..6b64a6eac4 100644 --- a/lib/posixtm.h +++ b/lib/posixtm.h @@ -15,10 +15,7 @@ # endif # endif -time_t -posixtime PARAMS ((const char *s, unsigned int syntax_bits)); - -struct tm * -posixtm PARAMS ((const char *s, unsigned int syntax_bits)); +bool +posixtime PARAMS ((time_t *p, const char *s, unsigned int syntax_bits)); #endif