require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_I386_ISA_MACHDEP_H_)) {
    eval 'sub _I386_ISA_MACHDEP_H_ () {1;}' unless defined(&_I386_ISA_MACHDEP_H_);
    require 'machine/bus.ph';
    require 'dev/isa/isadmavar.ph';
    eval 'sub ISA_DMA_BOUNCE_THRESHOLD () {0xffffff;}' unless defined(&ISA_DMA_BOUNCE_THRESHOLD);
    eval 'sub ID_MIGHT_NEED_BOUNCE () {0x1;}' unless defined(&ID_MIGHT_NEED_BOUNCE);
    eval 'sub ID_HAS_BOUNCE () {0x2;}' unless defined(&ID_HAS_BOUNCE);
    eval 'sub ID_IS_BOUNCING () {0x4;}' unless defined(&ID_IS_BOUNCING);
    eval 'sub RAM_BEGIN () {0x;}' unless defined(&RAM_BEGIN);
    eval 'sub RAM_END () {0x1000000;}' unless defined(&RAM_END);
    eval 'sub RAM_SIZE () {( &RAM_END -  &RAM_BEGIN);}' unless defined(&RAM_SIZE);
    eval 'sub COMPAQ_RAMRELOC () {0x80c00000;}' unless defined(&COMPAQ_RAMRELOC);
    eval 'sub COMPAQ_RAMSETUP () {0x80c00002;}' unless defined(&COMPAQ_RAMSETUP);
    eval 'sub WEITEK_FPU () {0xc0000000;}' unless defined(&WEITEK_FPU);
    eval 'sub CYRIX_EMC () {0xc0000000;}' unless defined(&CYRIX_EMC);
    eval 'sub MONO_BASE () {0x3b4;}' unless defined(&MONO_BASE);
    eval 'sub MONO_BUF () {0xb0000;}' unless defined(&MONO_BUF);
    eval 'sub CGA_BASE () {0x3d4;}' unless defined(&CGA_BASE);
    eval 'sub CGA_BUF () {0xb8000;}' unless defined(&CGA_BUF);
    eval 'sub ISA_PHYSADDR {
        my($v) = @_;
	    eval q((( &void *) (($v) -  &atdevbase +  &IOM_BEGIN)));
    }' unless defined(&ISA_PHYSADDR);
    eval 'sub ISA_HOLE_VADDR {
        my($p) = @_;
	    eval q((( &void *) (($p) -  &IOM_BEGIN +  &atdevbase)));
    }' unless defined(&ISA_HOLE_VADDR);
}
1;
