Loading...
--- Libc/Libc-262/stdtime/tzfile.h
+++ Libc/Libc-763.13/stdtime/tzfile.h
@@ -1,10 +1,12 @@
#ifndef TZFILE_H
-
#define TZFILE_H
+
/*
** This file is in the public domain, so clarified as of
** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
+**
+** $FreeBSD: src/lib/libc/stdtime/tzfile.h,v 1.8 2002/03/22 23:42:05 obrien Exp $
*/
/*
@@ -36,7 +38,11 @@
#endif /* !defined TZDIR */
#ifndef TZDEFAULT
+#ifdef UNIFDEF_MOVE_LOCALTIME
+#define TZDEFAULT "/var/db/timezone/localtime"
+#else /* !UNIFDEF_MOVE_LOCALTIME */
#define TZDEFAULT "/etc/localtime"
+#endif /* UNIFDEF_MOVE_LOCALTIME */
#endif /* !defined TZDEFAULT */
#ifndef TZDEFRULES
@@ -165,6 +171,20 @@
#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.
+*/
+
+#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400)
+
#ifndef USG
/*