diff options
author | mjacob <mjacob@FreeBSD.org> | 2000-01-04 03:27:04 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2000-01-04 03:27:04 +0000 |
commit | bd182639a3ccc0532f5efbd9f3562af68fbe1098 (patch) | |
tree | dd34c735f3fdb396f6faf31d0f2729aae145a5a3 | |
parent | 6a9796d7d65e9c34217a0ad2bd387b12f865327e (diff) | |
download | FreeBSD-src-bd182639a3ccc0532f5efbd9f3562af68fbe1098.zip FreeBSD-src-bd182639a3ccc0532f5efbd9f3562af68fbe1098.tar.gz |
fix leap year calculation
-rw-r--r-- | sys/alpha/alpha/clock.c | 3 |
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; |