require '_h2ph_pre.ph';

unless(defined(&UNMNT_ABOVE)) {
    sub UNMNT_ABOVE () {	0x1;}
}
unless(defined(&UNMNT_BELOW)) {
    sub UNMNT_BELOW () {	0x2;}
}
unless(defined(&UNMNT_REPLACE)) {
    sub UNMNT_REPLACE () {	0x3;}
}
unless(defined(&UNMNT_OPMASK)) {
    sub UNMNT_OPMASK () {	0x3;}
}
if(defined(&_KERNEL)) {
    eval 'sub UN_DIRMODE () {( &S_IRWXU| &S_IRWXG| &S_IRWXO);}' unless defined(&UN_DIRMODE);
    eval 'sub UN_FILEMODE () {( &S_IRUSR| &S_IWUSR| &S_IRGRP| &S_IWGRP| &S_IROTH| &S_IWOTH);}' unless defined(&UN_FILEMODE);
    if(defined(&DIAGNOSTIC)) {
    }
    eval 'sub UN_WANTED () {0x1;}' unless defined(&UN_WANTED);
    eval 'sub UN_LOCKED () {0x2;}' unless defined(&UN_LOCKED);
    eval 'sub UN_ULOCK () {0x4;}' unless defined(&UN_ULOCK);
    eval 'sub UN_KLOCK () {0x8;}' unless defined(&UN_KLOCK);
    eval 'sub UN_CACHED () {0x10;}' unless defined(&UN_CACHED);
    eval 'sub MOUNTTOUNIONMOUNT {
        local($mp) = @_;
	    eval q(((($mp)-> &mnt_data)));
    }' unless defined(&MOUNTTOUNIONMOUNT);
    eval 'sub VTOUNION {
        local($vp) = @_;
	    eval q((($vp)-> &v_data));
    }' unless defined(&VTOUNION);
    eval 'sub UNIONTOV {
        local($un) = @_;
	    eval q((($un)-> &un_vnode));
    }' unless defined(&UNIONTOV);
    eval 'sub LOWERVP {
        local($vp) = @_;
	    eval q(( &VTOUNION($vp)-> &un_lowervp));
    }' unless defined(&LOWERVP);
    eval 'sub UPPERVP {
        local($vp) = @_;
	    eval q(( &VTOUNION($vp)-> &un_uppervp));
    }' unless defined(&UPPERVP);
    eval 'sub OTHERVP {
        local($vp) = @_;
	    eval q(( &UPPERVP($vp) ?  &UPPERVP($vp) :  &LOWERVP($vp)));
    }' unless defined(&OTHERVP);
}
1;
