require '_h2ph_pre.ph';

unless(defined(&_xfs_h)) {
    eval 'sub _xfs_h () {1;}' unless defined(&_xfs_h);
    require 'sys/types.ph';
    require 'xfs/xfs_common.ph';
    require 'xfs/xfs_node.ph';
    require 'xfs/xfs_attr.ph';
    eval 'sub NXFS () {2;}' unless defined(&NXFS);
    eval 'sub XFS_MOUNTED () {0x1;}' unless defined(&XFS_MOUNTED);
    if(defined(&__osf__)) {
	eval 'sub VFS_TO_XFS {
	    local($v) = @_;
    	    eval q(( (($v)-> &m_data)));
	}' unless defined(&VFS_TO_XFS);
    } else {
	eval 'sub VFS_TO_XFS {
	    local($v) = @_;
    	    eval q(( (($v)-> &mnt_data)));
	}' unless defined(&VFS_TO_XFS);
    }
    eval 'sub XFS_TO_VFS {
        local($x) = @_;
	    eval q((($x)-> &mp));
    }' unless defined(&XFS_TO_VFS);
    eval 'sub XFS_FROM_VNODE {
        local($vp) = @_;
	    eval q( &VFS_TO_XFS(($vp)-> &v_mount));
    }' unless defined(&XFS_FROM_VNODE);
    eval 'sub XFS_FROM_XNODE {
        local($xp) = @_;
	    eval q( &XFS_FROM_VNODE( &XNODE_TO_VNODE($xp)));
    }' unless defined(&XFS_FROM_XNODE);
}
1;
