require '_h2ph_pre.ph';

unless(defined(&ATAPI_READ_FORMAT_CAPACITIES)) {
    sub ATAPI_READ_FORMAT_CAPACITIES () {	0x23;}
}
unless(defined(&ATAPI_CAP_DESC_CODE_MASK)) {
    sub ATAPI_CAP_DESC_CODE_MASK () {	0x3;}
}
unless(defined(&ATAPI_CAP_DESC_CODE_UNFORMATTED)) {
    sub ATAPI_CAP_DESC_CODE_UNFORMATTED () {	0x1;}
}
unless(defined(&ATAPI_CAP_DESC_CODE_FORMATTED)) {
    sub ATAPI_CAP_DESC_CODE_FORMATTED () {	0x2;}
}
unless(defined(&ATAPI_CAP_DESC_CODE_NONE)) {
    sub ATAPI_CAP_DESC_CODE_NONE () {	0x3;}
}
unless(defined(&ATAPI_CAP_DESC_SIZE)) {
    sub ATAPI_CAP_DESC_SIZE {
	local($n) = @_;
	eval q(($sizeof{'struct atapi_capacity_list_header'} + ($n) * $sizeof{'struct atapi_capacity_descriptor'}));
    }
}
unless(defined(&ATAPI_CAP_DESC_OFFSET_HEADER)) {
    sub ATAPI_CAP_DESC_OFFSET_HEADER () {	0;}
}
unless(defined(&ATAPI_CAP_DESC_OFFSET_DESC)) {
    sub ATAPI_CAP_DESC_OFFSET_DESC {
	local($n) = @_;
	eval q( &ATAPI_CAP_DESC_SIZE($n));
    }
}
unless(defined(&ATAPI_FLEX_GEOMETRY_PAGE)) {
    sub ATAPI_FLEX_GEOMETRY_PAGE () {	0x05;}
}
unless(defined(&FLEXGEOMETRYPAGESIZE)) {
    sub FLEXGEOMETRYPAGESIZE () {	($sizeof{'struct atapi_mode_header'} + $sizeof{'struct atapi_flex_geometry_page'});}
}
1;
