require '_h2ph_pre.ph';

unless(defined(&_xfs_xnode_h)) {
    eval 'sub _xfs_xnode_h () {1;}' unless defined(&_xfs_xnode_h);
    require 'sys/types.ph';
    require 'sys/time.ph';
    if(defined( &_KERNEL) || !defined( &__OpenBSD__)) {
	require 'sys/vnode.ph';
    }
    if(defined(&__NetBSD__)) {
	require 'sys/lockf.ph';
    }
    require 'xfs/xfs_attr.ph';
    require 'xfs/xfs_message.ph';
    if(defined(&__NetBSD__)) {
    }
    eval 'sub DATA_FROM_VNODE {
        local($vp) = @_;
	    eval q( &DATA_FROM_XNODE( &VNODE_TO_XNODE($vp)));
    }' unless defined(&DATA_FROM_VNODE);
    eval 'sub DATA_FROM_XNODE {
        local($xp) = @_;
	    eval q((($xp)-> &data));
    }' unless defined(&DATA_FROM_XNODE);
    eval 'sub XNODE_TO_VNODE {
        local($xp) = @_;
	    eval q((($xp)-> &vn));
    }' unless defined(&XNODE_TO_VNODE);
    eval 'sub VNODE_TO_XNODE {
        local($vp) = @_;
	    eval q(( ($vp)-> &v_data));
    }' unless defined(&VNODE_TO_XNODE);
    if(defined( &HAVE_THREE_ARGUMENT_VGET)) {
	eval 'sub xfs_do_vget {
	    local($vp, $lockflag, $proc) = @_;
    	    eval q( &vget(($vp), ($lockflag), ($proc)));
	}' unless defined(&xfs_do_vget);
    }
 elsif(!defined( &__osf__)) {
	eval 'sub xfs_do_vget {
	    local($vp, $lockflag, $proc) = @_;
    	    eval q( &vget(($vp), ($lockflag)));
	}' unless defined(&xfs_do_vget);
    } else {
	eval 'sub xfs_do_vget {
	    local($vp, $lockflag, $proc) = @_;
    	    eval q( &vget(($vp)));
	}' unless defined(&xfs_do_vget);
    }
    unless(defined(&HAVE_VOP_T)) {
    }
    if(defined(&LK_INTERLOCK)) {
	eval 'sub HAVE_LK_INTERLOCK () {1;}' unless defined(&HAVE_LK_INTERLOCK);
    } else {
	eval 'sub LK_INTERLOCK () {0;}' unless defined(&LK_INTERLOCK);
    }
    if(defined(&LK_RETRY)) {
	eval 'sub HAVE_LK_RETRY () {1;}' unless defined(&HAVE_LK_RETRY);
    } else {
	eval 'sub LK_RETRY () {0;}' unless defined(&LK_RETRY);
    }
    if(defined(&LK_EXCLUSIVE)) {
	eval 'sub HAVE_LK_EXCLUSIVE () {1;}' unless defined(&HAVE_LK_EXCLUSIVE);
    } else {
	eval 'sub LK_EXCLUSIVE () {1;}' unless defined(&LK_EXCLUSIVE);
    }
    if(defined(&LK_SHARED)) {
	eval 'sub HAVE_LK_SHARED () {1;}' unless defined(&HAVE_LK_SHARED);
    } else {
	eval 'sub LK_SHARED () {1;}' unless defined(&LK_SHARED);
    }
}
1;
