123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- #ifndef TZFILE_H
- #define TZFILE_H
- #ifndef lint
- #ifndef NOID
- static char __attribute__((unused)) tzfilehid[] = "@(#)tzfile.h 8.1";
- #endif
- #endif
- #ifndef TZDIR
- #ifdef SOLARIS
- #define TZDIR "/usr/share/lib/zoneinfo"
- #else
- #define TZDIR "/usr/share/zoneinfo"
- #endif
- #endif
- #ifndef TZDEFAULT
- #define TZDEFAULT "localtime"
- #endif
- #ifndef TZDEFRULES
- #define TZDEFRULES "posixrules"
- #endif
- #define TZ_MAGIC "TZif"
- struct tzhead {
- char tzh_magic[4];
- char tzh_version[1];
- char tzh_reserved[15];
- char tzh_ttisgmtcnt[4];
- char tzh_ttisstdcnt[4];
- char tzh_leapcnt[4];
- char tzh_timecnt[4];
- char tzh_typecnt[4];
- char tzh_charcnt[4];
- };
- #ifndef TZ_MAX_TIMES
- #define TZ_MAX_TIMES 1200
- #endif
- #ifndef TZ_MAX_TYPES
- #ifndef NOSOLAR
- #define TZ_MAX_TYPES 256
- #endif
- #ifdef NOSOLAR
- #define TZ_MAX_TYPES 20
- #endif
- #endif
- #ifndef TZ_MAX_CHARS
- #define TZ_MAX_CHARS 50
-
- #endif
- #ifndef TZ_MAX_LEAPS
- #define TZ_MAX_LEAPS 50
- #endif
- #define SECSPERMIN 60
- #define MINSPERHOUR 60
- #define HOURSPERDAY 24
- #define DAYSPERWEEK 7
- #define DAYSPERNYEAR 365
- #define DAYSPERLYEAR 366
- #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
- #define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
- #define MONSPERYEAR 12
- #define TM_SUNDAY 0
- #define TM_MONDAY 1
- #define TM_TUESDAY 2
- #define TM_WEDNESDAY 3
- #define TM_THURSDAY 4
- #define TM_FRIDAY 5
- #define TM_SATURDAY 6
- #define TM_JANUARY 0
- #define TM_FEBRUARY 1
- #define TM_MARCH 2
- #define TM_APRIL 3
- #define TM_MAY 4
- #define TM_JUNE 5
- #define TM_JULY 6
- #define TM_AUGUST 7
- #define TM_SEPTEMBER 8
- #define TM_OCTOBER 9
- #define TM_NOVEMBER 10
- #define TM_DECEMBER 11
- #define TM_YEAR_BASE 1900
- #define EPOCH_YEAR 1970
- #define EPOCH_WDAY TM_THURSDAY
- #define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
- #define isleap_sum(a, b) isleap((a) % 400 + (b) % 400)
- #endif
|