require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_AIC7XXX_CAM_H)) {
    eval 'sub _AIC7XXX_CAM_H () {1;}' unless defined(&_AIC7XXX_CAM_H);
    eval 'sub SCSI_REV_2 () {2;}' unless defined(&SCSI_REV_2);
    eval 'sub CAM_BUS_WILDCARD () {(~0);}' unless defined(&CAM_BUS_WILDCARD);
    eval 'sub CAM_TARGET_WILDCARD () {(~0);}' unless defined(&CAM_TARGET_WILDCARD);
    eval 'sub CAM_LUN_WILDCARD () {-1;}' unless defined(&CAM_LUN_WILDCARD);
    eval 'sub SCSI_STATUS_OK () { &SCSI_OK;}' unless defined(&SCSI_STATUS_OK);
    eval 'sub SCSI_STATUS_CHECK_COND () { &SCSI_CHECK;}' unless defined(&SCSI_STATUS_CHECK_COND);
    eval 'sub SCSI_STATUS_COND_MET () { &SCSI_COND_MET;}' unless defined(&SCSI_STATUS_COND_MET);
    eval 'sub SCSI_STATUS_BUSY () { &SCSI_BUSY;}' unless defined(&SCSI_STATUS_BUSY);
    eval 'sub SCSI_STATUS_INTERMED () { &SCSI_INTERM;}' unless defined(&SCSI_STATUS_INTERMED);
    eval 'sub SCSI_STATUS_INTERMED_COND_MET () { &SCSI_INTERMED_COND_MET;}' unless defined(&SCSI_STATUS_INTERMED_COND_MET);
    eval 'sub SCSI_STATUS_RESERV_CONFLICT () { &SCSI_RESERV_CONFLICT;}' unless defined(&SCSI_STATUS_RESERV_CONFLICT);
    eval 'sub SCSI_STATUS_CMD_TERMINATED () { &SCSI_TERMINATED;}' unless defined(&SCSI_STATUS_CMD_TERMINATED);
    eval 'sub SCSI_STATUS_QUEUE_FULL () { &SCSI_QUEUE_FULL;}' unless defined(&SCSI_STATUS_QUEUE_FULL);
    eval 'sub XS_CTL_DATA_IN () { &SCSI_DATA_IN;}' unless defined(&XS_CTL_DATA_IN);
    eval 'sub XS_CTL_POLL () { &SCSI_POLL;}' unless defined(&XS_CTL_POLL);
    eval 'sub XS_CTL_RESET () { &SCSI_RESET;}' unless defined(&XS_CTL_RESET);
    eval 'sub MSG_EXT_PPR_QAS_REQ () { &MSG_EXT_PPR_PROT_QAS;}' unless defined(&MSG_EXT_PPR_QAS_REQ);
    eval 'sub MSG_EXT_PPR_IU_REQ () { &MSG_EXT_PPR_PROT_IUS;}' unless defined(&MSG_EXT_PPR_IU_REQ);
    eval 'sub MSG_EXT_PPR_DT_REQ () { &MSG_EXT_PPR_PROT_DT;}' unless defined(&MSG_EXT_PPR_DT_REQ);
    eval 'sub MSG_ORDERED_TASK () { &MSG_ORDERED_Q_TAG;}' unless defined(&MSG_ORDERED_TASK);
    eval 'sub MSG_SIMPLE_TASK () { &MSG_SIMPLE_Q_TAG;}' unless defined(&MSG_SIMPLE_TASK);
    eval 'sub MSG_ABORT_TASK () { &MSG_ABORT_TAG;}' unless defined(&MSG_ABORT_TASK);
    eval 'sub scsipi_channel () { &scsi_link;}' unless defined(&scsipi_channel);
    eval 'sub scsipi_xfer () { &scsi_xfer;}' unless defined(&scsipi_xfer);
    eval 'sub scsipi_adapter () { &scsi_adapter;}' unless defined(&scsipi_adapter);
    eval 'sub scsipi_sense_data () { &scsi_sense_data;}' unless defined(&scsipi_sense_data);
    eval 'sub scsipi_sense () { &scsi_sense;}' unless defined(&scsipi_sense);
    eval 'sub scsipi_periph () { &scsi_link;}' unless defined(&scsipi_periph);
    eval 'sub callout_reset {
        my($timer, $timeout, $func, $arg) = @_;
	    eval q( &do {  &if (! &timeout_initialized(($timer)))  &timeout_set(($timer), ($func), ($arg));  &timeout_add(($timer), ($timeout)); }  &while (0));
    }' unless defined(&callout_reset);
    eval 'sub aic_delay () { &DELAY;}' unless defined(&aic_delay);
    eval 'sub aic_htobe16 {
        my($x) = @_;
	    eval q( &htobe16($x));
    }' unless defined(&aic_htobe16);
    eval 'sub aic_htobe32 {
        my($x) = @_;
	    eval q( &htobe32($x));
    }' unless defined(&aic_htobe32);
    eval 'sub aic_htobe64 {
        my($x) = @_;
	    eval q( &htobe64($x));
    }' unless defined(&aic_htobe64);
    eval 'sub aic_htole16 {
        my($x) = @_;
	    eval q( &htole16($x));
    }' unless defined(&aic_htole16);
    eval 'sub aic_htole32 {
        my($x) = @_;
	    eval q( &htole32($x));
    }' unless defined(&aic_htole32);
    eval 'sub aic_htole64 {
        my($x) = @_;
	    eval q( &htole64($x));
    }' unless defined(&aic_htole64);
    eval 'sub aic_be16toh {
        my($x) = @_;
	    eval q( &be16toh($x));
    }' unless defined(&aic_be16toh);
    eval 'sub aic_be32toh {
        my($x) = @_;
	    eval q( &be32toh($x));
    }' unless defined(&aic_be32toh);
    eval 'sub aic_be64toh {
        my($x) = @_;
	    eval q( &be64toh($x));
    }' unless defined(&aic_be64toh);
    eval 'sub aic_le16toh {
        my($x) = @_;
	    eval q( &letoh16($x));
    }' unless defined(&aic_le16toh);
    eval 'sub aic_le32toh {
        my($x) = @_;
	    eval q( &letoh32($x));
    }' unless defined(&aic_le32toh);
    eval 'sub aic_le64toh {
        my($x) = @_;
	    eval q( &letoh64($x));
    }' unless defined(&aic_le64toh);
    eval 'sub xs_control () { &flags;}' unless defined(&xs_control);
    eval 'sub xs_callout () { &stimeout;}' unless defined(&xs_callout);
    eval 'sub xs_status () { &status;}' unless defined(&xs_status);
    eval("sub CAM_REQ_INPROG () { 0; }") unless defined(&CAM_REQ_INPROG);
    eval("sub CAM_REQ_CMP () { 1; }") unless defined(&CAM_REQ_CMP);
    eval("sub CAM_REQ_ABORTED () { 2; }") unless defined(&CAM_REQ_ABORTED);
    eval("sub CAM_UA_ABORT () { 3; }") unless defined(&CAM_UA_ABORT);
    eval("sub CAM_REQ_CMP_ERR () { 4; }") unless defined(&CAM_REQ_CMP_ERR);
    eval("sub CAM_BUSY () { 5; }") unless defined(&CAM_BUSY);
    eval("sub CAM_REQ_INVALID () { 6; }") unless defined(&CAM_REQ_INVALID);
    eval("sub CAM_PATH_INVALID () { 7; }") unless defined(&CAM_PATH_INVALID);
    eval("sub CAM_SEL_TIMEOUT () { 8; }") unless defined(&CAM_SEL_TIMEOUT);
    eval("sub CAM_CMD_TIMEOUT () { 9; }") unless defined(&CAM_CMD_TIMEOUT);
    eval("sub CAM_SCSI_STATUS_ERROR () { 10; }") unless defined(&CAM_SCSI_STATUS_ERROR);
    eval("sub CAM_SCSI_BUS_RESET () { 11; }") unless defined(&CAM_SCSI_BUS_RESET);
    eval("sub CAM_UNCOR_PARITY () { 12; }") unless defined(&CAM_UNCOR_PARITY);
    eval("sub CAM_AUTOSENSE_FAIL () { 13; }") unless defined(&CAM_AUTOSENSE_FAIL);
    eval("sub CAM_NO_HBA () { 14; }") unless defined(&CAM_NO_HBA);
    eval("sub CAM_DATA_RUN_ERR () { 15; }") unless defined(&CAM_DATA_RUN_ERR);
    eval("sub CAM_UNEXP_BUSFREE () { 16; }") unless defined(&CAM_UNEXP_BUSFREE);
    eval("sub CAM_SEQUENCE_FAIL () { 17; }") unless defined(&CAM_SEQUENCE_FAIL);
    eval("sub CAM_CCB_LEN_ERR () { 18; }") unless defined(&CAM_CCB_LEN_ERR);
    eval("sub CAM_PROVIDE_FAIL () { 19; }") unless defined(&CAM_PROVIDE_FAIL);
    eval("sub CAM_BDR_SENT () { 20; }") unless defined(&CAM_BDR_SENT);
    eval("sub CAM_REQ_TERMIO () { 21; }") unless defined(&CAM_REQ_TERMIO);
    eval("sub CAM_UNREC_HBA_ERROR () { 22; }") unless defined(&CAM_UNREC_HBA_ERROR);
    eval("sub CAM_REQ_TOO_BIG () { 23; }") unless defined(&CAM_REQ_TOO_BIG);
    eval("sub CAM_UA_TERMIO () { 24; }") unless defined(&CAM_UA_TERMIO);
    eval("sub CAM_MSG_REJECT_REC () { 25; }") unless defined(&CAM_MSG_REJECT_REC);
    eval("sub CAM_DEV_NOT_THERE () { 26; }") unless defined(&CAM_DEV_NOT_THERE);
    eval("sub CAM_RESRC_UNAVAIL () { 27; }") unless defined(&CAM_RESRC_UNAVAIL);
    eval("sub CAM_REQUEUE_REQ () { 28; }") unless defined(&CAM_REQUEUE_REQ);
    eval("sub CAM_DEV_QFRZN () { 0x40; }") unless defined(&CAM_DEV_QFRZN);
    eval("sub CAM_STATUS_MASK () { 0x3F; }") unless defined(&CAM_STATUS_MASK);
    eval("sub CAM_DIR_IN () { SCSI_DATA_IN; }") unless defined(&CAM_DIR_IN);
    eval("sub CAM_DIR_OUT () { SCSI_DATA_OUT; }") unless defined(&CAM_DIR_OUT);
    eval("sub AC_BUS_RESET () { 0x001; }") unless defined(&AC_BUS_RESET);
    eval("sub AC_UNSOL_RESEL () { 0x002; }") unless defined(&AC_UNSOL_RESEL);
    eval("sub AC_SCSI_AEN () { 0x008; }") unless defined(&AC_SCSI_AEN);
    eval("sub AC_SENT_BDR () { 0x010; }") unless defined(&AC_SENT_BDR);
    eval("sub AC_PATH_REGISTERED () { 0x020; }") unless defined(&AC_PATH_REGISTERED);
    eval("sub AC_PATH_DEREGISTERED () { 0x040; }") unless defined(&AC_PATH_DEREGISTERED);
    eval("sub AC_FOUND_DEVICE () { 0x080; }") unless defined(&AC_FOUND_DEVICE);
    eval("sub AC_LOST_DEVICE () { 0x100; }") unless defined(&AC_LOST_DEVICE);
    eval("sub AC_TRANSFER_NEG () { 0x200; }") unless defined(&AC_TRANSFER_NEG);
    eval("sub AC_INQ_CHANGED () { 0x400; }") unless defined(&AC_INQ_CHANGED);
    eval("sub AC_GETDEV_CHANGED () { 0x800; }") unless defined(&AC_GETDEV_CHANGED);
}
1;
