require '_h2ph_pre.ph';

if(defined(&GDT_DEBUG)) {
    eval 'sub GDT_DPRINTF {
        local($mask, $args) = @_;
	    eval q( &if ( &gdt_debug & ($mask))  &printf $args);
    }' unless defined(&GDT_DPRINTF);
    eval 'sub GDT_D_INTR () {0x01;}' unless defined(&GDT_D_INTR);
    eval 'sub GDT_D_MISC () {0x02;}' unless defined(&GDT_D_MISC);
    eval 'sub GDT_D_CMD () {0x04;}' unless defined(&GDT_D_CMD);
    eval 'sub GDT_D_QUEUE () {0x08;}' unless defined(&GDT_D_QUEUE);
    eval 'sub GDT_D_IO () {0x10;}' unless defined(&GDT_D_IO);
} else {
    eval 'sub GDT_DPRINTF {
        local($mask, $args) = @_;
	    eval q();
    }' unless defined(&GDT_DPRINTF);
}
unless(defined(&GDT_RETRIES)) {
    sub GDT_RETRIES () {	100000000;}
}
unless(defined(&GDT_TIMEOUT)) {
    sub GDT_TIMEOUT () {	100000000;}
}
unless(defined(&GDT_POLL_TIMEOUT)) {
    sub GDT_POLL_TIMEOUT () {	10000000;}
}
unless(defined(&GDT_WATCH_TIMEOUT)) {
    sub GDT_WATCH_TIMEOUT () {	10000000;}
}
unless(defined(&GDT_SCRATCH_SZ)) {
    sub GDT_SCRATCH_SZ () {	4096;}
}
unless(defined(&GDT_GCF_CMD_MASK)) {
    sub GDT_GCF_CMD_MASK () {	0x3;}
}
unless(defined(&GDT_GCF_UNUSED)) {
    sub GDT_GCF_UNUSED () {	0;}
}
unless(defined(&GDT_GCF_INTERNAL)) {
    sub GDT_GCF_INTERNAL () {	1;}
}
unless(defined(&GDT_GCF_SCREEN)) {
    sub GDT_GCF_SCREEN () {	2;}
}
unless(defined(&GDT_GCF_SCSI)) {
    sub GDT_GCF_SCSI () {	3;}
}
unless(defined(&GDT_GCF_WATCHDOG)) {
    sub GDT_GCF_WATCHDOG () {	0x4;}
}
unless(defined(&GDT_ISA)) {
    sub GDT_ISA () {	0x01;}
}
unless(defined(&GDT_EISA)) {
    sub GDT_EISA () {	0x02;}
}
unless(defined(&GDT_PCI)) {
    sub GDT_PCI () {	0x03;}
}
unless(defined(&GDT_PCINEW)) {
    sub GDT_PCINEW () {	0x04;}
}
unless(defined(&GDT_MPR)) {
    sub GDT_MPR () {	0x05;}
}
unless(defined(&GDT_CLASS_MASK)) {
    sub GDT_CLASS_MASK () {	0x07;}
}
unless(defined(&GDT_FC)) {
    sub GDT_FC () {	0x10;}
}
unless(defined(&GDT_CLASS)) {
    sub GDT_CLASS {
	local($gdt) = @_;
	eval q((($gdt)-> &sc_class &  &GDT_CLASS_MASK));
    }
}
unless(defined(&GDT_LOCK_GDT)) {
    sub GDT_LOCK_GDT {
	local($gdt) = @_;
	eval q(($gdt)-> &sc_spl =  &splbio());
    }
}
unless(defined(&GDT_UNLOCK_GDT)) {
    sub GDT_UNLOCK_GDT {
	local($gdt) = @_;
	eval q( &splx(($gdt)-> &sc_spl));
    }
}
if(defined(&__GNUC__)) {
}
if(defined( &__alpha__)) {
    undef(&vtophys) if defined(&vtophys);
    eval 'sub vtophys {
        local($va) = @_;
	    eval q( &alpha_XXX_dmamap(($va)));
    }' unless defined(&vtophys);
}
1;
