require '_h2ph_pre.ph';

unless(defined(&CCISS_IOCTLH)) {
    eval 'sub CCISS_IOCTLH () {1;}' unless defined(&CCISS_IOCTLH);
    require 'linux/types.ph';
    require 'linux/ioctl.ph';
    eval 'sub CCISS_IOC_MAGIC () {ord(\'B\');}' unless defined(&CCISS_IOC_MAGIC);
    eval 'sub CISS_PARSCSIU2 () {0x1;}' unless defined(&CISS_PARSCSIU2);
    eval 'sub CISS_PARCSCIU3 () {0x2;}' unless defined(&CISS_PARCSCIU3);
    eval 'sub CISS_FIBRE1G () {0x100;}' unless defined(&CISS_FIBRE1G);
    eval 'sub CISS_FIBRE2G () {0x200;}' unless defined(&CISS_FIBRE2G);
    unless(defined(&CCISS_CMD_H)) {
	eval 'sub SENSEINFOBYTES () {32;}' unless defined(&SENSEINFOBYTES);
	eval 'sub CMD_SUCCESS () {0x;}' unless defined(&CMD_SUCCESS);
	eval 'sub CMD_TARGET_STATUS () {0x1;}' unless defined(&CMD_TARGET_STATUS);
	eval 'sub CMD_DATA_UNDERRUN () {0x2;}' unless defined(&CMD_DATA_UNDERRUN);
	eval 'sub CMD_DATA_OVERRUN () {0x3;}' unless defined(&CMD_DATA_OVERRUN);
	eval 'sub CMD_INVALID () {0x4;}' unless defined(&CMD_INVALID);
	eval 'sub CMD_PROTOCOL_ERR () {0x5;}' unless defined(&CMD_PROTOCOL_ERR);
	eval 'sub CMD_HARDWARE_ERR () {0x6;}' unless defined(&CMD_HARDWARE_ERR);
	eval 'sub CMD_CONNECTION_LOST () {0x7;}' unless defined(&CMD_CONNECTION_LOST);
	eval 'sub CMD_ABORTED () {0x8;}' unless defined(&CMD_ABORTED);
	eval 'sub CMD_ABORT_FAILED () {0x9;}' unless defined(&CMD_ABORT_FAILED);
	eval 'sub CMD_UNSOLICITED_ABORT () {0xa;}' unless defined(&CMD_UNSOLICITED_ABORT);
	eval 'sub CMD_TIMEOUT () {0xb;}' unless defined(&CMD_TIMEOUT);
	eval 'sub CMD_UNABORTABLE () {0xc;}' unless defined(&CMD_UNABORTABLE);
	eval 'sub XFER_NONE () {0x;}' unless defined(&XFER_NONE);
	eval 'sub XFER_WRITE () {0x1;}' unless defined(&XFER_WRITE);
	eval 'sub XFER_READ () {0x2;}' unless defined(&XFER_READ);
	eval 'sub XFER_RSVD () {0x3;}' unless defined(&XFER_RSVD);
	eval 'sub ATTR_UNTAGGED () {0x;}' unless defined(&ATTR_UNTAGGED);
	eval 'sub ATTR_SIMPLE () {0x4;}' unless defined(&ATTR_SIMPLE);
	eval 'sub ATTR_HEADOFQUEUE () {0x5;}' unless defined(&ATTR_HEADOFQUEUE);
	eval 'sub ATTR_ORDERED () {0x6;}' unless defined(&ATTR_ORDERED);
	eval 'sub ATTR_ACA () {0x7;}' unless defined(&ATTR_ACA);
	eval 'sub TYPE_CMD () {0x;}' unless defined(&TYPE_CMD);
	eval 'sub TYPE_MSG () {0x1;}' unless defined(&TYPE_MSG);
	eval 'sub BYTE () { &__u8;}' unless defined(&BYTE);
	eval 'sub WORD () { &__u16;}' unless defined(&WORD);
	eval 'sub HWORD () { &__u16;}' unless defined(&HWORD);
	eval 'sub DWORD () { &__u32;}' unless defined(&DWORD);
	eval 'sub CISS_MAX_LUN () {16;}' unless defined(&CISS_MAX_LUN);
	eval 'sub LEVEL2LUN () {1;}' unless defined(&LEVEL2LUN);
	eval 'sub LEVEL3LUN () {0;}' unless defined(&LEVEL3LUN);
    }
    eval 'sub CCISS_GETPCIINFO () { &_IOR( &CCISS_IOC_MAGIC, 1,  &cciss_pci_info_struct);}' unless defined(&CCISS_GETPCIINFO);
    eval 'sub CCISS_GETINTINFO () { &_IOR( &CCISS_IOC_MAGIC, 2,  &cciss_coalint_struct);}' unless defined(&CCISS_GETINTINFO);
    eval 'sub CCISS_SETINTINFO () { &_IOW( &CCISS_IOC_MAGIC, 3,  &cciss_coalint_struct);}' unless defined(&CCISS_SETINTINFO);
    eval 'sub CCISS_GETNODENAME () { &_IOR( &CCISS_IOC_MAGIC, 4,  &NodeName_type);}' unless defined(&CCISS_GETNODENAME);
    eval 'sub CCISS_SETNODENAME () { &_IOW( &CCISS_IOC_MAGIC, 5,  &NodeName_type);}' unless defined(&CCISS_SETNODENAME);
    eval 'sub CCISS_GETHEARTBEAT () { &_IOR( &CCISS_IOC_MAGIC, 6,  &Heartbeat_type);}' unless defined(&CCISS_GETHEARTBEAT);
    eval 'sub CCISS_GETBUSTYPES () { &_IOR( &CCISS_IOC_MAGIC, 7,  &BusTypes_type);}' unless defined(&CCISS_GETBUSTYPES);
    eval 'sub CCISS_GETFIRMVER () { &_IOR( &CCISS_IOC_MAGIC, 8,  &FirmwareVer_type);}' unless defined(&CCISS_GETFIRMVER);
    eval 'sub CCISS_GETDRIVVER () { &_IOR( &CCISS_IOC_MAGIC, 9,  &DriverVer_type);}' unless defined(&CCISS_GETDRIVVER);
    eval 'sub CCISS_REVALIDVOLS () { &_IO( &CCISS_IOC_MAGIC, 10);}' unless defined(&CCISS_REVALIDVOLS);
    eval 'sub CCISS_PASSTHRU () { &_IOWR( &CCISS_IOC_MAGIC, 11,  &IOCTL_Command_struct);}' unless defined(&CCISS_PASSTHRU);
}
1;
