require '_h2ph_pre.ph';

unless(defined(&_SCSI_SCSI_CD_H)) {
    eval 'sub _SCSI_SCSI_CD_H () {1;}' unless defined(&_SCSI_SCSI_CD_H);
    eval 'sub WRITE_TYPE_DUMMY () {0x10;}' unless defined(&WRITE_TYPE_DUMMY);
    eval 'sub WRITE_TYPE_MASK () {0xf;}' unless defined(&WRITE_TYPE_MASK);
    eval 'sub TRACK_MODE_MULTI_SESS () {0xc0;}' unless defined(&TRACK_MODE_MULTI_SESS);
    eval 'sub TRACK_MODE_FP () {0x20;}' unless defined(&TRACK_MODE_FP);
    eval 'sub TRACK_MODE_COPY () {0x10;}' unless defined(&TRACK_MODE_COPY);
    eval 'sub TRACK_MODE_PREEPMPASIS () {0x1;}' unless defined(&TRACK_MODE_PREEPMPASIS);
    eval 'sub TRACK_MODE_INCREMENTAL () {0x1;}' unless defined(&TRACK_MODE_INCREMENTAL);
    eval 'sub TRACK_MODE_ALLOW_COPY () {0x2;}' unless defined(&TRACK_MODE_ALLOW_COPY);
    eval 'sub TRACK_MODE_DATA () {0x4;}' unless defined(&TRACK_MODE_DATA);
    eval 'sub TRACK_MODE_4CHAN () {0x8;}' unless defined(&TRACK_MODE_4CHAN);
    eval 'sub DBTYPE_MASK () {0xf;}' unless defined(&DBTYPE_MASK);
    eval 'sub HOST_APPL_CODE_MASK () {0x3f;}' unless defined(&HOST_APPL_CODE_MASK);
    if(defined(&CDDA)) {
	eval 'sub CD_DA_BLKSIZ () {2352;}' unless defined(&CD_DA_BLKSIZ);
	unless(defined(&CD_NORMAL_DENSITY_CODE)) {
	    eval 'sub CD_NORMAL_DENSITY_CODE () {0x;}' unless defined(&CD_NORMAL_DENSITY_CODE);
	}
	unless(defined(&CD_DA_DENSITY_CODE)) {
	    eval 'sub CD_DA_DENSITY_CODE () {0x82;}' unless defined(&CD_DA_DENSITY_CODE);
	}
    }
    eval 'sub AUDIOPAGESIZE () {($sizeof{\'struct scsi_mode_header\'} + $sizeof{\'struct scsi_blk_desc\'} + $sizeof{\'struct cd_audio_page\'});}' unless defined(&AUDIOPAGESIZE);
}
1;
