require '_h2ph_pre.ph';

no warnings 'redefine';

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 NNNPFS () {2;}' unless defined(&NNNPFS);
    eval 'sub NNPFS_MOUNTED () {0x1;}' unless defined(&NNPFS_MOUNTED);
    if(defined(&__osf__)) {
	if(defined(&HAVE_STRUCT_MOUNT_M_INFO)) {
	    eval 'sub VFS_TO_NNPFS {
	        my($v) = @_;
    		eval q(( (($v)-> &m_info)));
	    }' unless defined(&VFS_TO_NNPFS);
	} else {
	    eval 'sub VFS_TO_NNPFS {
	        my($v) = @_;
    		eval q(( (($v)-> &m_data)));
	    }' unless defined(&VFS_TO_NNPFS);
	}
    } else {
	eval 'sub VFS_TO_NNPFS {
	    my($v) = @_;
    	    eval q(( (($v)-> &mnt_data)));
	}' unless defined(&VFS_TO_NNPFS);
    }
    eval 'sub NNPFS_TO_VFS {
        my($x) = @_;
	    eval q((($x)-> &mp));
    }' unless defined(&NNPFS_TO_VFS);
    eval 'sub NNPFS_FROM_VNODE {
        my($vp) = @_;
	    eval q( &VFS_TO_NNPFS(($vp)-> &v_mount));
    }' unless defined(&NNPFS_FROM_VNODE);
    eval 'sub NNPFS_FROM_XNODE {
        my($xp) = @_;
	    eval q( &NNPFS_FROM_VNODE( &XNODE_TO_VNODE($xp)));
    }' unless defined(&NNPFS_FROM_XNODE);
}
1;
