require '_h2ph_pre.ph';

unless(defined(&ltophys)) {
    sub ltophys () {	 &_lto4l;}
}
unless(defined(&phystol)) {
    sub phystol () {	 &_4ltol;}
}
unless(defined(&BT_CTRL_PORT)) {
    sub BT_CTRL_PORT () {	0;}
}
unless(defined(&BT_STAT_PORT)) {
    sub BT_STAT_PORT () {	0;}
}
unless(defined(&BT_CMD_PORT)) {
    sub BT_CMD_PORT () {	1;}
}
unless(defined(&BT_DATA_PORT)) {
    sub BT_DATA_PORT () {	1;}
}
unless(defined(&BT_INTR_PORT)) {
    sub BT_INTR_PORT () {	2;}
}
unless(defined(&BT_CTRL_HRST)) {
    sub BT_CTRL_HRST () {	0x80;}
}
unless(defined(&BT_CTRL_SRST)) {
    sub BT_CTRL_SRST () {	0x40;}
}
unless(defined(&BT_CTRL_IRST)) {
    sub BT_CTRL_IRST () {	0x20;}
}
unless(defined(&BT_CTRL_SCRST)) {
    sub BT_CTRL_SCRST () {	0x10;}
}
unless(defined(&BT_STAT_STST)) {
    sub BT_STAT_STST () {	0x80;}
}
unless(defined(&BT_STAT_DIAGF)) {
    sub BT_STAT_DIAGF () {	0x40;}
}
unless(defined(&BT_STAT_INIT)) {
    sub BT_STAT_INIT () {	0x20;}
}
unless(defined(&BT_STAT_IDLE)) {
    sub BT_STAT_IDLE () {	0x10;}
}
unless(defined(&BT_STAT_CDF)) {
    sub BT_STAT_CDF () {	0x08;}
}
unless(defined(&BT_STAT_DF)) {
    sub BT_STAT_DF () {	0x04;}
}
unless(defined(&BT_STAT_INVDCMD)) {
    sub BT_STAT_INVDCMD () {	0x01;}
}
unless(defined(&BT_NOP)) {
    sub BT_NOP () {	0x00;}
}
unless(defined(&BT_MBX_INIT)) {
    sub BT_MBX_INIT () {	0x01;}
}
unless(defined(&BT_START_SCSI)) {
    sub BT_START_SCSI () {	0x02;}
}
unless(defined(&BT_INQUIRE_REVISION)) {
    sub BT_INQUIRE_REVISION () {	0x04;}
}
unless(defined(&BT_MBO_INTR_EN)) {
    sub BT_MBO_INTR_EN () {	0x05;}
}
if(0) {
    eval 'sub BT_SEL_TIMEOUT_SET () {0x06;}' unless defined(&BT_SEL_TIMEOUT_SET);
    eval 'sub BT_BUS_ON_TIME_SET () {0x07;}' unless defined(&BT_BUS_ON_TIME_SET);
    eval 'sub BT_BUS_OFF_TIME_SET () {0x08;}' unless defined(&BT_BUS_OFF_TIME_SET);
    eval 'sub BT_SPEED_SET () {0x09;}' unless defined(&BT_SPEED_SET);
}
unless(defined(&BT_INQUIRE_DEVICES)) {
    sub BT_INQUIRE_DEVICES () {	0x0a;}
}
unless(defined(&BT_INQUIRE_CONFIG)) {
    sub BT_INQUIRE_CONFIG () {	0x0b;}
}
unless(defined(&BT_TARGET_EN)) {
    sub BT_TARGET_EN () {	0x0c;}
}
unless(defined(&BT_INQUIRE_SETUP)) {
    sub BT_INQUIRE_SETUP () {	0x0d;}
}
unless(defined(&BT_ECHO)) {
    sub BT_ECHO () {	0x1e;}
}
unless(defined(&BT_INQUIRE_DEVICES_2)) {
    sub BT_INQUIRE_DEVICES_2 () {	0x23;}
}
unless(defined(&BT_MBX_INIT_EXTENDED)) {
    sub BT_MBX_INIT_EXTENDED () {	0x81;}
}
unless(defined(&BT_INQUIRE_REVISION_3)) {
    sub BT_INQUIRE_REVISION_3 () {	0x84;}
}
unless(defined(&BT_INQUIRE_REVISION_4)) {
    sub BT_INQUIRE_REVISION_4 () {	0x85;}
}
unless(defined(&BT_INQUIRE_MODEL)) {
    sub BT_INQUIRE_MODEL () {	0x8b;}
}
unless(defined(&BT_INQUIRE_PERIOD)) {
    sub BT_INQUIRE_PERIOD () {	0x8c;}
}
unless(defined(&BT_INQUIRE_EXTENDED)) {
    sub BT_INQUIRE_EXTENDED () {	0x8d;}
}
unless(defined(&BT_ROUND_ROBIN)) {
    sub BT_ROUND_ROBIN () {	0x8f;}
}
unless(defined(&BT_INTR_ANYINTR)) {
    sub BT_INTR_ANYINTR () {	0x80;}
}
unless(defined(&BT_INTR_SCRD)) {
    sub BT_INTR_SCRD () {	0x08;}
}
unless(defined(&BT_INTR_HACC)) {
    sub BT_INTR_HACC () {	0x04;}
}
unless(defined(&BT_INTR_MBOA)) {
    sub BT_INTR_MBOA () {	0x02;}
}
unless(defined(&BT_INTR_MBIF)) {
    sub BT_INTR_MBIF () {	0x01;}
}
unless(defined(&BT_MBO_FREE)) {
    sub BT_MBO_FREE () {	0x0;}
}
unless(defined(&BT_MBO_START)) {
    sub BT_MBO_START () {	0x1;}
}
unless(defined(&BT_MBO_ABORT)) {
    sub BT_MBO_ABORT () {	0x2;}
}
unless(defined(&BT_MBI_FREE)) {
    sub BT_MBI_FREE () {	0x0;}
}
unless(defined(&BT_MBI_OK)) {
    sub BT_MBI_OK () {	0x1;}
}
unless(defined(&BT_MBI_ABORT)) {
    sub BT_MBI_ABORT () {	0x2;}
}
unless(defined(&BT_MBI_UNKNOWN)) {
    sub BT_MBI_UNKNOWN () {	0x3;}
}
unless(defined(&BT_MBI_ERROR)) {
    sub BT_MBI_ERROR () {	0x4;}
}
if(defined( &BIG_DMA)) {
    if(0) {
	eval 'sub BT_NSEG () {2048;}' unless defined(&BT_NSEG);
    }
    eval 'sub BT_NSEG () {128;}' unless defined(&BT_NSEG);
} else {
    eval 'sub BT_NSEG () {33;}' unless defined(&BT_NSEG);
}
unless(defined(&CCB_ALLOC)) {
    sub CCB_ALLOC () {	0x01;}
}
unless(defined(&CCB_ABORT)) {
    sub CCB_ABORT () {	0x02;}
}
if(defined(&BTDIAG)) {
    eval 'sub CCB_SENDING () {0x04;}' unless defined(&CCB_SENDING);
}
unless(defined(&BT_INITIATOR_CCB)) {
    sub BT_INITIATOR_CCB () {	0x00;}
}
unless(defined(&BT_TARGET_CCB)) {
    sub BT_TARGET_CCB () {	0x01;}
}
unless(defined(&BT_INIT_SCAT_GATH_CCB)) {
    sub BT_INIT_SCAT_GATH_CCB () {	0x02;}
}
unless(defined(&BT_RESET_CCB)) {
    sub BT_RESET_CCB () {	0x81;}
}
unless(defined(&BT_OK)) {
    sub BT_OK () {	0x00;}
}
unless(defined(&BT_LINK_OK)) {
    sub BT_LINK_OK () {	0x0a;}
}
unless(defined(&BT_LINK_IT)) {
    sub BT_LINK_IT () {	0x0b;}
}
unless(defined(&BT_SEL_TIMEOUT)) {
    sub BT_SEL_TIMEOUT () {	0x11;}
}
unless(defined(&BT_OVER_UNDER)) {
    sub BT_OVER_UNDER () {	0x12;}
}
unless(defined(&BT_BUS_FREE)) {
    sub BT_BUS_FREE () {	0x13;}
}
unless(defined(&BT_INV_BUS)) {
    sub BT_INV_BUS () {	0x14;}
}
unless(defined(&BT_BAD_MBO)) {
    sub BT_BAD_MBO () {	0x15;}
}
unless(defined(&BT_BAD_CCB)) {
    sub BT_BAD_CCB () {	0x16;}
}
unless(defined(&BT_BAD_LINK)) {
    sub BT_BAD_LINK () {	0x17;}
}
unless(defined(&BT_INV_TARGET)) {
    sub BT_INV_TARGET () {	0x18;}
}
unless(defined(&BT_CCB_DUP)) {
    sub BT_CCB_DUP () {	0x19;}
}
unless(defined(&BT_INV_CCB)) {
    sub BT_INV_CCB () {	0x1a;}
}
unless(defined(&BT_BUS_TYPE_24BIT)) {
    sub BT_BUS_TYPE_24BIT () {	ord('A');}
}
unless(defined(&BT_BUS_TYPE_32BIT)) {
    sub BT_BUS_TYPE_32BIT () {	ord('E');}
}
unless(defined(&BT_BUS_TYPE_MCA)) {
    sub BT_BUS_TYPE_MCA () {	ord('M');}
}
unless(defined(&INT9)) {
    sub INT9 () {	0x01;}
}
unless(defined(&INT10)) {
    sub INT10 () {	0x02;}
}
unless(defined(&INT11)) {
    sub INT11 () {	0x04;}
}
unless(defined(&INT12)) {
    sub INT12 () {	0x08;}
}
unless(defined(&INT14)) {
    sub INT14 () {	0x20;}
}
unless(defined(&INT15)) {
    sub INT15 () {	0x40;}
}
unless(defined(&EISADMA)) {
    sub EISADMA () {	0x00;}
}
unless(defined(&CHAN0)) {
    sub CHAN0 () {	0x01;}
}
unless(defined(&CHAN5)) {
    sub CHAN5 () {	0x20;}
}
unless(defined(&CHAN6)) {
    sub CHAN6 () {	0x40;}
}
unless(defined(&CHAN7)) {
    sub CHAN7 () {	0x80;}
}
1;
