require '_h2ph_pre.ph';

no warnings 'redefine';

if(defined(&MPI_DEBUG)) {
    eval 'sub DPRINTF () {( &x...)  &do {  &if ( &mpi_debug)  &printf( &x); }  &while(0);}' unless defined(&DPRINTF);
    eval 'sub DNPRINTF () {( &n, &x...)  &do {  &if ( &mpi_debug & ( &n))  &printf( &x); }  &while(0);}' unless defined(&DNPRINTF);
    eval 'sub MPI_D_CMD () {0x1;}' unless defined(&MPI_D_CMD);
    eval 'sub MPI_D_INTR () {0x2;}' unless defined(&MPI_D_INTR);
    eval 'sub MPI_D_MISC () {0x4;}' unless defined(&MPI_D_MISC);
    eval 'sub MPI_D_DMA () {0x8;}' unless defined(&MPI_D_DMA);
    eval 'sub MPI_D_IOCTL () {0x10;}' unless defined(&MPI_D_IOCTL);
    eval 'sub MPI_D_RW () {0x20;}' unless defined(&MPI_D_RW);
    eval 'sub MPI_D_MEM () {0x40;}' unless defined(&MPI_D_MEM);
    eval 'sub MPI_D_CCB () {0x80;}' unless defined(&MPI_D_CCB);
    eval 'sub MPI_D_PPR () {0x100;}' unless defined(&MPI_D_PPR);
    eval 'sub MPI_D_RAID () {0x200;}' unless defined(&MPI_D_RAID);
    eval 'sub MPI_D_EVT () {0x400;}' unless defined(&MPI_D_EVT);
} else {
    eval 'sub DPRINTF () {( &x...);}' unless defined(&DPRINTF);
    eval 'sub DNPRINTF () {( &n, &x...);}' unless defined(&DNPRINTF);
}
unless(defined(&MPI_REQUEST_SIZE)) {
    sub MPI_REQUEST_SIZE () {	512;}
}
unless(defined(&MPI_REPLY_SIZE)) {
    sub MPI_REPLY_SIZE () {	128;}
}
unless(defined(&MPI_REPLY_COUNT)) {
    sub MPI_REPLY_COUNT () {	( &PAGE_SIZE /  &MPI_REPLY_SIZE);}
}
unless(defined(&MPI_MAX_SGL)) {
    sub MPI_MAX_SGL () {	36;}
}
unless(defined(&MPI_DMA_MAP)) {
    sub MPI_DMA_MAP {
	my($_mdm) = @_;
	eval q((($_mdm)-> &mdm_map));
    }
}
unless(defined(&MPI_DMA_DVA)) {
    sub MPI_DMA_DVA {
	my($_mdm) = @_;
	eval q((($_mdm)-> ($mdm_map->{dm_segs[0]}->{ds_addr})));
    }
}
unless(defined(&MPI_DMA_KVA)) {
    sub MPI_DMA_KVA {
	my($_mdm) = @_;
	eval q((( &void *)($_mdm)-> &mdm_kva));
    }
}
unless(defined(&MPI_F_VMWARE)) {
    sub MPI_F_VMWARE () {	(1<<0);}
}
unless(defined(&MPI_F_RAID)) {
    sub MPI_F_RAID () {	(1<<1);}
}
1;
