summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2000-01-04 03:27:04 +0000
committermjacob <mjacob@FreeBSD.org>2000-01-04 03:27:04 +0000
commitbd182639a3ccc0532f5efbd9f3562af68fbe1098 (patch)
treedd34c735f3fdb396f6faf31d0f2729aae145a5a3
parent6a9796d7d65e9c34217a0ad2bd387b12f865327e (diff)
downloadFreeBSD-src-bd182639a3ccc0532f5efbd9f3562af68fbe1098.zip
FreeBSD-src-bd182639a3ccc0532f5efbd9f3562af68fbe1098.tar.gz
fix leap year calculation
-rw-r--r--sys/alpha/alpha/clock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/alpha/alpha/clock.c b/sys/alpha/alpha/clock.c
index 57f539d..e11c9fb 100644
--- a/sys/alpha/alpha/clock.c
+++ b/sys/alpha/alpha/clock.c
@@ -63,7 +63,8 @@
#define SECDAY ((unsigned)(24*SECHOUR)) /* seconds per day */
#define SECYR ((unsigned)(365*SECDAY)) /* seconds per common year */
-#define LEAPYEAR(year) (((year) % 4) == 0)
+#define LEAPYEAR(y) \
+ (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
device_t clockdev;
int clockinitted;
OpenPOWER on IntegriCloud