require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&FROMBCD)) {
    sub FROMBCD {
	local($x) = @_;
	eval q(((($x) >> 4) * 10+ (($x) & 0xf)));
    }
}
unless(defined(&TOBCD)) {
    sub TOBCD {
	local($x) = @_;
	eval q(((($x) / 10* 16) + (($x) % 10)));
    }
}
unless(defined(&SECDAY)) {
    sub SECDAY () {	86400;}
}
unless(defined(&SECYR)) {
    sub SECYR () {	( &SECDAY * 365);}
}
unless(defined(&POSIX_BASE_YEAR)) {
    sub POSIX_BASE_YEAR () {	1970;}
}
unless(defined(&todr_gettime)) {
    sub todr_gettime {
	local($ct, $t) = @_;
	eval q(((*($ct)-> &todr_gettime)($ct, $t)));
    }
}
unless(defined(&todr_settime)) {
    sub todr_settime {
	local($ct, $t) = @_;
	eval q(((*($ct)-> &todr_settime)($ct, $t)));
    }
}
unless(defined(&todr_getcal)) {
    sub todr_getcal {
	local($ct, $vp) = @_;
	eval q(((*($ct)-> &todr_gettime)($ct, $vp)));
    }
}
unless(defined(&todr_setcal)) {
    sub todr_setcal {
	local($ct, $v) = @_;
	eval q(((*($ct)-> &todr_settime)($ct, $v)));
    }
}
unless(defined(&todr_wenable)) {
    sub todr_wenable {
	local($ct, $v) = @_;
	eval q( &if (($ct)-> &todr_setwen) ((*($ct)-> &todr_setwen)($ct, $v)));
    }
}
1;
