require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&AIC_NPORTS)) {
    sub AIC_NPORTS () {	0x20;}
}
if(defined(&notyet)) {
    eval 'sub AIC_NSEG () {16;}' unless defined(&AIC_NSEG);
}
if(defined(&notdef)) {
}
unless(defined(&ACB_ALLOC)) {
    sub ACB_ALLOC () {	0x1;}
}
unless(defined(&ACB_NEXUS)) {
    sub ACB_NEXUS () {	0x2;}
}
unless(defined(&ACB_SENSE)) {
    sub ACB_SENSE () {	0x4;}
}
unless(defined(&ACB_ABORT)) {
    sub ACB_ABORT () {	0x40;}
}
unless(defined(&ACB_RESET)) {
    sub ACB_RESET () {	0x80;}
}
unless(defined(&DO_SYNC)) {
    sub DO_SYNC () {	0x1;}
}
unless(defined(&DO_WIDE)) {
    sub DO_WIDE () {	0x2;}
}
unless(defined(&AIC_INIT)) {
    sub AIC_INIT () {	0;}
}
unless(defined(&AIC_IDLE)) {
    sub AIC_IDLE () {	1;}
}
unless(defined(&AIC_SELECTING)) {
    sub AIC_SELECTING () {	2;}
}
unless(defined(&AIC_RESELECTED)) {
    sub AIC_RESELECTED () {	3;}
}
unless(defined(&AIC_CONNECTED)) {
    sub AIC_CONNECTED () {	4;}
}
unless(defined(&AIC_DISCONNECT)) {
    sub AIC_DISCONNECT () {	5;}
}
unless(defined(&AIC_CMDCOMPLETE)) {
    sub AIC_CMDCOMPLETE () {	6;}
}
unless(defined(&AIC_CLEANING)) {
    sub AIC_CLEANING () {	7;}
}
unless(defined(&AIC_DROP_MSGIN)) {
    sub AIC_DROP_MSGIN () {	0x1;}
}
unless(defined(&AIC_ABORTING)) {
    sub AIC_ABORTING () {	0x2;}
}
unless(defined(&AIC_DOINGDMA)) {
    sub AIC_DOINGDMA () {	0x4;}
}
unless(defined(&SEND_DEV_RESET)) {
    sub SEND_DEV_RESET () {	0x1;}
}
unless(defined(&SEND_PARITY_ERROR)) {
    sub SEND_PARITY_ERROR () {	0x2;}
}
unless(defined(&SEND_INIT_DET_ERR)) {
    sub SEND_INIT_DET_ERR () {	0x4;}
}
unless(defined(&SEND_REJECT)) {
    sub SEND_REJECT () {	0x8;}
}
unless(defined(&SEND_IDENTIFY)) {
    sub SEND_IDENTIFY () {	0x10;}
}
unless(defined(&SEND_ABORT)) {
    sub SEND_ABORT () {	0x20;}
}
unless(defined(&SEND_SDTR)) {
    sub SEND_SDTR () {	0x40;}
}
unless(defined(&SEND_WDTR)) {
    sub SEND_WDTR () {	0x80;}
}
unless(defined(&AIC_MAX_MSG_LEN)) {
    sub AIC_MAX_MSG_LEN () {	8;}
}
if((defined(&AIC_DEBUG) ? &AIC_DEBUG : 0)) {
    eval 'sub AIC_SHOWACBS () {0x1;}' unless defined(&AIC_SHOWACBS);
    eval 'sub AIC_SHOWINTS () {0x2;}' unless defined(&AIC_SHOWINTS);
    eval 'sub AIC_SHOWCMDS () {0x4;}' unless defined(&AIC_SHOWCMDS);
    eval 'sub AIC_SHOWMISC () {0x8;}' unless defined(&AIC_SHOWMISC);
    eval 'sub AIC_SHOWTRACE () {0x10;}' unless defined(&AIC_SHOWTRACE);
    eval 'sub AIC_SHOWSTART () {0x20;}' unless defined(&AIC_SHOWSTART);
    eval 'sub AIC_DOBREAK () {0x40;}' unless defined(&AIC_DOBREAK);
    eval 'sub AIC_PRINT {
        my($b, $s) = @_;
	    eval q( &do { &if (( &aic_debug & ($b)) != 0)  &printf $s;}  &while (0));
    }' unless defined(&AIC_PRINT);
    eval 'sub AIC_BREAK () {
        eval q( &do {  &if (( &aic_debug &  &AIC_DOBREAK) != 0)  &Debugger(); }  &while (0));
    }' unless defined(&AIC_BREAK);
    eval 'sub AIC_ASSERT {
        my($x) = @_;
	    eval q( &do {  &if (!$x) {  &printf(\\"%s at line %d: assertion failed\\\\n\\",  ($sc->{sc_dev}->{dv_xname}),  &__LINE__);  &Debugger(); } }  &while (0));
    }' unless defined(&AIC_ASSERT);
} else {
    eval 'sub AIC_PRINT {
        my($b, $s) = @_;
	    eval q();
    }' unless defined(&AIC_PRINT);
    eval 'sub AIC_BREAK () {
        eval q();
    }' unless defined(&AIC_BREAK);
    eval 'sub AIC_ASSERT {
        my($x) = @_;
	    eval q();
    }' unless defined(&AIC_ASSERT);
}
unless(defined(&AIC_ACBS)) {
    sub AIC_ACBS {
	my($s) = @_;
	eval q( &AIC_PRINT( &AIC_SHOWACBS, $s));
    }
}
unless(defined(&AIC_INTS)) {
    sub AIC_INTS {
	my($s) = @_;
	eval q( &AIC_PRINT( &AIC_SHOWINTS, $s));
    }
}
unless(defined(&AIC_CMDS)) {
    sub AIC_CMDS {
	my($s) = @_;
	eval q( &AIC_PRINT( &AIC_SHOWCMDS, $s));
    }
}
unless(defined(&AIC_MISC)) {
    sub AIC_MISC {
	my($s) = @_;
	eval q( &AIC_PRINT( &AIC_SHOWMISC, $s));
    }
}
unless(defined(&AIC_TRACE)) {
    sub AIC_TRACE {
	my($s) = @_;
	eval q( &AIC_PRINT( &AIC_SHOWTRACE, $s));
    }
}
unless(defined(&AIC_START)) {
    sub AIC_START {
	my($s) = @_;
	eval q( &AIC_PRINT( &AIC_SHOWSTART, $s));
    }
}
1;
