summaryrefslogtreecommitdiff
path: root/timezone/tzfile.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-02-16 12:31:10 +0000
committerRoland McGrath <roland@gnu.org>2005-02-16 12:31:10 +0000
commit833861be818bb5d45ab0c47370b84068dfb2fedf (patch)
tree2f1754a415c378f6b067f9158cc42df24d4641d2 /timezone/tzfile.h
parentc397a0064061e28a00eea873669e59f3983db791 (diff)
import later fedora-branch tweaks
Diffstat (limited to 'timezone/tzfile.h')
-rw-r--r--timezone/tzfile.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/timezone/tzfile.h b/timezone/tzfile.h
index 0e9966a950..0921c3c339 100644
--- a/timezone/tzfile.h
+++ b/timezone/tzfile.h
@@ -21,7 +21,7 @@
#ifndef lint
#ifndef NOID
-static char tzfilehid[] = "@(#)tzfile.h 7.16";
+static char tzfilehid[] = "@(#)tzfile.h 7.14";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -156,21 +156,12 @@ struct tzhead {
#define EPOCH_YEAR 1970
#define EPOCH_WDAY TM_THURSDAY
-#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
-
/*
-** Since everything in isleap is modulo 400 (or a factor of 400), we know that
-** isleap(y) == isleap(y % 400)
-** and so
-** isleap(a + b) == isleap((a + b) % 400)
-** or
-** isleap(a + b) == isleap(a % 400 + b % 400)
-** This is true even if % means modulo rather than Fortran remainder
-** (which is allowed by C89 but not C99).
-** We use this to avoid addition overflow problems.
+** Accurate only for the past couple of centuries;
+** that will probably do.
*/
-#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400)
+#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
#ifndef USG