require '_h2ph_pre.ph';

if(1) {
    require 'xfs/xfs_config.ph';
}
unless(defined(&RCSID)) {
    eval 'sub RCSID {
        local($x) = @_;
	    eval q();
    }' unless defined(&RCSID);
}
if(defined(&__osf__)) {
    if(defined(&__GNUC__)) {
	eval 'sub asm () { &__foo_asm;}' unless defined(&asm);
    }
    require 'sys/types.ph';
    require 'sys/errno.ph';
    require 'sys/uio.ph';
    require 'machine/cpu.ph';
    require 'sys/conf.ph';
    require 'sys/sysconfig.ph';
    require 'sys/file.ph';
    require 'sys/malloc.ph';
    require 'sys/poll.ph';
    require 'sys/ioctl.ph';
    require 'sys/fcntl.ph';
    require 'sys/vfs_proto.ph';
    require 'io/common/devdriver.ph';
    require 'vm/vm_page.ph';
    require 'vm/vm_vppage.ph';
    require 'vm/vm_ubc.ph';
    eval 'sub VT_AFS () { &VT_ADDON;}' unless defined(&VT_AFS);
    eval 'sub MOUNT_XFS () { &MOUNT_PC;}' unless defined(&MOUNT_XFS);
    if(0) {
	eval 'sub componentname () { &nameidata;}' unless defined(&componentname);
    }
    eval 'sub cn_nameptr () { &ni_ptr;}' unless defined(&cn_nameptr);
    eval 'sub cn_namelen () { &ni_namelen;}' unless defined(&cn_namelen);
    eval 'sub cn_hash () { &ni_hash;}' unless defined(&cn_hash);
    eval 'sub cn_cred () { &ni_cred;}' unless defined(&cn_cred);
    eval 'sub cn_nameiop () { &ni_nameiop;}' unless defined(&cn_nameiop);
    eval 'sub cn_flags () { &ni_flags;}' unless defined(&cn_flags);
    eval 'sub mnt_stat () { &m_stat;}' unless defined(&mnt_stat);
    eval 'sub mnt_flag () { &m_flag;}' unless defined(&mnt_flag);
    eval 'sub NDINIT {
        local($ndp, $op, $flags, $segflg, $namep, $p) = @_;
	    eval q(($ndp)-> &ni_nameiop = ($op) | ($flags); ($ndp)-> &ni_segflg = $segflg; ($ndp)-> &ni_dirp = $namep;);
    }' unless defined(&NDINIT);
    eval 'sub LOCKLEAF () {0;}' unless defined(&LOCKLEAF);
    eval 'sub FFLAGS {
        local($mode) = @_;
	    eval q((($mode) -  &FOPEN));
    }' unless defined(&FFLAGS);
    eval 'sub vput {
        local($VP) = @_;
	    eval q( &vrele($VP));
    }' unless defined(&vput);
    eval 'sub xfs_uio_to_proc {
        local($uiop) = @_;
	    eval q(( ($u->{u_procp})));
    }' unless defined(&xfs_uio_to_proc);
    eval 'sub xfs_cnp_to_proc {
        local($cnp) = @_;
	    eval q(( ($u->{u_procp})));
    }' unless defined(&xfs_cnp_to_proc);
    eval 'sub xfs_proc_to_cred {
        local($p) = @_;
	    eval q((($p)-> &p_rcred));
    }' unless defined(&xfs_proc_to_cred);
    eval 'sub xfs_curproc () {
        eval q(( ($u->{u_procp})));
    }' unless defined(&xfs_curproc);
} else {
    require 'sys/types.ph';
    require 'sys/param.ph';
    require 'sys/proc.ph';
    require 'sys/filedesc.ph';
    require 'sys/kernel.ph';
    if(defined(&HAVE_SYS_MODULE_H)) {
	require 'sys/module.ph';
    }
    require 'sys/systm.ph';
    require 'sys/fcntl.ph';
    if(defined(&HAVE_SYS_SYSPROTO_H)) {
	require 'sys/sysproto.ph';
    }
    require 'sys/conf.ph';
    require 'sys/mount.ph';
    require 'sys/exec.ph';
    if(defined(&HAVE_SYS_SYSENT_H)) {
	require 'sys/sysent.ph';
    }
    require 'sys/lkm.ph';
    require 'sys/errno.ph';
    require 'sys/file.ph';
    require 'sys/namei.ph';
    require 'sys/dirent.ph';
    require 'sys/ucred.ph';
    require 'sys/select.ph';
    require 'sys/uio.ph';
    if(defined(&HAVE_SYS_POLL_H)) {
	require 'sys/poll.ph';
    }
    require 'sys/syscall.ph';
    require 'sys/queue.ph';
    require 'sys/malloc.ph';
    if(defined(&HAVE_MISCFS_GENFS_GENFS_H)) {
	require 'miscfs/genfs/genfs.ph';
    }
    if(defined(&HAVE_VM_VM_H)) {
	require 'vm/vm.ph';
    }
    if(defined(&HAVE_VM_VM_EXTERN_H)) {
	require 'vm/vm_extern.ph';
    }
    if(defined(&HAVE_VM_VM_ZONE_H)) {
	require 'vm/vm_zone.ph';
    }
    eval 'sub xfs_uio_to_proc {
        local($uiop) = @_;
	    eval q((($uiop)-> &uio_procp));
    }' unless defined(&xfs_uio_to_proc);
    eval 'sub xfs_cnp_to_proc {
        local($cnp) = @_;
	    eval q((($cnp)-> &cn_proc));
    }' unless defined(&xfs_cnp_to_proc);
    eval 'sub xfs_proc_to_cred {
        local($p) = @_;
	    eval q((($p)-> &p_ucred));
    }' unless defined(&xfs_proc_to_cred);
    eval 'sub xfs_curproc () {
        eval q(( &curproc));
    }' unless defined(&xfs_curproc);
}
require 'xfs/xfs_vopdefs.ph';
1;
