require '_h2ph_pre.ph';

if(defined(&AAC_DEBUG)) {
    eval 'sub AAC_DPRINTF {
        local($mask, $args) = @_;
	    eval q( &if ( &aac_debug & ($mask))  &printf $args);
    }' unless defined(&AAC_DPRINTF);
    eval 'sub AAC_D_INTR () {0x1;}' unless defined(&AAC_D_INTR);
    eval 'sub AAC_D_MISC () {0x2;}' unless defined(&AAC_D_MISC);
    eval 'sub AAC_D_CMD () {0x4;}' unless defined(&AAC_D_CMD);
    eval 'sub AAC_D_QUEUE () {0x8;}' unless defined(&AAC_D_QUEUE);
    eval 'sub AAC_D_IO () {0x10;}' unless defined(&AAC_D_IO);
    eval 'sub AAC_PRINT_FIB {
        local($sc, $fib) = @_;
	    eval q( &aac_print_fib(($sc), ($fib),  &__func__));
    }' unless defined(&AAC_PRINT_FIB);
} else {
    eval 'sub AAC_DPRINTF {
        local($mask, $args) = @_;
	    eval q();
    }' unless defined(&AAC_DPRINTF);
    eval 'sub AAC_PRINT_FIB {
        local($sc, $fib) = @_;
	    eval q();
    }' unless defined(&AAC_PRINT_FIB);
}
unless(defined(&AAC_ADAPTER_FIBS)) {
    sub AAC_ADAPTER_FIBS () {	8;}
}
unless(defined(&AAC_PRINTF_BUFSIZE)) {
    sub AAC_PRINTF_BUFSIZE () {	256;}
}
unless(defined(&AAC_BOOT_TIMEOUT)) {
    sub AAC_BOOT_TIMEOUT () {	(3* 60);}
}
unless(defined(&AAC_WATCH_TIMEOUT)) {
    sub AAC_WATCH_TIMEOUT () {	10000;}
}
unless(defined(&AAC_IMMEDIATE_TIMEOUT)) {
    sub AAC_IMMEDIATE_TIMEOUT () {	30;}
}
unless(defined(&AAC_SYNC_DELAY)) {
    sub AAC_SYNC_DELAY () {	20000;}
}
unless(defined(&AAC_MAXSGENTRIES)) {
    sub AAC_MAXSGENTRIES () {	64;}
}
unless(defined(&AAC_GET_FWSTATUS)) {
    sub AAC_GET_FWSTATUS {
	local($sc) = @_;
	eval q((($sc)-> ($sc_if->{aif_get_fwstatus})($sc)));
    }
}
unless(defined(&AAC_QNOTIFY)) {
    sub AAC_QNOTIFY {
	local($sc, $qbit) = @_;
	eval q((($sc)-> ($sc_if->{aif_qnotify})(($sc), ($qbit))));
    }
}
unless(defined(&AAC_GET_ISTATUS)) {
    sub AAC_GET_ISTATUS {
	local($sc) = @_;
	eval q((($sc)-> ($sc_if->{aif_get_istatus})($sc)));
    }
}
unless(defined(&AAC_CLEAR_ISTATUS)) {
    sub AAC_CLEAR_ISTATUS {
	local($sc, $mask) = @_;
	eval q((($sc)-> ($sc_if->{aif_set_istatus})(($sc), ($mask))));
    }
}
unless(defined(&AAC_SET_MAILBOX)) {
    sub AAC_SET_MAILBOX {
	local($sc, $command, $arg0, $arg1, $arg2, $arg3) = @_;
	eval q( &do { (($sc)-> ($sc_if->{aif_set_mailbox})(($sc), ($command), ($arg0), ($arg1), ($arg2), ($arg3))); }  &while(0));
    }
}
unless(defined(&AAC_GET_MAILBOXSTATUS)) {
    sub AAC_GET_MAILBOXSTATUS {
	local($sc) = @_;
	eval q((($sc)-> ($sc_if->{aif_get_mailboxstatus})($sc)));
    }
}
unless(defined(&AAC_MASK_INTERRUPTS)) {
    sub AAC_MASK_INTERRUPTS {
	local($sc) = @_;
	eval q((($sc)-> ($sc_if->{aif_set_interrupts})(($sc), 0)));
    }
}
unless(defined(&AAC_UNMASK_INTERRUPTS)) {
    sub AAC_UNMASK_INTERRUPTS {
	local($sc) = @_;
	eval q((($sc)-> ($sc_if->{aif_set_interrupts})(($sc), 1)));
    }
}
unless(defined(&AAC_SETREG4)) {
    sub AAC_SETREG4 {
	local($sc, $reg, $val) = @_;
	eval q( &bus_space_write_4(($sc)-> &sc_memt, ($sc)-> &sc_memh, ($reg), ($val)));
    }
}
unless(defined(&AAC_GETREG4)) {
    sub AAC_GETREG4 {
	local($sc, $reg) = @_;
	eval q( &bus_space_read_4(($sc)-> &sc_memt, ($sc)-> &sc_memh, ($reg)));
    }
}
unless(defined(&AAC_SETREG2)) {
    sub AAC_SETREG2 {
	local($sc, $reg, $val) = @_;
	eval q( &bus_space_write_2(($sc)-> &sc_memt, ($sc)-> &sc_memh, ($reg), ($val)));
    }
}
unless(defined(&AAC_GETREG2)) {
    sub AAC_GETREG2 {
	local($sc, $reg) = @_;
	eval q( &bus_space_read_2(($sc)-> &sc_memt, ($sc)-> &sc_memh, ($reg)));
    }
}
unless(defined(&AAC_SETREG1)) {
    sub AAC_SETREG1 {
	local($sc, $reg, $val) = @_;
	eval q( &bus_space_write_1(($sc)-> &sc_memt, ($sc)-> &sc_memh, ($reg), ($val)));
    }
}
unless(defined(&AAC_GETREG1)) {
    sub AAC_GETREG1 {
	local($sc, $reg) = @_;
	eval q( &bus_space_read_1(($sc)-> &sc_memt, ($sc)-> &sc_memh, ($reg)));
    }
}
unless(defined(&AAC_ACF_WATCHDOG)) {
    sub AAC_ACF_WATCHDOG () {	0x1;}
}
unless(defined(&AAC_ACF_COMPLETED)) {
    sub AAC_ACF_COMPLETED () {	0x2;}
}
unless(defined(&AAC_STATE_SUSPEND)) {
    sub AAC_STATE_SUSPEND () {	(1<<0);}
}
unless(defined(&AAC_STATE_OPEN)) {
    sub AAC_STATE_OPEN () {	(1<<1);}
}
unless(defined(&AAC_STATE_INTERRUPTS_ON)) {
    sub AAC_STATE_INTERRUPTS_ON () {	(1<<2);}
}
unless(defined(&AAC_STATE_AIF_SLEEPER)) {
    sub AAC_STATE_AIF_SLEEPER () {	(1<<3);}
}
unless(defined(&AAC_HWIF_I960RX)) {
    sub AAC_HWIF_I960RX () {	0;}
}
unless(defined(&AAC_HWIF_STRONGARM)) {
    sub AAC_HWIF_STRONGARM () {	1;}
}
unless(defined(&AAC_LOCK)) {
    sub AAC_LOCK {
	local($sc) = @_;
	eval q( &splbio());
    }
}
unless(defined(&AAC_UNLOCK)) {
    sub AAC_UNLOCK {
	local($sc, $lock) = @_;
	eval q( &splx($lock));
    }
}
if(defined(&__GNUC__)) {
}
1;
