require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_TZFILE_H_)) {
    eval 'sub _TZFILE_H_ () {1;}' unless defined(&_TZFILE_H_);
    eval 'sub TZDIR () {"/usr/share/zoneinfo";}' unless defined(&TZDIR);
    eval 'sub TZDEFAULT () {"/etc/localtime";}' unless defined(&TZDEFAULT);
    eval 'sub TZDEFRULES () {"posixrules";}' unless defined(&TZDEFRULES);
    eval 'sub TZ_MAX_TIMES () {370;}' unless defined(&TZ_MAX_TIMES);
    eval 'sub NOSOLAR () {1;}' unless defined(&NOSOLAR);
    unless(defined(&NOSOLAR)) {
	eval 'sub TZ_MAX_TYPES () {256;}' unless defined(&TZ_MAX_TYPES);
    } else {
	eval 'sub TZ_MAX_TYPES () {10;}' unless defined(&TZ_MAX_TYPES);
    }
    eval 'sub TZ_MAX_CHARS () {50;}' unless defined(&TZ_MAX_CHARS);
    eval 'sub TZ_MAX_LEAPS () {50;}' unless defined(&TZ_MAX_LEAPS);
    eval 'sub SECSPERMIN () {60;}' unless defined(&SECSPERMIN);
    eval 'sub MINSPERHOUR () {60;}' unless defined(&MINSPERHOUR);
    eval 'sub HOURSPERDAY () {24;}' unless defined(&HOURSPERDAY);
    eval 'sub DAYSPERWEEK () {7;}' unless defined(&DAYSPERWEEK);
    eval 'sub DAYSPERNYEAR () {365;}' unless defined(&DAYSPERNYEAR);
    eval 'sub DAYSPERLYEAR () {366;}' unless defined(&DAYSPERLYEAR);
    eval 'sub SECSPERHOUR () {( &SECSPERMIN *  &MINSPERHOUR);}' unless defined(&SECSPERHOUR);
    eval 'sub SECSPERDAY () {(  &SECSPERHOUR *  &HOURSPERDAY);}' unless defined(&SECSPERDAY);
    eval 'sub MONSPERYEAR () {12;}' unless defined(&MONSPERYEAR);
    eval 'sub TM_SUNDAY () {0;}' unless defined(&TM_SUNDAY);
    eval 'sub TM_MONDAY () {1;}' unless defined(&TM_MONDAY);
    eval 'sub TM_TUESDAY () {2;}' unless defined(&TM_TUESDAY);
    eval 'sub TM_WEDNESDAY () {3;}' unless defined(&TM_WEDNESDAY);
    eval 'sub TM_THURSDAY () {4;}' unless defined(&TM_THURSDAY);
    eval 'sub TM_FRIDAY () {5;}' unless defined(&TM_FRIDAY);
    eval 'sub TM_SATURDAY () {6;}' unless defined(&TM_SATURDAY);
    eval 'sub TM_JANUARY () {0;}' unless defined(&TM_JANUARY);
    eval 'sub TM_FEBRUARY () {1;}' unless defined(&TM_FEBRUARY);
    eval 'sub TM_MARCH () {2;}' unless defined(&TM_MARCH);
    eval 'sub TM_APRIL () {3;}' unless defined(&TM_APRIL);
    eval 'sub TM_MAY () {4;}' unless defined(&TM_MAY);
    eval 'sub TM_JUNE () {5;}' unless defined(&TM_JUNE);
    eval 'sub TM_JULY () {6;}' unless defined(&TM_JULY);
    eval 'sub TM_AUGUST () {7;}' unless defined(&TM_AUGUST);
    eval 'sub TM_SEPTEMBER () {8;}' unless defined(&TM_SEPTEMBER);
    eval 'sub TM_OCTOBER () {9;}' unless defined(&TM_OCTOBER);
    eval 'sub TM_NOVEMBER () {10;}' unless defined(&TM_NOVEMBER);
    eval 'sub TM_DECEMBER () {11;}' unless defined(&TM_DECEMBER);
    eval 'sub TM_YEAR_BASE () {1900;}' unless defined(&TM_YEAR_BASE);
    eval 'sub EPOCH_YEAR () {1970;}' unless defined(&EPOCH_YEAR);
    eval 'sub EPOCH_WDAY () { &TM_THURSDAY;}' unless defined(&EPOCH_WDAY);
    eval 'sub isleap {
        my($y) = @_;
	    eval q((((($y) % 4) == 0 && (($y) % 100) != 0) || (($y) % 400) == 0));
    }' unless defined(&isleap);
}
1;
