require '_h2ph_pre.ph';

unless(defined(&_LINUX_KDEV_T_H)) {
    eval 'sub _LINUX_KDEV_T_H () {1;}' unless defined(&_LINUX_KDEV_T_H);
    if(defined( &__KERNEL__) || defined( &_LVM_H_INCLUDE)) {
	eval 'sub MINORBITS () {8;}' unless defined(&MINORBITS);
	eval 'sub MINORMASK () {((1 <<  &MINORBITS) - 1);}' unless defined(&MINORMASK);
	eval 'sub MAJOR {
	    local($dev) = @_;
    	    eval q(( (($dev) >>  &MINORBITS)));
	}' unless defined(&MAJOR);
	eval 'sub MINOR {
	    local($dev) = @_;
    	    eval q(( (($dev) &  &MINORMASK)));
	}' unless defined(&MINOR);
	eval 'sub HASHDEV {
	    local($dev) = @_;
    	    eval q(( ($dev)));
	}' unless defined(&HASHDEV);
	eval 'sub NODEV () {0;}' unless defined(&NODEV);
	eval 'sub MKDEV {
	    local($ma,$mi) = @_;
    	    eval q(((($ma) <<  &MINORBITS) | ($mi)));
	}' unless defined(&MKDEV);
	eval 'sub B_FREE () {0xffff;}' unless defined(&B_FREE);
	if(0) {
	} else {
	}
    } else {
	eval 'sub MAJOR {
	    local($dev) = @_;
    	    eval q((($dev)>>8));
	}' unless defined(&MAJOR);
	eval 'sub MINOR {
	    local($dev) = @_;
    	    eval q((($dev) & 0xff));
	}' unless defined(&MINOR);
	eval 'sub MKDEV {
	    local($ma,$mi) = @_;
    	    eval q((($ma)<<8| ($mi)));
	}' unless defined(&MKDEV);
    }
}
1;
