Fix some minor time-related bugs with POSIX time arguments.
authorJim Meyering <jim@meyering.net>
Mon, 2 Jun 2003 08:22:29 +0000 (08:22 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 2 Jun 2003 08:22:29 +0000 (08:22 +0000)
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.

lib/posixtm.h

index d2c01c9..6b64a6e 100644 (file)
 #  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