freebsd-ports/math/ss/files/patch-ad
Thomas Gellekum 4722e9175d Fix leap year handling until 2099.
PR:		17070
Submitted by:	julian
2000-03-10 12:31:34 +00:00

30 lines
793 B
Plaintext

--- interp.c.orig Mon Feb 7 17:41:53 1994
+++ interp.c Fri Mar 10 13:31:32 2000
@@ -490,7 +490,7 @@
mdays[1] = 28 + (yr%4 == 0);
if (mo < 1 || mo > 12 || day < 1 || day > mdays[--mo] ||
- yr > 1999 || yr < 1970) {
+ yr > 2099 || yr < 1970) {
error("@dts: invalid argument");
cellerror = CELLERROR;
return(0.0);
@@ -560,7 +560,7 @@
#if defined(__GO32__) || defined(__NeXT__)
time_t time (time_t *) ;
#else
-# ifndef OSF1
+# if !defined(OSF1) && !defined(__FreeBSD__)
long time();
# endif
#endif
@@ -571,7 +571,7 @@
long tloc;
if (which == NOW) {
-#if defined(__GO32__) || defined(__NeXT__)
+#if defined(__GO32__) || defined(__NeXT__) || defined(__FreeBSD__)
return (double) time ((time_t *) NULL) ;
#else
return (double) time((long *)0);