changeset 4343:686e1813a84b

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.
author Jim Meyering <jim@meyering.net>
date Mon, 02 Jun 2003 08:22:29 +0000
parents 16bad8d9422d
children d6d868e8cc47
files lib/posixtm.h
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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