require '_h2ph_pre.ph';

unless(defined(&_ADVANSYS_WIDE_H_)) {
    eval 'sub _ADVANSYS_WIDE_H_ () {1;}' unless defined(&_ADVANSYS_WIDE_H_);
    eval 'sub ADW_CARRIER_SIZE () {((((($sizeof{ &ADW_CARRIER}-1)/16))+1)*16);}' unless defined(&ADW_CARRIER_SIZE);
    eval 'sub ASC_NEXT_VPA_MASK () {0xfffffff0;}' unless defined(&ASC_NEXT_VPA_MASK);
    eval 'sub ASC_RQ_DONE () {0x00000001;}' unless defined(&ASC_RQ_DONE);
    eval 'sub ASC_CQ_STOPPER () {0x00000000;}' unless defined(&ASC_CQ_STOPPER);
    eval 'sub ASC_GET_CARRP {
        local($carrp) = @_;
	    eval q((($carrp) &  &ASC_NEXT_VPA_MASK));
    }' unless defined(&ASC_GET_CARRP);
    eval 'sub ADW_MAX_SG_LIST () {255;}' unless defined(&ADW_MAX_SG_LIST);
    eval 'sub NO_OF_SG_PER_BLOCK () {15;}' unless defined(&NO_OF_SG_PER_BLOCK);
    eval 'sub ADW_NUM_SG_BLOCK () {(( &ADW_MAX_SG_LIST + ( &NO_OF_SG_PER_BLOCK - 1))/ &NO_OF_SG_PER_BLOCK);}' unless defined(&ADW_NUM_SG_BLOCK);
    eval 'sub CCB_ALLOC () {0x01;}' unless defined(&CCB_ALLOC);
    eval 'sub CCB_ABORTING () {0x02;}' unless defined(&CCB_ABORTING);
    eval 'sub CCB_ABORTED () {0x04;}' unless defined(&CCB_ABORTED);
    eval 'sub ADW_MAX_CARRIER () {20;}' unless defined(&ADW_MAX_CARRIER);
    eval 'sub ADW_MAX_CCB () {16;}' unless defined(&ADW_MAX_CCB);
    eval 'sub ADW_CARRIER_ADDR {
        local($sc, $x) = @_;
	    eval q((-> ($sc_dmamap_carrier->{dm_segs[0]}->{ds_addr}) + ( - (($sc)-> ($sc_control->{carriers})))));
    }' unless defined(&ADW_CARRIER_ADDR);
    eval 'sub ADW_CCB_OFF {
        local($c) = @_;
	    eval q(( &offsetof(\'struct adw_control\',  $ccbs[0]) + ((($c)) - ( ($sc->{sc_control}->{ccbs[0]})))));
    }' unless defined(&ADW_CCB_OFF);
}
1;
