require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_CARDBUS_CARDSLOTVAR_H_)) {
    eval 'sub _DEV_CARDBUS_CARDSLOTVAR_H_ () {1;}' unless defined(&_DEV_CARDBUS_CARDSLOTVAR_H_);
    eval 'sub CARDSLOT_STATUS_CARD_MASK () {0x7;}' unless defined(&CARDSLOT_STATUS_CARD_MASK);
    eval 'sub CARDSLOT_STATUS_CARD_NONE () {0x;}' unless defined(&CARDSLOT_STATUS_CARD_NONE);
    eval 'sub CARDSLOT_STATUS_CARD_16 () {0x1;}' unless defined(&CARDSLOT_STATUS_CARD_16);
    eval 'sub CARDSLOT_STATUS_CARD_CB () {0x2;}' unless defined(&CARDSLOT_STATUS_CARD_CB);
    eval 'sub CARDSLOT_STATUS_UNKNOWN () {0x7;}' unless defined(&CARDSLOT_STATUS_UNKNOWN);
    eval 'sub CARDSLOT_CARDTYPE {
        my($x) = @_;
	    eval q((($x) &  &CARDSLOT_STATUS_CARD_MASK));
    }' unless defined(&CARDSLOT_CARDTYPE);
    eval 'sub CARDSLOT_SET_CARDTYPE {
        my($x, $type) = @_;
	    eval q( &do {($x) &= ~ &CARDSLOT_STATUS_CARD_MASK; ($x) |= ( &CARDSLOT_STATUS_CARD_MASK & ($type));}  &while(0));
    }' unless defined(&CARDSLOT_SET_CARDTYPE);
    eval 'sub CARDSLOT_STATUS_WORK_MASK () {0x8;}' unless defined(&CARDSLOT_STATUS_WORK_MASK);
    eval 'sub CARDSLOT_STATUS_WORKING () {0x8;}' unless defined(&CARDSLOT_STATUS_WORKING);
    eval 'sub CARDSLOT_STATUS_NOTWORK () {0x;}' unless defined(&CARDSLOT_STATUS_NOTWORK);
    eval 'sub CARDSLOT_WORK {
        my($x) = @_;
	    eval q((($x) &  &CARDSLOT_STATUS_WORK_MASK));
    }' unless defined(&CARDSLOT_WORK);
    eval 'sub CARDSLOT_SET_WORK {
        my($x, $type) = @_;
	    eval q( &do {($x) &= ~ &CARDSLOT_STATUS_WORK_MASK; ($x) |= ( &CARDSLOT_STATUS_WORK_MASK & ($type));}  &while(0));
    }' unless defined(&CARDSLOT_SET_WORK);
    eval 'sub CARDSLOT_EVENT_INSERTION_16 () {0;}' unless defined(&CARDSLOT_EVENT_INSERTION_16);
    eval 'sub CARDSLOT_EVENT_REMOVAL_16 () {1;}' unless defined(&CARDSLOT_EVENT_REMOVAL_16);
    eval 'sub CARDSLOT_EVENT_INSERTION_CB () {2;}' unless defined(&CARDSLOT_EVENT_INSERTION_CB);
    eval 'sub CARDSLOT_EVENT_REMOVAL_CB () {3;}' unless defined(&CARDSLOT_EVENT_REMOVAL_CB);
    eval 'sub IS_CARDSLOT_INSERT_REMOVE_EV {
        my($x) = @_;
	    eval q((0<= ($x)  && ($x) <= 3));
    }' unless defined(&IS_CARDSLOT_INSERT_REMOVE_EV);
}
1;
