require '_h2ph_pre.ph';

no warnings qw(redefine misc);

require 'sys/workq.ph';
unless(defined(&AOE_F_ERROR)) {
    sub AOE_F_ERROR () {	(1<< 2);}
}
unless(defined(&AOE_F_RESP)) {
    sub AOE_F_RESP () {	(1<< 3);}
}
if((defined(&BYTE_ORDER) ? &BYTE_ORDER : undef) == (defined(&LITTLE_ENDIAN) ? &LITTLE_ENDIAN : undef)) {
} else {
}
unless(defined(&AOE_AF_WRITE)) {
    sub AOE_AF_WRITE () {	(1<< 0);}
}
unless(defined(&AOE_AF_EXTENDED)) {
    sub AOE_AF_EXTENDED () {	(1<< 6);}
}
unless(defined(&AOE_READ)) {
    sub AOE_READ () {	0x20;}
}
unless(defined(&AOE_READ_EXT)) {
    sub AOE_READ_EXT () {	0x24;}
}
unless(defined(&AOE_WRITE)) {
    sub AOE_WRITE () {	0x30;}
}
unless(defined(&AOE_WRITE_EXT)) {
    sub AOE_WRITE_EXT () {	0x34;}
}
unless(defined(&AOE_LBABIT)) {
    sub AOE_LBABIT () {	0x40;}
}
if((defined(&BYTE_ORDER) ? &BYTE_ORDER : undef) == (defined(&LITTLE_ENDIAN) ? &LITTLE_ENDIAN : undef)) {
} else {
}
unless(defined(&AOE_BLK2HDR)) {
    sub AOE_BLK2HDR {
	my($blk, $ap) = @_;
	eval q( &do {  ($ap->{lba0}) = $blk;  ($ap->{lba1}) = $blk >> 8;  ($ap->{lba2}) = $blk >> 16; }  &while (0));
    }
}
unless(defined(&AOE_HDR2BLK)) {
    sub AOE_HDR2BLK {
	my($ap, $blk) = @_;
	eval q( &do { $blk = 0; $blk |=  ($ap->{lba0}); $blk |=  ($ap->{lba1}) << 8; $blk |=  ($ap->{lba2}) << 16; }  &while (0));
    }
}
unless(defined(&AOE_CFGHDRLEN)) {
    sub AOE_CFGHDRLEN () {	32;}
}
unless(defined(&AOE_CMDHDRLEN)) {
    sub AOE_CMDHDRLEN () {	36;}
}
1;
