require '_h2ph_pre.ph';

no warnings 'redefine';

require 'sys/queue.ph';
unless(defined(&BHA_MBX_SIZE)) {
    sub BHA_MBX_SIZE () {	32;}
}
unless(defined(&BHA_CCB_MAX)) {
    sub BHA_CCB_MAX () {	32;}
}
unless(defined(&CCB_HASH_SIZE)) {
    sub CCB_HASH_SIZE () {	32;}
}
unless(defined(&CCB_HASH_SHIFT)) {
    sub CCB_HASH_SHIFT () {	9;}
}
unless(defined(&CCB_HASH)) {
    sub CCB_HASH {
	my($x) = @_;
	eval q((((($x))>> &CCB_HASH_SHIFT) & ( &CCB_HASH_SIZE - 1)));
    }
}
unless(defined(&bha_nextmbx)) {
    sub bha_nextmbx {
	my($wmb, $mbx, $mbio) = @_;
	eval q( &if (($wmb) == ($mbx)->$mbio->[ &BHA_MBX_SIZE - 1]) ($wmb) = ($mbx)->$mbio->[0];  &else ($wmb)++;);
    }
}
unless(defined(&wmbx)) {
    sub wmbx () {	( ($sc->{sc_control}->{bc_mbx}));}
}
unless(defined(&BHA_MBI_OFF)) {
    sub BHA_MBI_OFF {
	my($m) = @_;
	eval q(( &offsetof('struct bha_control',  ($bc_mbx->{mbi[0]})) + ((($m)) - ( ($w$mbx->{mbi[0]})))));
    }
}
unless(defined(&BHA_MBO_OFF)) {
    sub BHA_MBO_OFF {
	my($m) = @_;
	eval q(( &offsetof('struct bha_control',  ($bc_mbx->{mbo[0]})) + ((($m)) - ( ($w$mbx->{mbo[0]})))));
    }
}
unless(defined(&BHA_CCB_OFF)) {
    sub BHA_CCB_OFF {
	my($c) = @_;
	eval q(( &offsetof('struct bha_control',  $bc_ccbs[0]) + ((($c)) - ( ($s$c->{s$c_control}->{b$c_ccbs[0]})))));
    }
}
1;
