require '_h2ph_pre.ph';

no warnings qw(redefine misc);

if(!defined (defined(&_ARCH_MACPPC_MACPPC_RBUS_MACHDEP_H_) ? &_ARCH_MACPPC_MACPPC_RBUS_MACHDEP_H_ : undef)) {
    eval 'sub _ARCH_MACPPC_MACPPC_RBUS_MACHDEP_H_ () {1;}' unless defined(&_ARCH_MACPPC_MACPPC_RBUS_MACHDEP_H_);
    eval 'sub md_space_map {
        my($rbt, $physaddr, $size, $flags, $bshp) = @_;
	    eval q( &bus_space_map(($rbt)-> &rb_bt, ($physaddr), ($size), ($flags), ($bshp)));
    }' unless defined(&md_space_map);
    eval 'sub md_space_unmap {
        my($rbt, $bsh, $size, $adrp) = @_;
	    eval q( &do { *$adrp =  &bus_space_unmap_p(($rbt)-> &rb_bt, ($bsh), ($size));  &if (($rbt)-> ($rb_bt->{bus_io})) { *$adrp = *$adrp & 0xffff; } }  &while (0));
    }' unless defined(&md_space_unmap);
}
1;
