1 --- tzfile.h.orig 2010-01-15 00:06:58.000000000 -0800
2 +++ tzfile.h 2010-01-15 00:07:28.000000000 -0800
3 @@ -38,7 +38,11 @@ static char tzfilehid[] = "@(#)tzfile.h
4 #endif /* !defined TZDIR */
7 +#ifdef UNIFDEF_MOVE_LOCALTIME
8 +#define TZDEFAULT "/var/db/timezone/localtime"
9 +#else /* !UNIFDEF_MOVE_LOCALTIME */
10 #define TZDEFAULT "/etc/localtime"
11 +#endif /* UNIFDEF_MOVE_LOCALTIME */
12 #endif /* !defined TZDEFAULT */
15 @@ -167,6 +171,20 @@ struct tzhead {
17 #define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
20 +** Since everything in isleap is modulo 400 (or a factor of 400), we know that
21 +** isleap(y) == isleap(y % 400)
23 +** isleap(a + b) == isleap((a + b) % 400)
25 +** isleap(a + b) == isleap(a % 400 + b % 400)
26 +** This is true even if % means modulo rather than Fortran remainder
27 +** (which is allowed by C89 but not C99).
28 +** We use this to avoid addition overflow problems.
31 +#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400)