require '_h2ph_pre.ph';

unless(defined(&_LINUX_MTIO_H)) {
    eval 'sub _LINUX_MTIO_H () {1;}' unless defined(&_LINUX_MTIO_H);
    require 'linux/types.ph';
    require 'linux/ioctl.ph';
    require 'linux/qic117.ph';
    eval 'sub MTRESET () {0;}' unless defined(&MTRESET);
    eval 'sub MTFSF () {1;}' unless defined(&MTFSF);
    eval 'sub MTBSF () {2;}' unless defined(&MTBSF);
    eval 'sub MTFSR () {3;}' unless defined(&MTFSR);
    eval 'sub MTBSR () {4;}' unless defined(&MTBSR);
    eval 'sub MTWEOF () {5;}' unless defined(&MTWEOF);
    eval 'sub MTREW () {6;}' unless defined(&MTREW);
    eval 'sub MTOFFL () {7;}' unless defined(&MTOFFL);
    eval 'sub MTNOP () {8;}' unless defined(&MTNOP);
    eval 'sub MTRETEN () {9;}' unless defined(&MTRETEN);
    eval 'sub MTBSFM () {10;}' unless defined(&MTBSFM);
    eval 'sub MTFSFM () {11;}' unless defined(&MTFSFM);
    eval 'sub MTEOM () {12;}' unless defined(&MTEOM);
    eval 'sub MTERASE () {13;}' unless defined(&MTERASE);
    eval 'sub MTRAS1 () {14;}' unless defined(&MTRAS1);
    eval 'sub MTRAS2 () {15;}' unless defined(&MTRAS2);
    eval 'sub MTRAS3 () {16;}' unless defined(&MTRAS3);
    eval 'sub MTSETBLK () {20;}' unless defined(&MTSETBLK);
    eval 'sub MTSETDENSITY () {21;}' unless defined(&MTSETDENSITY);
    eval 'sub MTSEEK () {22;}' unless defined(&MTSEEK);
    eval 'sub MTTELL () {23;}' unless defined(&MTTELL);
    eval 'sub MTSETDRVBUFFER () {24;}' unless defined(&MTSETDRVBUFFER);
    eval 'sub MTFSS () {25;}' unless defined(&MTFSS);
    eval 'sub MTBSS () {26;}' unless defined(&MTBSS);
    eval 'sub MTWSM () {27;}' unless defined(&MTWSM);
    eval 'sub MTLOCK () {28;}' unless defined(&MTLOCK);
    eval 'sub MTUNLOCK () {29;}' unless defined(&MTUNLOCK);
    eval 'sub MTLOAD () {30;}' unless defined(&MTLOAD);
    eval 'sub MTUNLOAD () {31;}' unless defined(&MTUNLOAD);
    eval 'sub MTCOMPRESSION () {32;}' unless defined(&MTCOMPRESSION);
    eval 'sub MTSETPART () {33;}' unless defined(&MTSETPART);
    eval 'sub MTMKPART () {34;}' unless defined(&MTMKPART);
    eval 'sub MT_ISUNKNOWN () {0x1;}' unless defined(&MT_ISUNKNOWN);
    eval 'sub MT_ISQIC02 () {0x2;}' unless defined(&MT_ISQIC02);
    eval 'sub MT_ISWT5150 () {0x3;}' unless defined(&MT_ISWT5150);
    eval 'sub MT_ISARCHIVE_5945L2 () {0x4;}' unless defined(&MT_ISARCHIVE_5945L2);
    eval 'sub MT_ISCMSJ500 () {0x5;}' unless defined(&MT_ISCMSJ500);
    eval 'sub MT_ISTDC3610 () {0x6;}' unless defined(&MT_ISTDC3610);
    eval 'sub MT_ISARCHIVE_VP60I () {0x7;}' unless defined(&MT_ISARCHIVE_VP60I);
    eval 'sub MT_ISARCHIVE_2150L () {0x8;}' unless defined(&MT_ISARCHIVE_2150L);
    eval 'sub MT_ISARCHIVE_2060L () {0x9;}' unless defined(&MT_ISARCHIVE_2060L);
    eval 'sub MT_ISARCHIVESC499 () {0xa;}' unless defined(&MT_ISARCHIVESC499);
    eval 'sub MT_ISQIC02_ALL_FEATURES () {0xf;}' unless defined(&MT_ISQIC02_ALL_FEATURES);
    eval 'sub MT_ISWT5099EEN24 () {0x11;}' unless defined(&MT_ISWT5099EEN24);
    eval 'sub MT_ISTEAC_MT2ST () {0x12;}' unless defined(&MT_ISTEAC_MT2ST);
    eval 'sub MT_ISEVEREX_FT40A () {0x32;}' unless defined(&MT_ISEVEREX_FT40A);
    eval 'sub MT_ISDDS1 () {0x51;}' unless defined(&MT_ISDDS1);
    eval 'sub MT_ISDDS2 () {0x52;}' unless defined(&MT_ISDDS2);
    eval 'sub MT_ISONSTREAM_SC () {0x61;}' unless defined(&MT_ISONSTREAM_SC);
    eval 'sub MT_ISSCSI1 () {0x71;}' unless defined(&MT_ISSCSI1);
    eval 'sub MT_ISSCSI2 () {0x72;}' unless defined(&MT_ISSCSI2);
    eval 'sub MT_ISFTAPE_UNKNOWN () {0x800000;}' unless defined(&MT_ISFTAPE_UNKNOWN);
    eval 'sub MT_ISFTAPE_FLAG () {0x800000;}' unless defined(&MT_ISFTAPE_FLAG);
    eval 'sub MT_TAPE_INFO () {{ { &MT_ISUNKNOWN, "Unknown type of tape device"}, { &MT_ISQIC02, "Generic QIC-02 tape streamer"}, { &MT_ISWT5150, "Wangtek 5150, QIC-150"}, { &MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, { &MT_ISCMSJ500, "CMS Jumbo 500"}, { &MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, { &MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, { &MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, { &MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, { &MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, { &MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, { &MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, { &MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, { &MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, { &MT_ISONSTREAM_SC, "OnStream SC-, DI-, DP-, or USB tape drive"}, { &MT_ISSCSI1, "Generic SCSI-1 tape"}, { &MT_ISSCSI2, "Generic SCSI-2 tape"}, {0,  &NULL} };}' unless defined(&MT_TAPE_INFO);
    eval 'sub MT_FT_RD_SINGLE () {0;}' unless defined(&MT_FT_RD_SINGLE);
    eval 'sub MT_FT_RD_AHEAD () {1;}' unless defined(&MT_FT_RD_AHEAD);
    eval 'sub MT_FT_WR_ASYNC () {0;}' unless defined(&MT_FT_WR_ASYNC);
    eval 'sub MT_FT_WR_MULTI () {1;}' unless defined(&MT_FT_WR_MULTI);
    eval 'sub MT_FT_WR_SINGLE () {2;}' unless defined(&MT_FT_WR_SINGLE);
    eval 'sub MT_FT_WR_DELETE () {3;}' unless defined(&MT_FT_WR_DELETE);
    eval 'sub FTFMT_SET_PARMS () {1;}' unless defined(&FTFMT_SET_PARMS);
    eval 'sub FTFMT_GET_PARMS () {2;}' unless defined(&FTFMT_GET_PARMS);
    eval 'sub FTFMT_FORMAT_TRACK () {3;}' unless defined(&FTFMT_FORMAT_TRACK);
    eval 'sub FTFMT_STATUS () {4;}' unless defined(&FTFMT_STATUS);
    eval 'sub FTFMT_VERIFY () {5;}' unless defined(&FTFMT_VERIFY);
    eval 'sub MTIOCTOP () { &_IOW(ord(\'m\'), 1, \'struct mtop\');}' unless defined(&MTIOCTOP);
    eval 'sub MTIOCGET () { &_IOR(ord(\'m\'), 2, \'struct mtget\');}' unless defined(&MTIOCGET);
    eval 'sub MTIOCPOS () { &_IOR(ord(\'m\'), 3, \'struct mtpos\');}' unless defined(&MTIOCPOS);
    eval 'sub MTIOCGETCONFIG () { &_IOR(ord(\'m\'), 4, \'struct mtconfiginfo\');}' unless defined(&MTIOCGETCONFIG);
    eval 'sub MTIOCSETCONFIG () { &_IOW(ord(\'m\'), 5, \'struct mtconfiginfo\');}' unless defined(&MTIOCSETCONFIG);
    eval 'sub MTIOCRDFTSEG () { &_IOWR(ord(\'m\'), 6, \'struct mtftseg\');}' unless defined(&MTIOCRDFTSEG);
    eval 'sub MTIOCWRFTSEG () { &_IOWR(ord(\'m\'), 7, \'struct mtftseg\');}' unless defined(&MTIOCWRFTSEG);
    eval 'sub MTIOCVOLINFO () { &_IOR(ord(\'m\'), 8, \'struct mtvolinfo\');}' unless defined(&MTIOCVOLINFO);
    eval 'sub MTIOCGETSIZE () { &_IOR(ord(\'m\'), 9, \'struct mttapesize\');}' unless defined(&MTIOCGETSIZE);
    eval 'sub MTIOCFTFORMAT () { &_IOWR(ord(\'m\'), 10, \'struct mtftformat\');}' unless defined(&MTIOCFTFORMAT);
    eval 'sub MTIOCFTCMD () { &_IOWR(ord(\'m\'), 11, \'struct mtftcmd\');}' unless defined(&MTIOCFTCMD);
    eval 'sub GMT_EOF {
        local($x) = @_;
	    eval q((($x) & 0x80000000));
    }' unless defined(&GMT_EOF);
    eval 'sub GMT_BOT {
        local($x) = @_;
	    eval q((($x) & 0x40000000));
    }' unless defined(&GMT_BOT);
    eval 'sub GMT_EOT {
        local($x) = @_;
	    eval q((($x) & 0x20000000));
    }' unless defined(&GMT_EOT);
    eval 'sub GMT_SM {
        local($x) = @_;
	    eval q((($x) & 0x10000000));
    }' unless defined(&GMT_SM);
    eval 'sub GMT_EOD {
        local($x) = @_;
	    eval q((($x) & 0x8000000));
    }' unless defined(&GMT_EOD);
    eval 'sub GMT_WR_PROT {
        local($x) = @_;
	    eval q((($x) & 0x4000000));
    }' unless defined(&GMT_WR_PROT);
    eval 'sub GMT_ONLINE {
        local($x) = @_;
	    eval q((($x) & 0x1000000));
    }' unless defined(&GMT_ONLINE);
    eval 'sub GMT_D_6250 {
        local($x) = @_;
	    eval q((($x) & 0x800000));
    }' unless defined(&GMT_D_6250);
    eval 'sub GMT_D_1600 {
        local($x) = @_;
	    eval q((($x) & 0x400000));
    }' unless defined(&GMT_D_1600);
    eval 'sub GMT_D_800 {
        local($x) = @_;
	    eval q((($x) & 0x200000));
    }' unless defined(&GMT_D_800);
    eval 'sub GMT_DR_OPEN {
        local($x) = @_;
	    eval q((($x) & 0x40000));
    }' unless defined(&GMT_DR_OPEN);
    eval 'sub GMT_IM_REP_EN {
        local($x) = @_;
	    eval q((($x) & 0x10000));
    }' unless defined(&GMT_IM_REP_EN);
    eval 'sub MT_ST_BLKSIZE_SHIFT () {0;}' unless defined(&MT_ST_BLKSIZE_SHIFT);
    eval 'sub MT_ST_BLKSIZE_MASK () {0xffffff;}' unless defined(&MT_ST_BLKSIZE_MASK);
    eval 'sub MT_ST_DENSITY_SHIFT () {24;}' unless defined(&MT_ST_DENSITY_SHIFT);
    eval 'sub MT_ST_DENSITY_MASK () {0xff000000;}' unless defined(&MT_ST_DENSITY_MASK);
    eval 'sub MT_ST_SOFTERR_SHIFT () {0;}' unless defined(&MT_ST_SOFTERR_SHIFT);
    eval 'sub MT_ST_SOFTERR_MASK () {0xffff;}' unless defined(&MT_ST_SOFTERR_MASK);
    eval 'sub MT_ST_OPTIONS () {0xf0000000;}' unless defined(&MT_ST_OPTIONS);
    eval 'sub MT_ST_BOOLEANS () {0x10000000;}' unless defined(&MT_ST_BOOLEANS);
    eval 'sub MT_ST_SETBOOLEANS () {0x30000000;}' unless defined(&MT_ST_SETBOOLEANS);
    eval 'sub MT_ST_CLEARBOOLEANS () {0x40000000;}' unless defined(&MT_ST_CLEARBOOLEANS);
    eval 'sub MT_ST_WRITE_THRESHOLD () {0x20000000;}' unless defined(&MT_ST_WRITE_THRESHOLD);
    eval 'sub MT_ST_DEF_BLKSIZE () {0x50000000;}' unless defined(&MT_ST_DEF_BLKSIZE);
    eval 'sub MT_ST_DEF_OPTIONS () {0x60000000;}' unless defined(&MT_ST_DEF_OPTIONS);
    eval 'sub MT_ST_TIMEOUTS () {0x70000000;}' unless defined(&MT_ST_TIMEOUTS);
    eval 'sub MT_ST_SET_TIMEOUT () {( &MT_ST_TIMEOUTS | 0x);}' unless defined(&MT_ST_SET_TIMEOUT);
    eval 'sub MT_ST_SET_LONG_TIMEOUT () {( &MT_ST_TIMEOUTS | 0x100000);}' unless defined(&MT_ST_SET_LONG_TIMEOUT);
    eval 'sub MT_ST_BUFFER_WRITES () {0x1;}' unless defined(&MT_ST_BUFFER_WRITES);
    eval 'sub MT_ST_ASYNC_WRITES () {0x2;}' unless defined(&MT_ST_ASYNC_WRITES);
    eval 'sub MT_ST_READ_AHEAD () {0x4;}' unless defined(&MT_ST_READ_AHEAD);
    eval 'sub MT_ST_DEBUGGING () {0x8;}' unless defined(&MT_ST_DEBUGGING);
    eval 'sub MT_ST_TWO_FM () {0x10;}' unless defined(&MT_ST_TWO_FM);
    eval 'sub MT_ST_FAST_MTEOM () {0x20;}' unless defined(&MT_ST_FAST_MTEOM);
    eval 'sub MT_ST_AUTO_LOCK () {0x40;}' unless defined(&MT_ST_AUTO_LOCK);
    eval 'sub MT_ST_DEF_WRITES () {0x80;}' unless defined(&MT_ST_DEF_WRITES);
    eval 'sub MT_ST_CAN_BSR () {0x100;}' unless defined(&MT_ST_CAN_BSR);
    eval 'sub MT_ST_NO_BLKLIMS () {0x200;}' unless defined(&MT_ST_NO_BLKLIMS);
    eval 'sub MT_ST_CAN_PARTITIONS () {0x400;}' unless defined(&MT_ST_CAN_PARTITIONS);
    eval 'sub MT_ST_SCSI2LOGICAL () {0x800;}' unless defined(&MT_ST_SCSI2LOGICAL);
    eval 'sub MT_ST_SYSV () {0x1000;}' unless defined(&MT_ST_SYSV);
    eval 'sub MT_ST_CLEAR_DEFAULT () {0xfffff;}' unless defined(&MT_ST_CLEAR_DEFAULT);
    eval 'sub MT_ST_DEF_DENSITY () {( &MT_ST_DEF_OPTIONS | 0x100000);}' unless defined(&MT_ST_DEF_DENSITY);
    eval 'sub MT_ST_DEF_COMPRESSION () {( &MT_ST_DEF_OPTIONS | 0x200000);}' unless defined(&MT_ST_DEF_COMPRESSION);
    eval 'sub MT_ST_DEF_DRVBUFFER () {( &MT_ST_DEF_OPTIONS | 0x300000);}' unless defined(&MT_ST_DEF_DRVBUFFER);
    eval 'sub MT_ST_HPLOADER_OFFSET () {10000;}' unless defined(&MT_ST_HPLOADER_OFFSET);
}
1;
