require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SCSI_SCSI_ALL_H)) {
    eval 'sub _SCSI_SCSI_ALL_H () {1;}' unless defined(&_SCSI_SCSI_ALL_H);
    eval 'sub SCSI_CTL_LINK () {0x1;}' unless defined(&SCSI_CTL_LINK);
    eval 'sub SCSI_CTL_FLAG () {0x2;}' unless defined(&SCSI_CTL_FLAG);
    eval 'sub SCSI_CTL_VENDOR () {0xc0;}' unless defined(&SCSI_CTL_VENDOR);
    eval 'sub SCSI_CMD_LUN_MASK () {0xe0;}' unless defined(&SCSI_CMD_LUN_MASK);
    eval 'sub SCSI_CMD_LUN_SHIFT () {5;}' unless defined(&SCSI_CMD_LUN_SHIFT);
    eval 'sub SSD_UOL () {0x1;}' unless defined(&SSD_UOL);
    eval 'sub SSD_DOL () {0x2;}' unless defined(&SSD_DOL);
    eval 'sub SSD_SELFTEST () {0x4;}' unless defined(&SSD_SELFTEST);
    eval 'sub SSD_PF () {0x10;}' unless defined(&SSD_PF);
    eval 'sub SI_EVPD () {0x1;}' unless defined(&SI_EVPD);
    eval 'sub SMS_DBD () {0x8;}' unless defined(&SMS_DBD);
    eval 'sub SMS_PAGE_CODE () {0x3f;}' unless defined(&SMS_PAGE_CODE);
    eval 'sub SMS_PAGE_CTRL () {0xc0;}' unless defined(&SMS_PAGE_CTRL);
    eval 'sub SMS_PAGE_CTRL_CURRENT () {0x;}' unless defined(&SMS_PAGE_CTRL_CURRENT);
    eval 'sub SMS_PAGE_CTRL_CHANGEABLE () {0x40;}' unless defined(&SMS_PAGE_CTRL_CHANGEABLE);
    eval 'sub SMS_PAGE_CTRL_DEFAULT () {0x80;}' unless defined(&SMS_PAGE_CTRL_DEFAULT);
    eval 'sub SMS_PAGE_CTRL_SAVED () {0xc0;}' unless defined(&SMS_PAGE_CTRL_SAVED);
    eval 'sub SMS_LLBAA () {0x10;}' unless defined(&SMS_LLBAA);
    eval 'sub SMS_SP () {0x1;}' unless defined(&SMS_SP);
    eval 'sub SMS_PF () {0x10;}' unless defined(&SMS_PF);
    eval 'sub PR_PREVENT () {0x1;}' unless defined(&PR_PREVENT);
    eval 'sub PR_ALLOW () {0x;}' unless defined(&PR_ALLOW);
    eval 'sub REPORT_NORMAL () {0x;}' unless defined(&REPORT_NORMAL);
    eval 'sub REPORT_WELLKNOWN () {0x1;}' unless defined(&REPORT_WELLKNOWN);
    eval 'sub REPORT_ALL () {0x2;}' unless defined(&REPORT_ALL);
    eval 'sub TEST_UNIT_READY () {0x;}' unless defined(&TEST_UNIT_READY);
    eval 'sub REQUEST_SENSE () {0x3;}' unless defined(&REQUEST_SENSE);
    eval 'sub INQUIRY () {0x12;}' unless defined(&INQUIRY);
    eval 'sub MODE_SELECT () {0x15;}' unless defined(&MODE_SELECT);
    eval 'sub RESERVE () {0x16;}' unless defined(&RESERVE);
    eval 'sub RELEASE () {0x17;}' unless defined(&RELEASE);
    eval 'sub MODE_SENSE () {0x1a;}' unless defined(&MODE_SENSE);
    eval 'sub START_STOP () {0x1b;}' unless defined(&START_STOP);
    eval 'sub RECEIVE_DIAGNOSTIC () {0x1c;}' unless defined(&RECEIVE_DIAGNOSTIC);
    eval 'sub SEND_DIAGNOSTIC () {0x1d;}' unless defined(&SEND_DIAGNOSTIC);
    eval 'sub PREVENT_ALLOW () {0x1e;}' unless defined(&PREVENT_ALLOW);
    eval 'sub POSITION_TO_ELEMENT () {0x2b;}' unless defined(&POSITION_TO_ELEMENT);
    eval 'sub WRITE_BUFFER () {0x3b;}' unless defined(&WRITE_BUFFER);
    eval 'sub READ_BUFFER () {0x3c;}' unless defined(&READ_BUFFER);
    eval 'sub CHANGE_DEFINITION () {0x40;}' unless defined(&CHANGE_DEFINITION);
    eval 'sub MODE_SELECT_BIG () {0x55;}' unless defined(&MODE_SELECT_BIG);
    eval 'sub MODE_SENSE_BIG () {0x5a;}' unless defined(&MODE_SENSE_BIG);
    eval 'sub REPORT_LUNS () {0xa0;}' unless defined(&REPORT_LUNS);
    eval 'sub GENRETRY () {1;}' unless defined(&GENRETRY);
    eval 'sub T_DIRECT () {0;}' unless defined(&T_DIRECT);
    eval 'sub T_SEQUENTIAL () {1;}' unless defined(&T_SEQUENTIAL);
    eval 'sub T_PRINTER () {2;}' unless defined(&T_PRINTER);
    eval 'sub T_PROCESSOR () {3;}' unless defined(&T_PROCESSOR);
    eval 'sub T_WORM () {4;}' unless defined(&T_WORM);
    eval 'sub T_CDROM () {5;}' unless defined(&T_CDROM);
    eval 'sub T_SCANNER () {6;}' unless defined(&T_SCANNER);
    eval 'sub T_OPTICAL () {7;}' unless defined(&T_OPTICAL);
    eval 'sub T_RDIRECT () {14;}' unless defined(&T_RDIRECT);
    eval 'sub T_NODEVICE () {0x1f;}' unless defined(&T_NODEVICE);
    eval 'sub T_CHANGER () {8;}' unless defined(&T_CHANGER);
    eval 'sub T_COMM () {9;}' unless defined(&T_COMM);
    eval 'sub T_ENCLOSURE () {13;}' unless defined(&T_ENCLOSURE);
    eval 'sub T_REMOV () {1;}' unless defined(&T_REMOV);
    eval 'sub T_FIXED () {0;}' unless defined(&T_FIXED);
    eval 'sub SID_TYPE () {0x1f;}' unless defined(&SID_TYPE);
    eval 'sub SID_QUAL () {0xe0;}' unless defined(&SID_QUAL);
    eval 'sub SID_QUAL_LU_OK () {0x;}' unless defined(&SID_QUAL_LU_OK);
    eval 'sub SID_QUAL_LU_OFFLINE () {0x20;}' unless defined(&SID_QUAL_LU_OFFLINE);
    eval 'sub SID_QUAL_RSVD () {0x40;}' unless defined(&SID_QUAL_RSVD);
    eval 'sub SID_QUAL_BAD_LU () {0x60;}' unless defined(&SID_QUAL_BAD_LU);
    eval 'sub SID_QUAL2 () {0x7f;}' unless defined(&SID_QUAL2);
    eval 'sub SID_REMOVABLE () {0x80;}' unless defined(&SID_REMOVABLE);
    eval 'sub SID_ANSII () {0x7;}' unless defined(&SID_ANSII);
    eval 'sub SID_ECMA () {0x38;}' unless defined(&SID_ECMA);
    eval 'sub SID_ISO () {0xc0;}' unless defined(&SID_ISO);
    eval 'sub SID_INQUIRY_HDR () {5;}' unless defined(&SID_INQUIRY_HDR);
    eval 'sub SID_SCSI2_ALEN () {31;}' unless defined(&SID_SCSI2_ALEN);
    eval 'sub SID_SftRe () {0x1;}' unless defined(&SID_SftRe);
    eval 'sub SID_CmdQue () {0x2;}' unless defined(&SID_CmdQue);
    eval 'sub SID_Linked () {0x8;}' unless defined(&SID_Linked);
    eval 'sub SID_Sync () {0x10;}' unless defined(&SID_Sync);
    eval 'sub SID_WBus16 () {0x20;}' unless defined(&SID_WBus16);
    eval 'sub SID_WBus32 () {0x40;}' unless defined(&SID_WBus32);
    eval 'sub SID_RelAdr () {0x80;}' unless defined(&SID_RelAdr);
    eval 'sub SID_IUS () {0x1;}' unless defined(&SID_IUS);
    eval 'sub SID_QAS () {0x2;}' unless defined(&SID_QAS);
    eval 'sub SID_CLOCKING () {0xc;}' unless defined(&SID_CLOCKING);
    eval 'sub SSD_ERRCODE_CURRENT () {0x70;}' unless defined(&SSD_ERRCODE_CURRENT);
    eval 'sub SSD_ERRCODE_DEFERRED () {0x71;}' unless defined(&SSD_ERRCODE_DEFERRED);
    eval 'sub SSD_ERRCODE () {0x7f;}' unless defined(&SSD_ERRCODE);
    eval 'sub SSD_ERRCODE_VALID () {0x80;}' unless defined(&SSD_ERRCODE_VALID);
    eval 'sub SSD_KEY () {0xf;}' unless defined(&SSD_KEY);
    eval 'sub SSD_ILI () {0x20;}' unless defined(&SSD_ILI);
    eval 'sub SSD_EOM () {0x40;}' unless defined(&SSD_EOM);
    eval 'sub SSD_FILEMARK () {0x80;}' unless defined(&SSD_FILEMARK);
    eval 'sub SSD_SCS_VALID () {0x80;}' unless defined(&SSD_SCS_VALID);
    eval 'sub SSD_SCS_CDB_ERROR () {0x40;}' unless defined(&SSD_SCS_CDB_ERROR);
    eval 'sub SSD_SCS_SEGMENT_DESC () {0x20;}' unless defined(&SSD_SCS_SEGMENT_DESC);
    eval 'sub SSD_SCS_VALID_BIT_INDEX () {0x8;}' unless defined(&SSD_SCS_VALID_BIT_INDEX);
    eval 'sub SSD_SCS_BIT_INDEX () {0x7;}' unless defined(&SSD_SCS_BIT_INDEX);
    eval 'sub SKEY_NO_SENSE () {0x;}' unless defined(&SKEY_NO_SENSE);
    eval 'sub SKEY_RECOVERED_ERROR () {0x1;}' unless defined(&SKEY_RECOVERED_ERROR);
    eval 'sub SKEY_NOT_READY () {0x2;}' unless defined(&SKEY_NOT_READY);
    eval 'sub SKEY_MEDIUM_ERROR () {0x3;}' unless defined(&SKEY_MEDIUM_ERROR);
    eval 'sub SKEY_HARDWARE_ERROR () {0x4;}' unless defined(&SKEY_HARDWARE_ERROR);
    eval 'sub SKEY_ILLEGAL_REQUEST () {0x5;}' unless defined(&SKEY_ILLEGAL_REQUEST);
    eval 'sub SKEY_UNIT_ATTENTION () {0x6;}' unless defined(&SKEY_UNIT_ATTENTION);
    eval 'sub SKEY_WRITE_PROTECT () {0x7;}' unless defined(&SKEY_WRITE_PROTECT);
    eval 'sub SKEY_BLANK_CHECK () {0x8;}' unless defined(&SKEY_BLANK_CHECK);
    eval 'sub SKEY_VENDOR_UNIQUE () {0x9;}' unless defined(&SKEY_VENDOR_UNIQUE);
    eval 'sub SKEY_COPY_ABORTED () {0xa;}' unless defined(&SKEY_COPY_ABORTED);
    eval 'sub SKEY_ABORTED_COMMAND () {0xb;}' unless defined(&SKEY_ABORTED_COMMAND);
    eval 'sub SKEY_EQUAL () {0xc;}' unless defined(&SKEY_EQUAL);
    eval 'sub SKEY_VOLUME_OVERFLOW () {0xd;}' unless defined(&SKEY_VOLUME_OVERFLOW);
    eval 'sub SKEY_MISCOMPARE () {0xe;}' unless defined(&SKEY_MISCOMPARE);
    eval 'sub SKEY_RESERVED () {0xf;}' unless defined(&SKEY_RESERVED);
    eval 'sub ASC_ASCQ {
        my($ssd) = @_;
	    eval q((( ($ssd->{add_sense_code}) << 8) |  ($ssd->{add_sense_code_qual})));
    }' unless defined(&ASC_ASCQ);
    eval 'sub SENSE_NOT_READY_BECOMING_READY () {0x401;}' unless defined(&SENSE_NOT_READY_BECOMING_READY);
    eval 'sub SENSE_NOT_READY_INIT_REQUIRED () {0x402;}' unless defined(&SENSE_NOT_READY_INIT_REQUIRED);
    eval 'sub SENSE_NOT_READY_FORMAT () {0x404;}' unless defined(&SENSE_NOT_READY_FORMAT);
    eval 'sub SENSE_NOT_READY_REBUILD () {0x405;}' unless defined(&SENSE_NOT_READY_REBUILD);
    eval 'sub SENSE_NOT_READY_RECALC () {0x406;}' unless defined(&SENSE_NOT_READY_RECALC);
    eval 'sub SENSE_NOT_READY_INPROGRESS () {0x407;}' unless defined(&SENSE_NOT_READY_INPROGRESS);
    eval 'sub SENSE_NOT_READY_LONGWRITE () {0x408;}' unless defined(&SENSE_NOT_READY_LONGWRITE);
    eval 'sub SENSE_NOT_READY_SELFTEST () {0x409;}' unless defined(&SENSE_NOT_READY_SELFTEST);
    eval 'sub SENSE_POWER_RESET_OR_BUS () {0x2900;}' unless defined(&SENSE_POWER_RESET_OR_BUS);
    eval 'sub SENSE_POWER_ON () {0x2901;}' unless defined(&SENSE_POWER_ON);
    eval 'sub SENSE_BUS_RESET () {0x2902;}' unless defined(&SENSE_BUS_RESET);
    eval 'sub SENSE_BUS_DEVICE_RESET () {0x2903;}' unless defined(&SENSE_BUS_DEVICE_RESET);
    eval 'sub SENSE_DEVICE_INTERNAL_RESET () {0x2904;}' unless defined(&SENSE_DEVICE_INTERNAL_RESET);
    eval 'sub SENSE_TSC_CHANGE_SE () {0x2905;}' unless defined(&SENSE_TSC_CHANGE_SE);
    eval 'sub SENSE_TSC_CHANGE_LVD () {0x2906;}' unless defined(&SENSE_TSC_CHANGE_LVD);
    eval 'sub SENSE_IT_NEXUS_LOSS () {0x2907;}' unless defined(&SENSE_IT_NEXUS_LOSS);
    eval 'sub SENSE_BAD_MEDIUM () {0x3000;}' unless defined(&SENSE_BAD_MEDIUM);
    eval 'sub SENSE_NR_MEDIUM_UNKNOWN_FORMAT () {0x3001;}' unless defined(&SENSE_NR_MEDIUM_UNKNOWN_FORMAT);
    eval 'sub SENSE_NR_MEDIUM_INCOMPATIBLE_FORMAT () {0x3002;}' unless defined(&SENSE_NR_MEDIUM_INCOMPATIBLE_FORMAT);
    eval 'sub SENSE_NW_MEDIUM_UNKNOWN_FORMAT () {0x3004;}' unless defined(&SENSE_NW_MEDIUM_UNKNOWN_FORMAT);
    eval 'sub SENSE_NW_MEDIUM_INCOMPATIBLE_FORMAT () {0x3005;}' unless defined(&SENSE_NW_MEDIUM_INCOMPATIBLE_FORMAT);
    eval 'sub SENSE_NF_MEDIUM_INCOMPATIBLE_FORMAT () {0x3006;}' unless defined(&SENSE_NF_MEDIUM_INCOMPATIBLE_FORMAT);
    eval 'sub SENSE_NW_MEDIUM_AC_MISMATCH () {0x3008;}' unless defined(&SENSE_NW_MEDIUM_AC_MISMATCH);
    eval 'sub SENSE_NOMEDIUM () {0x3a00;}' unless defined(&SENSE_NOMEDIUM);
    eval 'sub SENSE_NOMEDIUM_TCLOSED () {0x3a01;}' unless defined(&SENSE_NOMEDIUM_TCLOSED);
    eval 'sub SENSE_NOMEDIUM_TOPEN () {0x3a02;}' unless defined(&SENSE_NOMEDIUM_TOPEN);
    eval 'sub SENSE_NOMEDIUM_LOADABLE () {0x3a03;}' unless defined(&SENSE_NOMEDIUM_LOADABLE);
    eval 'sub SENSE_NOMEDIUM_AUXMEM () {0x3a04;}' unless defined(&SENSE_NOMEDIUM_AUXMEM);
    eval 'sub SENSE_CARTRIDGE_FAULT () {0x5200;}' unless defined(&SENSE_CARTRIDGE_FAULT);
    eval 'sub SENSE_MEDIUM_REMOVAL_PREVENTED () {0x5302;}' unless defined(&SENSE_MEDIUM_REMOVAL_PREVENTED);
    eval 'sub LONGLBA () {0x1;}' unless defined(&LONGLBA);
    eval 'sub RPL_LUNDATA_SIZE () {8;}' unless defined(&RPL_LUNDATA_SIZE);
    eval 'sub RPL_LUNDATA_T0LUN () {1;}' unless defined(&RPL_LUNDATA_T0LUN);
    eval 'sub SIU_SNSVALID () {0x2;}' unless defined(&SIU_SNSVALID);
    eval 'sub SIU_RSPVALID () {0x1;}' unless defined(&SIU_RSPVALID);
    eval 'sub SIU_PKTFAIL_CODE {
        my($siu) = @_;
	    eval q((($siu)-> $data[3]));
    }' unless defined(&SIU_PKTFAIL_CODE);
    eval 'sub SIU_PFC_NONE () {0x;}' unless defined(&SIU_PFC_NONE);
    eval 'sub SIU_PFC_CIU_FIELDS_INVALID () {0x2;}' unless defined(&SIU_PFC_CIU_FIELDS_INVALID);
    eval 'sub SIU_PFC_TMF_NOT_SUPPORTED () {0x4;}' unless defined(&SIU_PFC_TMF_NOT_SUPPORTED);
    eval 'sub SIU_PFC_TMF_FAILED () {0x5;}' unless defined(&SIU_PFC_TMF_FAILED);
    eval 'sub SIU_PFC_INVALID_TYPE_CODE () {0x6;}' unless defined(&SIU_PFC_INVALID_TYPE_CODE);
    eval 'sub SIU_PFC_ILLEGAL_REQUEST () {0x7;}' unless defined(&SIU_PFC_ILLEGAL_REQUEST);
    eval 'sub SIU_SENSE_LENGTH {
        my($siu) = @_;
	    eval q(( &_4btol(($siu)-> &sense_length)));
    }' unless defined(&SIU_SENSE_LENGTH);
    eval 'sub SIU_SENSE_DATA {
        my($siu) = @_;
	    eval q(((($siu)-> &flags &  &SIU_RSPVALID) ? ($siu)-> $data[ &_4btol(($siu)-> &pkt_failures_length)] : ($siu)-> $data[0]));
    }' unless defined(&SIU_SENSE_DATA);
    eval 'sub SIU_TASKMGMT_NONE () {0x;}' unless defined(&SIU_TASKMGMT_NONE);
    eval 'sub SIU_TASKMGMT_ABORT_TASK () {0x1;}' unless defined(&SIU_TASKMGMT_ABORT_TASK);
    eval 'sub SIU_TASKMGMT_ABORT_TASK_SET () {0x2;}' unless defined(&SIU_TASKMGMT_ABORT_TASK_SET);
    eval 'sub SIU_TASKMGMT_CLEAR_TASK_SET () {0x4;}' unless defined(&SIU_TASKMGMT_CLEAR_TASK_SET);
    eval 'sub SIU_TASKMGMT_LUN_RESET () {0x8;}' unless defined(&SIU_TASKMGMT_LUN_RESET);
    eval 'sub SIU_TASKMGMT_TARGET_RESET () {0x20;}' unless defined(&SIU_TASKMGMT_TARGET_RESET);
    eval 'sub SIU_TASKMGMT_CLEAR_ACA () {0x40;}' unless defined(&SIU_TASKMGMT_CLEAR_ACA);
    eval 'sub SCSI_OK () {0x;}' unless defined(&SCSI_OK);
    eval 'sub SCSI_CHECK () {0x2;}' unless defined(&SCSI_CHECK);
    eval 'sub SCSI_COND_MET () {0x4;}' unless defined(&SCSI_COND_MET);
    eval 'sub SCSI_BUSY () {0x8;}' unless defined(&SCSI_BUSY);
    eval 'sub SCSI_INTERM () {0x10;}' unless defined(&SCSI_INTERM);
    eval 'sub SCSI_INTERM_COND_MET () {0x14;}' unless defined(&SCSI_INTERM_COND_MET);
    eval 'sub SCSI_RESV_CONFLICT () {0x18;}' unless defined(&SCSI_RESV_CONFLICT);
    eval 'sub SCSI_TERMINATED () {0x22;}' unless defined(&SCSI_TERMINATED);
    eval 'sub SCSI_QUEUE_FULL () {0x28;}' unless defined(&SCSI_QUEUE_FULL);
    eval 'sub SCSI_TASKSET_FULL () {0x28;}' unless defined(&SCSI_TASKSET_FULL);
    eval 'sub SCSI_ACA_ACTIVE () {0x30;}' unless defined(&SCSI_ACA_ACTIVE);
}
1;
