aboutsummaryrefslogtreecommitdiff
path: root/contrib/amd/include
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/amd/include')
-rw-r--r--contrib/amd/include/am_compat.h472
-rw-r--r--contrib/amd/include/am_defs.h1614
-rw-r--r--contrib/amd/include/am_utils.h536
-rw-r--r--contrib/amd/include/am_xdr_func.h1330
-rw-r--r--contrib/amd/include/amq_defs.h191
-rw-r--r--contrib/amd/include/mount_headers1.h224
-rw-r--r--contrib/amd/include/mount_headers2.h83
-rw-r--r--contrib/amd/include/nfs_common.h99
8 files changed, 0 insertions, 4549 deletions
diff --git a/contrib/amd/include/am_compat.h b/contrib/amd/include/am_compat.h
deleted file mode 100644
index 3463f3fa591c..000000000000
--- a/contrib/amd/include/am_compat.h
+++ /dev/null
@@ -1,472 +0,0 @@
-/*
- * Copyright (c) 1997-2014 Erez Zadok
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * File: am-utils/include/am_compat.h
- *
- */
-
-/*
- *
- * This file contains compatibility functions and macros, all of which
- * should be auto-discovered, but for one reason or another (mostly
- * brain-damage on the part of system designers and header files) they cannot.
- *
- * Each compatibility macro/function must include instructions on how/when
- * it can be removed the am-utils code.
- *
- */
-
-#ifndef _AM_COMPAT_H
-# define _AM_COMPAT_H
-
-/*
- * incomplete mount options definitions (sunos4, irix6, linux, etc.)
- */
-
-
-/*
- * Complete MNTTAB_OPT_* options based on MNT2_NFS_OPT_* mount options.
- */
-#if defined(MNT2_NFS_OPT_ACDIRMAX) && !defined(MNTTAB_OPT_ACDIRMAX)
-# define MNTTAB_OPT_ACDIRMAX "acdirmax"
-#endif /* defined(MNT2_NFS_OPT_ACDIRMAX) && !defined(MNTTAB_OPT_ACDIRMAX) */
-
-#if defined(MNT2_NFS_OPT_ACDIRMIN) && !defined(MNTTAB_OPT_ACDIRMIN)
-# define MNTTAB_OPT_ACDIRMIN "acdirmin"
-#endif /* defined(MNT2_NFS_OPT_ACDIRMIN) && !defined(MNTTAB_OPT_ACDIRMIN) */
-
-#if defined(MNT2_NFS_OPT_ACREGMAX) && !defined(MNTTAB_OPT_ACREGMAX)
-# define MNTTAB_OPT_ACREGMAX "acregmax"
-#endif /* defined(MNT2_NFS_OPT_ACREGMAX) && !defined(MNTTAB_OPT_ACREGMAX) */
-
-#if defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNTTAB_OPT_ACREGMIN)
-# define MNTTAB_OPT_ACREGMIN "acregmin"
-#endif /* defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNTTAB_OPT_ACREGMIN) */
-
-#if !defined(MNTTAB_OPT_IGNORE)
-/* SunOS 4.1.x and others define "noauto" option, but not "auto" */
-# if defined(MNTTAB_OPT_NOAUTO) && !defined(MNTTAB_OPT_AUTO)
-# define MNTTAB_OPT_AUTO "auto"
-# endif /* defined(MNTTAB_OPT_NOAUTO) && !defined(MNTTAB_OPT_AUTO) */
-#endif /* !defined(MNTTAB_OPT_IGNORE) */
-
-#if defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC)
-# define MNTTAB_OPT_NOAC "noac"
-#endif /* defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC) */
-
-#if defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL)
-# define MNTTAB_OPT_NOACL "noacl"
-#endif /* defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL) */
-
-#if defined(MNT2_NFS_OPT_NOCONN) && !defined(MNTTAB_OPT_NOCONN)
-# define MNTTAB_OPT_NOCONN "noconn"
-# ifndef MNTTAB_OPT_CONN
-# define MNTTAB_OPT_CONN "conn"
-# endif /* MNTTAB_OPT_CONN */
-#endif /* defined(MNT2_NFS_OPT_NOCONN) && !defined(MNTTAB_OPT_NOCONN) */
-
-#if defined(MNT2_NFS_OPT_PGTHRESH) && !defined(MNTTAB_OPT_PGTHRESH)
-# define MNTTAB_OPT_PGTHRESH "pgthresh"
-#endif /* defined(MNT2_NFS_OPT_PGTHRESH) && !defined(MNTTAB_OPT_PGTHRESH) */
-
-#if defined(MNT2_NFS_OPT_PRIVATE) && !defined(MNTTAB_OPT_PRIVATE)
-# define MNTTAB_OPT_PRIVATE "private"
-#endif /* defined(MNT2_NFS_OPT_PRIVATE) && !defined(MNTTAB_OPT_PRIVATE) */
-
-#if defined(MNT2_NFS_OPT_RETRANS) && !defined(MNTTAB_OPT_RETRANS)
-# define MNTTAB_OPT_RETRANS "retrans"
-#endif /* defined(MNT2_NFS_OPT_RETRANS) && !defined(MNTTAB_OPT_RETRANS) */
-
-#if defined(MNT2_NFS_OPT_RSIZE) && !defined(MNTTAB_OPT_RSIZE)
-# define MNTTAB_OPT_RSIZE "rsize"
-#endif /* defined(MNT2_NFS_OPT_RSIZE) && !defined(MNTTAB_OPT_RSIZE) */
-
-#if defined(MNT2_NFS_OPT_SOFT) && !defined(MNTTAB_OPT_SOFT)
-# define MNTTAB_OPT_SOFT "soft"
-# ifndef MNTTAB_OPT_HARD
-# define MNTTAB_OPT_HARD "hard"
-# endif /* not MNTTAB_OPT_HARD */
-#endif /* defined(MNT2_NFS_OPT_SOFT) && !defined(MNTTAB_OPT_SOFT) */
-
-#if defined(MNT2_NFS_OPT_TIMEO) && !defined(MNTTAB_OPT_TIMEO)
-# define MNTTAB_OPT_TIMEO "timeo"
-#endif /* defined(MNT2_NFS_OPT_TIMEO) && !defined(MNTTAB_OPT_TIMEO) */
-
-#if defined(MNT2_NFS_OPT_WSIZE) && !defined(MNTTAB_OPT_WSIZE)
-# define MNTTAB_OPT_WSIZE "wsize"
-#endif /* defined(MNT2_NFS_OPT_WSIZE) && !defined(MNTTAB_OPT_WSIZE) */
-
-#if defined(MNT2_NFS_OPT_MAXGRPS) && !defined(MNTTAB_OPT_MAXGROUPS)
-# define MNTTAB_OPT_MAXGROUPS "maxgroups"
-#endif /* defined(MNT2_NFS_OPT_MAXGRPS) && !defined(MNTTAB_OPT_MAXGROUPS) */
-
-#if defined(MNT2_NFS_OPT_PROPLIST) && !defined(MNTTAB_OPT_PROPLIST)
-# define MNTTAB_OPT_PROPLIST "proplist"
-#endif /* defined(MNT2_NFS_OPT_PROPLIST) && !defined(MNTTAB_OPT_PROPLIST) */
-
-#if defined(MNT2_NFS_OPT_NONLM) && !defined(MNTTAB_OPT_NOLOCK)
-# define MNTTAB_OPT_NOLOCK "nolock"
-#endif /* defined(MNT2_NFS_OPT_NONLM) && !defined(MNTTAB_OPT_NOLOCK) */
-
-#if defined(MNT2_NFS_OPT_XLATECOOKIE) && !defined(MNTTAB_OPT_XLATECOOKIE)
-# define MNTTAB_OPT_XLATECOOKIE "xlatecookie"
-#endif /* defined(MNT2_NFS_OPT_XLATECOOKIE) && !defined(MNTTAB_OPT_XLATECOOKIE) */
-
-/*
- * Complete MNTTAB_OPT_* options based on MNT2_CDFS_OPT_* mount options.
- */
-#if defined(MNT2_CDFS_OPT_DEFPERM) && !defined(MNTTAB_OPT_DEFPERM)
-# define MNTTAB_OPT_DEFPERM "defperm"
-#endif /* defined(MNT2_CDFS_OPT_DEFPERM) && !defined(MNTTAB_OPT_DEFPERM) */
-
-#if defined(MNT2_CDFS_OPT_NODEFPERM) && !defined(MNTTAB_OPT_NODEFPERM)
-# define MNTTAB_OPT_NODEFPERM "nodefperm"
-/*
- * DEC OSF/1 V3.x/Digital UNIX V4.0 have M_NODEFPERM only, but
- * both mnttab ops.
- */
-# ifndef MNTTAB_OPT_DEFPERM
-# define MNTTAB_OPT_DEFPERM "defperm"
-# endif /* not MNTTAB_OPT_DEFPERM */
-#endif /* defined(MNT2_CDFS_OPT_NODEFPERM) && !defined(MNTTAB_OPT_NODEFPERM) */
-
-#if defined(MNT2_CDFS_OPT_NOVERSION) && !defined(MNTTAB_OPT_NOVERSION)
-# define MNTTAB_OPT_NOVERSION "noversion"
-#endif /* defined(MNT2_CDFS_OPT_NOVERSION) && !defined(MNTTAB_OPT_NOVERSION) */
-
-#if defined(MNT2_CDFS_OPT_RRIP) && !defined(MNTTAB_OPT_RRIP)
-# define MNTTAB_OPT_RRIP "rrip"
-#endif /* defined(MNT2_CDFS_OPT_RRIP) && !defined(MNTTAB_OPT_RRIP) */
-#if defined(MNT2_CDFS_OPT_NORRIP) && !defined(MNTTAB_OPT_NORRIP)
-# define MNTTAB_OPT_NORRIP "norrip"
-#endif /* defined(MNT2_CDFS_OPT_NORRIP) && !defined(MNTTAB_OPT_NORRIP) */
-
-#if defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS)
-# define MNTTAB_OPT_GENS "gens"
-#endif /* defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) */
-
-#if defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT)
-# define MNTTAB_OPT_EXTATT "extatt"
-#endif /* defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) */
-
-#if defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET)
-# define MNTTAB_OPT_NOJOLIET "nojoliet"
-#endif /* defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET) */
-
-#if defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS)
-# define MNTTAB_OPT_NOCASETRANS "nocasetrans"
-#endif /* defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS) */
-
-#if defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS)
-# define MNTTAB_OPT_RRCASEINS "rrcaseins"
-#endif /* defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS) */
-
-/*
- * Complete MNTTAB_OPT_* options based on MNT2_UDF_OPT_* mount options.
- */
-#if defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION)
-# define MNTTAB_OPT_CLOSESESSION "closesession"
-#endif /* defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION) */
-
-/*
- * Complete MNTTAB_OPT_* options based on MNT2_PCFS_OPT_* mount options.
- */
-#if defined(MNT2_PCFS_OPT_LONGNAME) && !defined(MNTTAB_OPT_LONGNAME)
-# define MNTTAB_OPT_LONGNAME "longnames"
-#endif /* defined(MNT2_PCFS_OPT_LONGNAME) && !defined(MNTTAB_OPT_LONGNAME) */
-#if defined(MNT2_PCFS_OPT_NOWIN95) && !defined(MNTTAB_OPT_NOWIN95)
-# define MNTTAB_OPT_NOWIN95 "nowin95"
-#endif /* defined(MNT2_PCFS_OPT_NOWIN95) && !defined(MNTTAB_OPT_NOWIN95) */
-#if defined(MNT2_PCFS_OPT_SHORTNAME) && !defined(MNTTAB_OPT_SHORTNAME)
-# define MNTTAB_OPT_SHORTNAME "shortnames"
-#endif /* defined(MNT2_PCFS_OPT_SHORTNAME) && !defined(MNTTAB_OPT_SHORTNAME) */
-
-/*
- * Complete MNTTAB_OPT_* options based on MNT2_GEN_OPT_* mount options.
- */
-#if defined(MNT2_GEN_OPT_GRPID) && !defined(MNTTAB_OPT_GRPID)
-# define MNTTAB_OPT_GRPID "grpid"
-#endif /* defined(MNT2_GEN_OPT_GRPID) && !defined(MNTTAB_OPT_GRPID) */
-
-#if defined(MNT2_GEN_OPT_NOCACHE) && !defined(MNTTAB_OPT_NOCACHE)
-# define MNTTAB_OPT_NOCACHE "nocache"
-#endif /* defined(MNT2_GEN_OPT_NOCACHE) && !defined(MNTTAB_OPT_NOCACHE) */
-
-#if defined(MNT2_GEN_OPT_NOSUID) && !defined(MNTTAB_OPT_NOSUID)
-# define MNTTAB_OPT_NOSUID "nosuid"
-#endif /* defined(MNT2_GEN_OPT_NOSUID) && !defined(MNTTAB_OPT_NOSUID) */
-
-#if defined(MNT2_GEN_OPT_OVERLAY) && !defined(MNTTAB_OPT_OVERLAY)
-# define MNTTAB_OPT_OVERLAY "overlay"
-#endif /* defined(MNT2_GEN_OPT_OVERLAY) && !defined(MNTTAB_OPT_OVERLAY) */
-
-/*
- * Complete MNTTAB_OPT_* options and their inverse based on MNT2_GEN_OPT_*
- * options.
- */
-#if defined(MNT2_GEN_OPT_NODEV) && !defined(MNTTAB_OPT_NODEV)
-# define MNTTAB_OPT_NODEV "nodev"
-#endif /* defined(MNT2_GEN_OPT_NODEV) && !defined(MNTTAB_OPT_NODEV) */
-
-#if defined(MNT2_GEN_OPT_NOEXEC) && !defined(MNTTAB_OPT_NOEXEC)
-# define MNTTAB_OPT_NOEXEC "noexec"
-/* this is missing under some versions of Linux */
-# ifndef MNTTAB_OPT_EXEC
-# define MNTTAB_OPT_EXEC "exec"
-# endif /* not MNTTAB_OPT_EXEC */
-#endif /* defined(MNT2_GEN_OPT_NOEXEC) && !defined(MNTTAB_OPT_NOEXEC) */
-
-#if defined(MNT2_GEN_OPT_QUOTA) && !defined(MNTTAB_OPT_QUOTA)
-# define MNTTAB_OPT_QUOTA "quota"
-#endif /* defined(MNT2_GEN_OPT_QUOTA) && !defined(MNTTAB_OPT_QUOTA) */
-
-#if defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC)
-# define MNTTAB_OPT_SYNC "sync"
-#endif /* defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC) */
-
-#if defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG)
-# define MNTTAB_OPT_LOG "log"
-#endif /* defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG) */
-
-#if defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME)
-# define MNTTAB_OPT_NOATIME "noatime"
-#endif /* defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME) */
-
-#if defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME)
-# define MNTTAB_OPT_NODEVMTIME "nodevmtime"
-#endif /* defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME) */
-
-#if defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP)
-# define MNTTAB_OPT_SOFTDEP "softdep"
-#endif /* defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP) */
-
-#if defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM)
-# define MNTTAB_OPT_SYMPERM "symperm"
-#endif /* defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM) */
-
-#if defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION)
-# define MNTTAB_OPT_UNION "union"
-#endif /* defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION) */
-
-/*
- * Add missing MNTTAB_OPT_* options.
- */
-#ifndef MNTTAB_OPT_ACTIMEO
-# define MNTTAB_OPT_ACTIMEO "actimeo"
-#endif /* not MNTTAB_OPT_ACTIMEO */
-
-#ifndef MNTTAB_OPT_INTR
-# define MNTTAB_OPT_INTR "intr"
-#endif /* not MNTTAB_OPT_INTR */
-
-#ifndef MNTTAB_OPT_PORT
-# define MNTTAB_OPT_PORT "port"
-#endif /* not MNTTAB_OPT_PORT */
-
-#ifndef MNTTAB_OPT_PUBLIC
-# define MNTTAB_OPT_PUBLIC "public"
-#endif /* not MNTTAB_OPT_PUBLIC */
-
-#ifndef MNTTAB_OPT_RETRANS
-# define MNTTAB_OPT_RETRANS "retrans"
-#endif /* not MNTTAB_OPT_RETRANS */
-
-#ifndef MNTTAB_OPT_RETRY
-# define MNTTAB_OPT_RETRY "retry"
-#endif /* not MNTTAB_OPT_RETRY */
-
-#ifndef MNTTAB_OPT_RO
-# define MNTTAB_OPT_RO "ro"
-#endif /* not MNTTAB_OPT_RO */
-
-#ifndef MNTTAB_OPT_RSIZE
-# define MNTTAB_OPT_RSIZE "rsize"
-#endif /* not MNTTAB_OPT_RSIZE */
-
-#ifndef MNTTAB_OPT_RW
-# define MNTTAB_OPT_RW "rw"
-#endif /* not MNTTAB_OPT_RW */
-
-#ifndef MNTTAB_OPT_TIMEO
-# define MNTTAB_OPT_TIMEO "timeo"
-#endif /* not MNTTAB_OPT_TIMEO */
-
-#ifndef MNTTAB_OPT_WSIZE
-# define MNTTAB_OPT_WSIZE "wsize"
-#endif /* not MNTTAB_OPT_WSIZE */
-
-/* next four are useful for pcfs mounts */
-#ifndef MNTTAB_OPT_USER
-# define MNTTAB_OPT_USER "user"
-#endif /* not MNTTAB_OPT_USER */
-#ifndef MNTTAB_OPT_GROUP
-# define MNTTAB_OPT_GROUP "group"
-#endif /* not MNTTAB_OPT_GROUP */
-#ifndef MNTTAB_OPT_MASK
-# define MNTTAB_OPT_MASK "mask"
-#endif /* not MNTTAB_OPT_MASK */
-#ifndef MNTTAB_OPT_DIRMASK
-# define MNTTAB_OPT_DIRMASK "dirmask"
-#endif /* not MNTTAB_OPT_DIRMASK */
-
-/* useful for udf mounts */
-#ifndef MNTTAB_OPT_USER
-# define MNTTAB_OPT_USER "user"
-#endif /* not MNTTAB_OPT_USER */
-#ifndef MNTTAB_OPT_GROUP
-# define MNTTAB_OPT_GROUP "group"
-#endif /* not MNTTAB_OPT_GROUP */
-#ifndef MNTTAB_OPT_GMTOFF
-# define MNTTAB_OPT_GMTOFF "gmtoff"
-#endif /* not MNTTAB_OPT_GMTOFF */
-#ifndef MNTTAB_OPT_SESSIONNR
-# define MNTTAB_OPT_SESSIONNR "sessionnr"
-#endif /* not MNTTAB_OPT_SESSIONNR */
-
-/*
- * Incomplete filesystem definitions (sunos4, irix6, solaris2)
- */
-#if defined(HAVE_FS_CDFS) && defined(MOUNT_TYPE_CDFS) && !defined(MNTTYPE_CDFS)
-# define MNTTYPE_CDFS "hsfs"
-#endif /* defined(HAVE_FS_CDFS) && defined(MOUNT_TYPE_CDFS) && !defined(MNTTYPE_CDFS) */
-
-#ifndef cdfs_args_t
-/*
- * Solaris has an HSFS filesystem, but does not define hsfs_args.
- * XXX: the definition here for solaris is wrong, since under solaris,
- * hsfs_args should be a single integer used as a bit-field for options.
- * so this code has to be fixed later. -Erez.
- */
-struct hsfs_args {
- char *fspec; /* name of filesystem to mount */
- int norrip;
-};
-# define cdfs_args_t struct hsfs_args
-# define HAVE_CDFS_ARGS_T_NORRIP
-#endif /* not cdfs_args_t */
-
-/*
- * if does not define struct pc_args, assume integer bit-field (irix6)
- */
-#if defined(HAVE_FS_PCFS) && !defined(pcfs_args_t)
-# define pcfs_args_t u_int
-#endif /* defined(HAVE_FS_PCFS) && !defined(pcfs_args_t) */
-
-/*
- * if does not define struct ufs_args, assume integer bit-field (linux)
- */
-#if defined(HAVE_FS_UFS) && !defined(ufs_args_t)
-# define ufs_args_t u_int
-#endif /* defined(HAVE_FS_UFS) && !defined(ufs_args_t) */
-
-/*
- * if does not define struct udf_args, assume integer bit-field (linux)
- */
-#if defined(HAVE_FS_UDF) && !defined(udf_args_t)
-# define udf_args_t u_int
-#endif /* defined(HAVE_FS_UDF) && !defined(udf_args_t) */
-
-/*
- * if does not define struct efs_args, assume integer bit-field (linux)
- */
-#if defined(HAVE_FS_EFS) && !defined(efs_args_t)
-# define efs_args_t u_int
-#endif /* defined(HAVE_FS_EFS) && !defined(efs_args_t) */
-
-#if defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t)
-# define tmpfs_args_t u_int
-#endif /* defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t) */
-
-/*
- * if does not define struct xfs_args, assume integer bit-field (linux)
- */
-#if defined(HAVE_FS_XFS) && !defined(xfs_args_t)
-# define xfs_args_t u_int
-#endif /* defined(HAVE_FS_XFS) && !defined(xfs_args_t) */
-#if defined(HAVE_FS_EXT) && !defined(ext_args_t)
-# define ext_args_t u_int
-#endif /* defined(HAVE_FS_EXT) && !defined(ext_args_t) */
-
-#if defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS)
-# define MNTTYPE_AUTOFS "autofs"
-#endif /* defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS) */
-
-/*
- * If NFS3, then make sure that "proto" and "vers" mnttab options
- * are available.
- */
-#ifdef HAVE_FS_NFS3
-# ifndef MNTTAB_OPT_VERS
-# define MNTTAB_OPT_VERS "vers"
-# endif /* not MNTTAB_OPT_VERS */
-# ifndef MNTTAB_OPT_PROTO
-# define MNTTAB_OPT_PROTO "proto"
-# endif /* not MNTTAB_OPT_PROTO */
-#endif /* not HAVE_FS_NFS3 */
-
-/*
- * If NFS4, then make sure that the "sec" mnttab option is available.
- */
-#ifdef HAVE_FS_NFS4
-# ifndef MNTTAB_OPT_SEC
-# define MNTTAB_OPT_SEC "sec"
-# endif /* not MNTTAB_OPT_SEC */
-#endif /* not HAVE_FS_NFS4 */
-/*
- * If loop device (header file) exists, define mount table option
- */
-#if defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP)
-# define MNTTAB_OPT_LOOP "loop"
-#endif /* defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP) */
-
-/*
- * Define a dummy struct netconfig for non-TLI systems
- */
-#if !defined(HAVE_NETCONFIG_H) && !defined(HAVE_SYS_NETCONFIG_H)
-struct netconfig {
- int dummy;
-};
-#endif /* not HAVE_NETCONFIG_H and not HAVE_SYS_NETCONFIG_H */
-
-/* some OSs don't define INADDR_NONE and assume it's unsigned -1 */
-#ifndef INADDR_NONE
-# define INADDR_NONE 0xffffffffU
-#endif /* INADDR_NONE */
-/* some OSs don't define INADDR_LOOPBACK */
-#ifndef INADDR_LOOPBACK
-# define INADDR_LOOPBACK 0x7f000001
-#endif /* not INADDR_LOOPBACK */
-
-#endif /* not _AM_COMPAT_H */
diff --git a/contrib/amd/include/am_defs.h b/contrib/amd/include/am_defs.h
deleted file mode 100644
index bb867a49b5a5..000000000000
--- a/contrib/amd/include/am_defs.h
+++ /dev/null
@@ -1,1614 +0,0 @@
-/*
- * Copyright (c) 1997-2014 Erez Zadok
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * File: am-utils/include/am_defs.h
- * $Id: am_defs.h,v 1.15.2.16 2004/05/12 15:54:31 ezk Exp $
- * $FreeBSD$
- *
- */
-
-/*
- * Definitions that are not specific to the am-utils package, but
- * are rather generic, and can be used elsewhere.
- */
-
-#ifndef _AM_DEFS_H
-#define _AM_DEFS_H
-
-/*
- * Actions to take if ANSI C.
- */
-#if STDC_HEADERS
-# include <string.h>
-/* for function prototypes */
-# define P(x) x
-# define P_void void
-#else /* not STDC_HEADERS */
-/* empty function prototypes */
-# define P(x) ()
-# define P_void
-# ifndef HAVE_STRCHR
-# define strchr index
-# define strrchr rindex
-# endif /* not HAVE_STRCHR */
-char *strchr(), *strrchr();
-#endif /* not STDC_HEADERS */
-
-/*
- * Handle gcc __attribute__ if available.
- */
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
-# define __attribute__(Spec) /* empty */
-# endif /* __GNUC__ < 2 ... */
-/*
- * The __-protected variants of `format' and `printf' attributes
- * are accepted by gcc versions 2.6.4 (effectively 2.7) and later.
- */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-# define __format__ format
-# define __printf__ printf
-# endif /* __GNUC__ < 2 ... */
-#endif /* not __attribute__ */
-
-#define __IGNORE(result) \
- __ignore((unsigned long)result)
-
-static inline void
-__ignore(unsigned long result) {
- (void)&result;
-}
-
-/*
- * How to handle signals of any type
- */
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif /* HAVE_SYS_WAIT_H */
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
-#endif /* not WEXITSTATUS */
-#ifndef WIFEXITED
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif /* not WIFEXITED */
-
-/*
- * Actions to take regarding <time.h> and <sys/time.h>.
- */
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# ifdef _ALL_SOURCE
-/*
- * AIX 5.2 needs struct sigevent from signal.h to be defined, but I
- * don't want to move the inclusion of signal.h this early into this
- * file. Luckily, amd doesn't need the size of this structure in any
- * other structure that it uses. So we sidestep it for now.
- */
-struct sigevent;
-# endif /* _ALL_SOURCE */
-# include <time.h>
-#else /* not TIME_WITH_SYS_TIME */
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else /* not HAVE_SYS_TIME_H */
-# include <time.h>
-# endif /* not HAVE_SYS_TIME_H */
-#endif /* not TIME_WITH_SYS_TIME */
-
-/*
- * Actions to take if <machine/endian.h> exists.
- */
-#ifdef HAVE_MACHINE_ENDIAN_H
-# include <machine/endian.h>
-#endif /* HAVE_MACHINE_ENDIAN_H */
-
-/*
- * Big-endian or little-endian?
- */
-#ifndef BYTE_ORDER
-# if defined(WORDS_BIGENDIAN)
-# define ARCH_ENDIAN "big"
-# else /* not WORDS_BIGENDIAN */
-# define ARCH_ENDIAN "little"
-# endif /* not WORDS_BIGENDIAN */
-#else
-# if BYTE_ORDER == BIG_ENDIAN
-# define ARCH_ENDIAN "big"
-# else
-# define ARCH_ENDIAN "little"
-# endif
-#endif
-
-/*
- * Actions to take if HAVE_SYS_TYPES_H is defined.
- */
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif /* HAVE_SYS_TYPES_H */
-
-/*
- * Actions to take if HAVE_LIMITS_H is defined.
- */
-#if HAVE_LIMITS_H_H
-# include <limits.h>
-#endif /* HAVE_LIMITS_H */
-
-/*
- * Actions to take if HAVE_UNISTD_H is defined.
- */
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-/* after <unistd.h>, check if this is a POSIX.1 system */
-#ifdef _POSIX_VERSION
-/* Code for POSIX.1 systems. */
-#endif /* _POSIX_VERSION */
-
-/*
- * Variable length argument lists.
- * Must use only one of the two!
- */
-#ifdef HAVE_STDARG_H
-# include <stdarg.h>
-/*
- * On Solaris 2.6, <sys/varargs.h> is included in <sys/fs/autofs.h>
- * So this ensures that only one is included.
- */
-# ifndef _SYS_VARARGS_H
-# define _SYS_VARARGS_H
-# endif /* not _SYS_VARARGS_H */
-#else /* not HAVE_STDARG_H */
-# ifdef HAVE_VARARGS_H
-# include <varargs.h>
-# endif /* HAVE_VARARGS_H */
-#endif /* not HAVE_STDARG_H */
-
-/*
- * Pick the right header file and macros for directory processing functions.
- */
-#if HAVE_DIRENT_H
-# include <dirent.h>
-# define NAMLEN(dirent) strlen((dirent)->d_name)
-#else /* not HAVE_DIRENT_H */
-# define dirent direct
-# define NAMLEN(dirent) (dirent)->d_namlen
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif /* HAVE_SYS_NDIR_H */
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif /* HAVE_SYS_DIR_H */
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif /* HAVE_NDIR_H */
-#endif /* not HAVE_DIRENT_H */
-
-/*
- * Actions to take if HAVE_FCNTL_H is defined.
- */
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif /* HAVE_FCNTL_H */
-
-/*
- * Actions to take if HAVE_MEMORY_H is defined.
- */
-#if HAVE_MEMORY_H
-# include <memory.h>
-#endif /* HAVE_MEMORY_H */
-
-/*
- * Actions to take if HAVE_SYS_FILE_H is defined.
- */
-#if HAVE_SYS_FILE_H
-# include <sys/file.h>
-#endif /* HAVE_SYS_FILE_H */
-
-/*
- * Actions to take if HAVE_SYS_IOCTL_H is defined.
- */
-#if HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif /* HAVE_SYS_IOCTL_H */
-
-/*
- * Actions to take if HAVE_SYSLOG_H or HAVE_SYS_SYSLOG_H is defined.
- */
-#ifdef HAVE_SYSLOG_H
-# include <syslog.h>
-#else /* not HAVE_SYSLOG_H */
-# if HAVE_SYS_SYSLOG_H
-# include <sys/syslog.h>
-# endif /* HAVE_SYS_SYSLOG_H */
-#endif /* HAVE_SYSLOG_H */
-
-/*
- * Actions to take if <sys/param.h> exists.
- */
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif /* HAVE_SYS_PARAM_H */
-
-/*
- * Actions to take if <sys/socket.h> exists.
- */
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif /* HAVE_SYS_SOCKET_H */
-
-/*
- * Actions to take if <rpc/rpc.h> exists.
- */
-#ifdef HAVE_RPC_RPC_H
-/*
- * Turn on PORTMAP, so that additional header files would get included
- * and the important definition for UDPMSGSIZE is included too.
- */
-# ifndef PORTMAP
-# define PORTMAP
-# endif /* not PORTMAP */
-# include <rpc/rpc.h>
-# ifndef XDRPROC_T_TYPE
-typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...));
-# endif /* not XDRPROC_T_TYPE */
-#endif /* HAVE_RPC_RPC_H */
-
-/*
- * Actions to take if <rpc/types.h> exists.
- */
-#ifdef HAVE_RPC_TYPES_H
-# include <rpc/types.h>
-#endif /* HAVE_RPC_TYPES_H */
-
-/*
- * Actions to take if <rpc/xdr.h> exists.
- */
-/* Prevent multiple inclusion on Ultrix 4 */
-#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
-# include <rpc/xdr.h>
-#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
-
-/*
- * Actions to take if <malloc.h> exists.
- * Don't include malloc.h if stdlib.h exists, because modern
- * systems complain if you use malloc.h instead of stdlib.h.
- * XXX: let's hope there are no systems out there that need both.
- */
-#if defined(HAVE_MALLOC_H) && !defined(HAVE_STDLIB_H)
-# include <malloc.h>
-#endif /* defined(HAVE_MALLOC_H) && !defined(HAVE_STDLIB_H) */
-
-/*
- * Actions to take if <mntent.h> exists.
- */
-#ifdef HAVE_MNTENT_H
-/* some systems need <stdio.h> before <mntent.h> is included */
-# ifdef HAVE_STDIO_H
-# include <stdio.h>
-# endif /* HAVE_STDIO_H */
-# include <mntent.h>
-#endif /* HAVE_MNTENT_H */
-
-/*
- * Actions to take if <sys/fsid.h> exists.
- */
-#ifdef HAVE_SYS_FSID_H
-# include <sys/fsid.h>
-#endif /* HAVE_SYS_FSID_H */
-
-/*
- * Actions to take if <sys/utsname.h> exists.
- */
-#ifdef HAVE_SYS_UTSNAME_H
-# include <sys/utsname.h>
-#endif /* HAVE_SYS_UTSNAME_H */
-
-/*
- * Actions to take if <sys/mntent.h> exists.
- */
-#ifdef HAVE_SYS_MNTENT_H
-# include <sys/mntent.h>
-#endif /* HAVE_SYS_MNTENT_H */
-
-/*
- * Actions to take if <ndbm.h> or <db1/ndbm.h> exist.
- * Should be included before <rpcsvc/yp_prot.h> because on some systems
- * like Linux, it also defines "struct datum".
- */
-#ifdef HAVE_MAP_NDBM
-# include NEW_DBM_H
-# ifndef DATUM
-/* ensure that struct datum is not included again from <rpcsvc/yp_prot.h> */
-# define DATUM
-# endif /* not DATUM */
-#endif /* HAVE_MAP_NDBM */
-
-/*
- * Actions to take if <net/errno.h> exists.
- */
-#ifdef HAVE_NET_ERRNO_H
-# include <net/errno.h>
-#endif /* HAVE_NET_ERRNO_H */
-
-/*
- * Actions to take if <net/if.h> exists.
- */
-#ifdef HAVE_NET_IF_H
-# include <net/if.h>
-#endif /* HAVE_NET_IF_H */
-
-/*
- * Actions to take if <net/route.h> exists.
- */
-#ifdef HAVE_NET_ROUTE_H
-# include <net/route.h>
-#endif /* HAVE_NET_ROUTE_H */
-
-/*
- * Actions to take if <sys/mbuf.h> exists.
- */
-#ifdef HAVE_SYS_MBUF_H
-# include <sys/mbuf.h>
-/*
- * OSF4 (DU-4.0) defines m_next and m_data also in <sys/mount.h> so I must
- # undefine them here to avoid conflicts.
- */
-# ifdef m_next
-# undef m_next
-# endif /* m_next */
-# ifdef m_data
-# undef m_data
-# endif /* m_data */
-/*
- * AIX 3 defines MFREE and m_flags also in <sys/mount.h>.
- */
-# ifdef m_flags
-# undef m_flags
-# endif /* m_flags */
-# ifdef MFREE
-# undef MFREE
-# endif /* MFREE */
-#endif /* HAVE_SYS_MBUF_H */
-
-/*
- * Actions to take if <sys/mman.h> exists.
- */
-#ifdef HAVE_SYS_MMAN_H
-# include <sys/mman.h>
-#endif /* HAVE_SYS_MMAN_H */
-
-/*
- * Actions to take if <netdb.h> exists.
- */
-#ifdef HAVE_NETDB_H
-# include <netdb.h>
-#endif /* HAVE_NETDB_H */
-
-/*
- * Actions to take if <netdir.h> exists.
- */
-#ifdef HAVE_NETDIR_H
-# include <netdir.h>
-#endif /* HAVE_NETDIR_H */
-
-/*
- * Actions to take if <net/if_var.h> exists.
- */
-#ifdef HAVE_NET_IF_VAR_H
-# include <net/if_var.h>
-#endif /* HAVE_NET_IF_VAR_H */
-
-/*
- * Actions to take if <netinet/if_ether.h> exists.
- */
-#ifdef HAVE_NETINET_IF_ETHER_H
-# include <netinet/if_ether.h>
-#endif /* HAVE_NETINET_IF_ETHER_H */
-
-/*
- * Actions to take if <netinet/in.h> exists.
- */
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif /* HAVE_NETINET_IN_H */
-
-/*
- * Actions to take if <rpcsvc/yp_prot.h> exists.
- */
-#ifdef HAVE_RPCSVC_YP_PROT_H
-# ifdef HAVE_BAD_HEADERS
-/* avoid circular dependency in aix 4.3 with <rpcsvc/ypclnt.h> */
-struct ypall_callback;
-# endif /* HAVE_BAD_HEADERS */
-# include <rpcsvc/yp_prot.h>
-#endif /* HAVE_RPCSVC_YP_PROT_H */
-
-/*
- * Actions to take if <rpcsvc/ypclnt.h> exists.
- */
-#ifdef HAVE_RPCSVC_YPCLNT_H
-# include <rpcsvc/ypclnt.h>
-#endif /* HAVE_RPCSVC_YPCLNT_H */
-
-/*
- * Actions to take if <sys/ucred.h> exists.
- */
-#ifdef HAVE_SYS_UCRED_H
-# include <sys/ucred.h>
-#endif /* HAVE_SYS_UCRED_H */
-
-
-/*
- * Actions to take if <sys/mount.h> exists.
- */
-#ifdef HAVE_SYS_MOUNT_H
-/*
- * Some operating systems must define these variables to get
- * NFS and other definitions included.
- */
-# ifndef NFSCLIENT
-# define NFSCLIENT 1
-# endif /* not NFSCLIENT */
-# ifndef NFS
-# define NFS 1
-# endif /* not NFS */
-# ifndef PCFS
-# define PCFS 1
-# endif /* not PCFS */
-# ifndef LOFS
-# define LOFS 1
-# endif /* not LOFS */
-# ifndef RFS
-# define RFS 1
-# endif /* not RFS */
-# ifndef MSDOSFS
-# define MSDOSFS 1
-# endif /* not MSDOSFS */
-# ifndef MFS
-# define MFS 1
-# endif /* not MFS */
-# ifndef CD9660
-# define CD9660 1
-# endif /* not CD9660 */
-# include <sys/mount.h>
-#endif /* HAVE_SYS_MOUNT_H */
-
-#ifdef HAVE_SYS_VMOUNT_H
-# include <sys/vmount.h>
-#endif /* HAVE_SYS_VMOUNT_H */
-
-/*
- * Actions to take if <linux/fs.h> exists.
- * There is no point in including this on a glibc2 system,
- * we're only asking for trouble
- */
-#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2)
-/*
- * There are various conflicts in definitions between RedHat Linux, newer
- * 2.2 kernels, and <netinet/in.h> and <linux/fs.h>.
- */
-# ifdef HAVE_SOCKETBITS_H
-/* conflicts with <socketbits.h> */
-# define _LINUX_SOCKET_H
-# undef BLKFLSBUF
-# undef BLKGETSIZE
-# undef BLKRAGET
-# undef BLKRASET
-# undef BLKROGET
-# undef BLKROSET
-# undef BLKRRPART
-# undef MS_MGC_VAL
-# undef MS_RMT_MASK
-# if defined(__GLIBC__) && __GLIBC__ >= 2
-/* conflicts with <waitflags.h> */
-# undef WNOHANG
-# undef WUNTRACED
-# endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
-/* conflicts with <statfsbuf.h> */
-# define _SYS_STATFS_H
-# endif /* HAVE_SOCKETBITS_H */
-
-# ifdef _SYS_WAIT_H
-# if defined(__GLIBC__) && __GLIBC__ >= 2
-/* conflicts with <bits/waitflags.h> (RedHat/Linux 6.0 and kernels 2.2 */
-# undef WNOHANG
-# undef WUNTRACED
-# endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
-# endif /* _SYS_WAIT_H */
-
-# ifdef HAVE_LINUX_POSIX_TYPES_H
-# include <linux/posix_types.h>
-# endif /* HAVE_LINUX_POSIX_TYPES_H */
-# ifndef _LINUX_BYTEORDER_GENERIC_H
-# define _LINUX_BYTEORDER_GENERIC_H
-# endif /* _LINUX_BYTEORDER_GENERIC_H */
-/* conflicts with <sys/mount.h> in 2.[12] kernels */
-# ifdef _SYS_MOUNT_H
-# undef BLKFLSBUF
-# undef BLKGETSIZE
-# undef BLKRAGET
-# undef BLKRASET
-# undef BLKROGET
-# undef BLKROSET
-# undef BLKRRPART
-# undef BLOCK_SIZE
-# undef MS_MANDLOCK
-# undef MS_MGC_VAL
-# undef MS_NOATIME
-# undef MS_NODEV
-# undef MS_NODIRATIME
-# undef MS_NOEXEC
-# undef MS_NOSUID
-# undef MS_RDONLY
-# undef MS_REMOUNT
-# undef MS_RMT_MASK
-# undef MS_SYNCHRONOUS
-# undef S_APPEND
-# undef S_IMMUTABLE
-/* conflicts with <statfsbuf.h> */
-# define _SYS_STATFS_H
-# endif /* _SYS_MOUNT_H */
-# ifndef _LINUX_STRING_H_
-# define _LINUX_STRING_H_
-# endif /* not _LINUX_STRING_H_ */
-# ifdef HAVE_LINUX_KDEV_T_H
-# define __KERNEL__
-# include <linux/kdev_t.h>
-# undef __KERNEL__
-# endif /* HAVE_LINUX_KDEV_T_H */
-# ifdef HAVE_LINUX_LIST_H
-# define __KERNEL__
-# include <linux/list.h>
-# undef __KERNEL__
-# endif /* HAVE_LINUX_LIST_H */
-# include <linux/fs.h>
-#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */
-
-#ifdef HAVE_CDFS_CDFS_MOUNT_H
-# include <cdfs/cdfs_mount.h>
-#endif /* HAVE_CDFS_CDFS_MOUNT_H */
-
-#ifdef HAVE_CDFS_CDFSMOUNT_H
-# include <cdfs/cdfsmount.h>
-#endif /* HAVE_CDFS_CDFSMOUNT_H */
-
-/*
- * Actions to take if <linux/loop.h> exists.
- */
-#ifdef HAVE_LINUX_LOOP_H
-# ifdef HAVE_LINUX_POSIX_TYPES_H
-# include <linux/posix_types.h>
-# endif /* HAVE_LINUX_POSIX_TYPES_H */
-/* next dev_t lines needed due to changes in kernel code */
-# undef dev_t
-# define dev_t unsigned short /* compatible with Red Hat and SuSE */
-# include <linux/loop.h>
-#endif /* HAVE_LINUX_LOOP_H */
-
-/*
- * AUTOFS PROTOCOL HEADER FILES:
- */
-
-/*
- * Actions to take if <linux/auto_fs[4].h> exists.
- * We really don't want <linux/fs.h> pulled in here
- */
-#ifndef _LINUX_FS_H
-#define _LINUX_FS_H
-#endif /* _LINUX_FS_H */
-#ifdef HAVE_LINUX_AUTO_FS4_H
-# include <linux/auto_fs4.h>
-#else /* not HAVE_LINUX_AUTO_FS4_H */
-# ifdef HAVE_LINUX_AUTO_FS_H
-# include <linux/auto_fs.h>
-# endif /* HAVE_LINUX_AUTO_FS_H */
-#endif /* not HAVE_LINUX_AUTO_FS4_H */
-
-/*
- * Actions to take if <sys/fs/autofs.h> exists.
- */
-#ifdef HAVE_SYS_FS_AUTOFS_H
-# include <sys/fs/autofs.h>
-#endif /* HAVE_SYS_FS_AUTOFS_H */
-
-/*
- * Actions to take if <rpcsvc/autofs_prot.h> or <sys/fs/autofs_prot.h> exist.
- */
-#ifdef HAVE_RPCSVC_AUTOFS_PROT_H
-# include <rpcsvc/autofs_prot.h>
-#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */
-# ifdef HAVE_SYS_FS_AUTOFS_PROT_H
-# include <sys/fs/autofs_prot.h>
-# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */
-#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */
-
-/*
- * Actions to take if <lber.h> exists.
- * This header file is required before <ldap.h> can be included.
- */
-#ifdef HAVE_LBER_H
-# include <lber.h>
-#endif /* HAVE_LBER_H */
-
-/*
- * Actions to take if <ldap.h> exists.
- */
-#ifdef HAVE_LDAP_H
-# include <ldap.h>
-#endif /* HAVE_LDAP_H */
-
-/****************************************************************************
- ** IMPORTANT!!! **
- ** We always include am-utils' amu_autofs_prot.h. **
- ** That is actually defined in "conf/autofs/autofs_${autofs_style}.h" **
- ****************************************************************************/
-#include <amu_autofs_prot.h>
-
-
-/*
- * NFS PROTOCOL HEADER FILES:
- */
-
-/*
- * Actions to take if <nfs/export.h> exists.
- */
-#ifdef HAVE_NFS_EXPORT_H
-# include <nfs/export.h>
-#endif /* HAVE_NFS_EXPORT_H */
-
-/****************************************************************************
- ** IMPORTANT!!! **
- ** We always include am-utils' amu_nfs_prot.h. **
- ** That is actually defined in "conf/nfs_prot/nfs_prot_${host_os_name}.h" **
- ****************************************************************************/
-#include <amu_nfs_prot.h>
-
-/*
- * DO NOT INCLUDE THESE FILES:
- * They conflicts with other NFS headers and are generally not needed.
- */
-#ifdef DO_NOT_INCLUDE
-# ifdef HAVE_NFS_NFS_CLNT_H
-# include <nfs/nfs_clnt.h>
-# endif /* HAVE_NFS_NFS_CLNT_H */
-# ifdef HAVE_LINUX_NFS_H
-# include <linux/nfs.h>
-# endif /* HAVE_LINUX_NFS_H */
-#endif /* DO NOT INCLUDE */
-
-/*
- * Actions to take if one of the nfs headers exists.
- */
-#ifdef HAVE_NFS_NFS_GFS_H
-# include <nfs/nfs_gfs.h>
-#endif /* HAVE_NFS_NFS_GFS_H */
-#ifdef HAVE_NFS_MOUNT_H
-# include <nfs/mount.h>
-#endif /* HAVE_NFS_MOUNT_H */
-#ifdef HAVE_NFS_NFS_MOUNT_H_off
-/* broken on nextstep3 (includes non-existing headers) */
-# include <nfs/nfs_mount.h>
-#endif /* HAVE_NFS_NFS_MOUNT_H */
-#ifdef HAVE_NFS_PATHCONF_H
-# include <nfs/pathconf.h>
-#endif /* HAVE_NFS_PATHCONF_H */
-#ifdef HAVE_SYS_FS_NFS_MOUNT_H
-# include <sys/fs/nfs/mount.h>
-#endif /* HAVE_SYS_FS_NFS_MOUNT_H */
-#ifdef HAVE_SYS_FS_NFS_NFS_CLNT_H
-# include <sys/fs/nfs/nfs_clnt.h>
-#endif /* HAVE_SYS_FS_NFS_NFS_CLNT_H */
-#ifdef HAVE_SYS_FS_NFS_CLNT_H
-# include <sys/fs/nfs_clnt.h>
-#endif /* HAVE_SYS_FS_NFS_CLNT_H */
-
-/* complex rules for linux/nfs_mount.h: broken on so many systems */
-#ifdef HAVE_LINUX_NFS_MOUNT_H
-# ifndef _LINUX_NFS_H
-# define _LINUX_NFS_H
-# endif /* not _LINUX_NFS_H */
-# ifndef _LINUX_NFS2_H
-# define _LINUX_NFS2_H
-# endif /* not _LINUX_NFS2_H */
-# ifndef _LINUX_NFS3_H
-# define _LINUX_NFS3_H
-# endif /* not _LINUX_NFS3_H */
-# ifndef _LINUX_NFS_FS_H
-# define _LINUX_NFS_FS_H
-# endif /* not _LINUX_NFS_FS_H */
-# ifndef _LINUX_IN_H
-# define _LINUX_IN_H
-# endif /* not _LINUX_IN_H */
-# ifndef __KERNEL__
-# define __KERNEL__
-# endif /* __KERNEL__ */
-# include <linux/nfs_mount.h>
-# undef __KERNEL__
-#endif /* HAVE_LINUX_NFS_MOUNT_H */
-
-/*
- * Actions to take if <pwd.h> exists.
- */
-#ifdef HAVE_PWD_H
-# include <pwd.h>
-#endif /* HAVE_PWD_H */
-
-/*
- * Actions to take if <hesiod.h> exists.
- */
-#ifdef HAVE_HESIOD_H
-# include <hesiod.h>
-#endif /* HAVE_HESIOD_H */
-
-/*
- * Actions to take if <arpa/nameser.h> exists.
- * Should be included before <resolv.h>.
- */
-#ifdef HAVE_ARPA_NAMESER_H
-# ifdef NOERROR
-# undef NOERROR
-# endif /* NOERROR */
-/*
- * Conflicts with <sys/tpicommon.h> which is included from <sys/tiuser.h>
- * on Solaris 2.6 systems. So undefine it first.
- */
-# ifdef T_UNSPEC
-# undef T_UNSPEC
-# endif /* T_UNSPEC */
-# include <arpa/nameser.h>
-#endif /* HAVE_ARPA_NAMESER_H */
-
-/*
- * Actions to take if <arpa/inet.h> exists.
- */
-#ifdef HAVE_ARPA_INET_H
-# ifdef HAVE_BAD_HEADERS
-/* aix 4.3: avoid including <net/if_dl.h> */
-struct sockaddr_dl;
-# endif /* HAVE_BAD_HEADERS */
-# include <arpa/inet.h>
-#endif /* HAVE_ARPA_INET_H */
-
-/*
- * Actions to take if <resolv.h> exists.
- */
-#ifdef HAVE_RESOLV_H
-/*
- * On AIX 5.2, both <resolv.h> and <arpa/nameser_compat.h> define MAXDNAME,
- * if compiling with gcc -D_USE_IRS (so that we get extern definitions for
- * hstrerror() and others).
- */
-# if defined(_AIX) && defined(MAXDNAME) && defined(_USE_IRS)
-# undef MAXDNAME
-# endif /* defined(_AIX) && defined(MAXDNAME) && defined(_USE_IRS) */
-# include <resolv.h>
-#endif /* HAVE_RESOLV_H */
-
-/*
- * Actions to take if <sys/uio.h> exists.
- */
-#ifdef HAVE_SYS_UIO_H
-# include <sys/uio.h>
-#endif /* HAVE_SYS_UIO_H */
-
-/*
- * Actions to take if <sys/fs/cachefs_fs.h> exists.
- */
-#ifdef HAVE_SYS_FS_CACHEFS_FS_H
-# include <sys/fs/cachefs_fs.h>
-#endif /* HAVE_SYS_FS_CACHEFS_FS_H */
-
-/*
- * Actions to take if <sys/fs/pc_fs.h> exists.
- */
-#ifdef HAVE_SYS_FS_PC_FS_H
-# include <sys/fs/pc_fs.h>
-#endif /* HAVE_SYS_FS_PC_FS_H */
-
-/*
- * Actions to take if <msdosfs/msdosfsmount.h> exists.
- */
-#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H
-# include <msdosfs/msdosfsmount.h>
-#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */
-#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H
-# include <fs/msdosfs/msdosfsmount.h>
-#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */
-
-/*
- * Actions to take if <fs/msdosfs/msdosfsmount.h> exists.
- */
-#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H
-# include <fs/msdosfs/msdosfsmount.h>
-#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */
-
-/*
- * Actions to take if <sys/fs/tmp.h> exists.
- */
-#ifdef HAVE_SYS_FS_TMP_H
-# include <sys/fs/tmp.h>
-#endif /* HAVE_SYS_FS_TMP_H */
-#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H
-# include <fs/tmpfs/tmpfs_args.h>
-#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */
-
-
-/*
- * Actions to take if <sys/fs/ufs_mount.h> exists.
- */
-#ifdef HAVE_SYS_FS_UFS_MOUNT_H
-# include <sys/fs/ufs_mount.h>
-#endif /* HAVE_SYS_FS_UFS_MOUNT_H */
-/*
- * HAVE_UFS_UFS_UFSMOUNT_H should NOT be defined on netbsd/openbsd because it
- * causes errors with other header files. Instead, add it to the specific
- * conf/nfs_prot_*.h file.
- */
-#ifdef HAVE_UFS_UFS_UFSMOUNT_H
-# include <ufs/ufs/ufsmount.h>
-#endif /* HAVE_UFS_UFS_UFSMOUNT_H */
-
-/*
- * Actions to take if <sys/fs/efs_clnt.h> exists.
- */
-#ifdef HAVE_SYS_FS_EFS_CLNT_H
-# include <sys/fs/efs_clnt.h>
-#endif /* HAVE_SYS_FS_EFS_CLNT_H */
-#ifdef HAVE_FS_EFS_EFS_MOUNT_H
-# include <fs/efs/efs_mount.h>
-#endif /* HAVE_FS_EFS_EFS_MOUNT_H */
-
-/*
- * Actions to take if <sys/fs/xfs_clnt.h> exists.
- */
-#ifdef HAVE_SYS_FS_XFS_CLNT_H
-# include <sys/fs/xfs_clnt.h>
-#endif /* HAVE_SYS_FS_XFS_CLNT_H */
-
-/*
- * Actions to take if <assert.h> exists.
- */
-#ifdef HAVE_ASSERT_H
-# include <assert.h>
-#endif /* HAVE_ASSERT_H */
-
-/*
- * Actions to take if <cfs.h> exists.
- */
-#ifdef HAVE_CFS_H
-# include <cfs.h>
-#endif /* HAVE_CFS_H */
-
-/*
- * Actions to take if <cluster.h> exists.
- */
-#ifdef HAVE_CLUSTER_H
-# include <cluster.h>
-#endif /* HAVE_CLUSTER_H */
-
-/*
- * Actions to take if <ctype.h> exists.
- */
-#ifdef HAVE_CTYPE_H
-# include <ctype.h>
-#endif /* HAVE_CTYPE_H */
-
-/*
- * Actions to take if <errno.h> exists.
- */
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#else
-/*
- * Actions to take if <sys/errno.h> exists.
- */
-# ifdef HAVE_SYS_ERRNO_H
-# include <sys/errno.h>
-extern int errno;
-# endif /* HAVE_SYS_ERRNO_H */
-#endif /* HAVE_ERRNO_H */
-
-/*
- * Actions to take if <grp.h> exists.
- */
-#ifdef HAVE_GRP_H
-# include <grp.h>
-#endif /* HAVE_GRP_H */
-
-/*
- * Actions to take if <hsfs/hsfs.h> exists.
- */
-#ifdef HAVE_HSFS_HSFS_H
-# include <hsfs/hsfs.h>
-#endif /* HAVE_HSFS_HSFS_H */
-
-/*
- * Actions to take if <cdfs/cdfsmount.h> exists.
- */
-#ifdef HAVE_CDFS_CDFSMOUNT_H
-# include <cdfs/cdfsmount.h>
-#endif /* HAVE_CDFS_CDFSMOUNT_H */
-
-/*
- * Actions to take if <isofs/cd9660/cd9660_mount.h> exists.
- */
-#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H
-# include <isofs/cd9660/cd9660_mount.h>
-#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
-
-/*
- * Actions to take if <fs/udf/udf_mount.h> exists.
- */
-#ifdef HAVE_FS_UDF_UDF_MOUNT_H
-# include <fs/udf/udf_mount.h>
-#endif /* HAVE_FS_UDF_UDF_MOUNT_H */
-
-/*
- * Actions to take if <mount.h> exists.
- */
-#ifdef HAVE_MOUNT_H
-# include <mount.h>
-#endif /* HAVE_MOUNT_H */
-
-/*
- * Actions to take if <nsswitch.h> exists.
- */
-#ifdef HAVE_NSSWITCH_H
-# include <nsswitch.h>
-#endif /* HAVE_NSSWITCH_H */
-
-/*
- * Actions to take if <rpc/auth_des.h> exists.
- */
-#ifdef HAVE_RPC_AUTH_DES_H
-# include <rpc/auth_des.h>
-#endif /* HAVE_RPC_AUTH_DES_H */
-
-/*
- * Actions to take if <rpc/pmap_clnt.h> exists.
- */
-#ifdef HAVE_RPC_PMAP_CLNT_H
-# include <rpc/pmap_clnt.h>
-#endif /* HAVE_RPC_PMAP_CLNT_H */
-
-/*
- * Actions to take if <rpc/pmap_prot.h> exists.
- */
-#ifdef HAVE_RPC_PMAP_PROT_H
-# include <rpc/pmap_prot.h>
-#endif /* HAVE_RPC_PMAP_PROT_H */
-
-
-/*
- * Actions to take if <rpcsvc/mount.h> exists.
- * AIX does not protect against this file doubly included,
- * so I have to do my own protection here.
- */
-#ifdef HAVE_RPCSVC_MOUNT_H
-# ifndef _RPCSVC_MOUNT_H
-# include <rpcsvc/mount.h>
-# endif /* not _RPCSVC_MOUNT_H */
-#endif /* HAVE_RPCSVC_MOUNT_H */
-
-/*
- * Actions to take if <rpcsvc/nis.h> exists.
- */
-#ifdef HAVE_RPCSVC_NIS_H
-/*
- * Solaris 10 (build 72) defines GROUP_OBJ in <sys/acl.h>, which is included
- * in many other header files. <rpcsvc/nis.h> uses GROUP_OBJ inside enum
- * zotypes. So if you're unlucky enough to include both headers, you get a
- * compile error because the two symbols conflict.
- * A similar conflict arises with Sun cc and the definition of "GROUP".
- *
- * Temp hack: undefine acl.h's GROUP_OBJ and GROUP because they're not needed
- * for am-utils.
- */
-# ifdef GROUP_OBJ
-# undef GROUP_OBJ
-# endif /* GROUP_OBJ */
-# ifdef GROUP
-# undef GROUP
-# endif /* GROUP */
-# include <rpcsvc/nis.h>
-#endif /* HAVE_RPCSVC_NIS_H */
-
-/*
- * Actions to take if <setjmp.h> exists.
- */
-#ifdef HAVE_SETJMP_H
-# include <setjmp.h>
-#endif /* HAVE_SETJMP_H */
-
-/*
- * Actions to take if <signal.h> exists.
- */
-#ifdef HAVE_SIGNAL_H
-# include <signal.h>
-#endif /* HAVE_SIGNAL_H */
-
-/*
- * Actions to take if <string.h> exists.
- */
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif /* HAVE_STRING_H */
-
-/*
- * Actions to take if <strings.h> exists.
- */
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif /* HAVE_STRINGS_H */
-
-/*
- * Actions to take if <sys/config.h> exists.
- */
-#ifdef HAVE_SYS_CONFIG_H
-# include <sys/config.h>
-#endif /* HAVE_SYS_CONFIG_H */
-
-/*
- * Actions to take if <sys/dg_mount.h> exists.
- */
-#ifdef HAVE_SYS_DG_MOUNT_H
-# include <sys/dg_mount.h>
-#endif /* HAVE_SYS_DG_MOUNT_H */
-
-/*
- * Actions to take if <sys/fs_types.h> exists.
- */
-#ifdef HAVE_SYS_FS_TYPES_H
-/*
- * Define KERNEL here to avoid multiple definitions of gt_names[] on
- * Ultrix 4.3.
- */
-# define KERNEL
-# include <sys/fs_types.h>
-# undef KERNEL
-#endif /* HAVE_SYS_FS_TYPES_H */
-
-/*
- * Actions to take if <sys/fstyp.h> exists.
- */
-#ifdef HAVE_SYS_FSTYP_H
-# include <sys/fstyp.h>
-#endif /* HAVE_SYS_FSTYP_H */
-
-/*
- * Actions to take if <sys/lock.h> exists.
- */
-#ifdef HAVE_SYS_LOCK_H
-# include <sys/lock.h>
-#endif /* HAVE_SYS_LOCK_H */
-
-/*
- * Actions to take if <sys/machine.h> exists.
- */
-#ifdef HAVE_SYS_MACHINE_H
-# include <sys/machine.h>
-#endif /* HAVE_SYS_MACHINE_H */
-
-/*
- * Actions to take if <sys/mntctl.h> exists.
- */
-#ifdef HAVE_SYS_MNTCTL_H
-# include <sys/mntctl.h>
-#endif /* HAVE_SYS_MNTCTL_H */
-
-/*
- * Actions to take if <sys/mnttab.h> exists.
- */
-#ifdef HAVE_SYS_MNTTAB_H
-# include <sys/mnttab.h>
-#endif /* HAVE_SYS_MNTTAB_H */
-
-/*
- * Actions to take if <mnttab.h> exists.
- * Do not include it if MNTTAB is already defined because it probably
- * came from <sys/mnttab.h> and we do not want conflicting definitions.
- */
-#if defined(HAVE_MNTTAB_H) && !defined(MNTTAB)
-# include <mnttab.h>
-#endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */
-
-/*
- * Actions to take if <netconfig.h> exists.
- */
-#ifdef HAVE_NETCONFIG_H
-# include <netconfig.h>
-/* Some systems (Solaris 2.5.1) don't declare this external */
-extern char *nc_sperror(void);
-#endif /* HAVE_NETCONFIG_H */
-
-/*
- * Actions to take if <sys/netconfig.h> exists.
- */
-#ifdef HAVE_SYS_NETCONFIG_H
-# include <sys/netconfig.h>
-#endif /* HAVE_SYS_NETCONFIG_H */
-
-/*
- * Actions to take if <sys/pathconf.h> exists.
- */
-#ifdef HAVE_SYS_PATHCONF_H
-# include <sys/pathconf.h>
-#endif /* HAVE_SYS_PATHCONF_H */
-
-/*
- * Actions to take if <sys/resource.h> exists.
- */
-#ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif /* HAVE_SYS_RESOURCE_H */
-
-/*
- * Actions to take if <sys/sema.h> exists.
- */
-#ifdef HAVE_SYS_SEMA_H
-# include <sys/sema.h>
-#endif /* HAVE_SYS_SEMA_H */
-
-/*
- * Actions to take if <sys/signal.h> exists.
- */
-#ifdef HAVE_SYS_SIGNAL_H
-# include <sys/signal.h>
-#endif /* HAVE_SYS_SIGNAL_H */
-
-/*
- * Actions to take if <sys/sockio.h> exists.
- */
-#ifdef HAVE_SYS_SOCKIO_H
-# include <sys/sockio.h>
-#endif /* HAVE_SYS_SOCKIO_H */
-
-/*
- * Actions to take if <sys/syscall.h> exists.
- */
-#ifdef HAVE_SYS_SYSCALL_H
-# include <sys/syscall.h>
-#endif /* HAVE_SYS_SYSCALL_H */
-
-/*
- * Actions to take if <sys/syslimits.h> exists.
- */
-#ifdef HAVE_SYS_SYSLIMITS_H
-# include <sys/syslimits.h>
-#endif /* HAVE_SYS_SYSLIMITS_H */
-
-/*
- * Actions to take if <tiuser.h> exists.
- */
-#ifdef HAVE_TIUSER_H
-/*
- * Some systems like AIX have multiple definitions for T_NULL and others
- * that are defined first in <arpa/nameser.h>.
- */
-# ifdef HAVE_ARPA_NAMESER_H
-# ifdef T_NULL
-# undef T_NULL
-# endif /* T_NULL */
-# ifdef T_UNSPEC
-# undef T_UNSPEC
-# endif /* T_UNSPEC */
-# ifdef T_IDLE
-# undef T_IDLE
-# endif /* T_IDLE */
-# endif /* HAVE_ARPA_NAMESER_H */
-# include <tiuser.h>
-#endif /* HAVE_TIUSER_H */
-
-/*
- * Actions to take if <sys/tiuser.h> exists.
- */
-#ifdef HAVE_SYS_TIUSER_H
-# include <sys/tiuser.h>
-#endif /* HAVE_SYS_TIUSER_H */
-
-/*
- * Actions to take if <sys/statfs.h> exists.
- */
-#ifdef HAVE_SYS_STATFS_H
-# include <sys/statfs.h>
-#endif /* HAVE_SYS_STATFS_H */
-
-/*
- * Actions to take if <sys/statvfs.h> exists.
- */
-#ifdef HAVE_SYS_STATVFS_H
-# include <sys/statvfs.h>
-#endif /* HAVE_SYS_STATVFS_H */
-
-/*
- * Actions to take if <sys/vfs.h> exists.
- */
-#ifdef HAVE_SYS_VFS_H
-# include <sys/vfs.h>
-#endif /* HAVE_SYS_VFS_H */
-
-/*
- * Actions to take if <sys/vmount.h> exists.
- */
-#ifdef HAVE_SYS_VMOUNT_H
-# include <sys/vmount.h>
-#endif /* HAVE_SYS_VMOUNT_H */
-
-/*
- * Actions to take if <ufs/ufs_mount.h> exists.
- */
-#ifdef HAVE_UFS_UFS_MOUNT_H
-# include <ufs/ufs_mount.h>
-#endif /* HAVE_UFS_UFS_MOUNT_H */
-
-/*
- * Are S_ISDIR, S_ISREG, et al broken? If not, include <sys/stat.h>.
- * Turned off the not using sys/stat.h based on if the macros are
- * "broken", because they incorrectly get reported as broken on
- * ncr2.
- */
-#ifndef STAT_MACROS_BROKEN_notused
-/*
- * RedHat Linux 4.2 (alpha) has a problem in the headers that causes
- * duplicate definitions, and also some other nasty bugs. Upgrade to Redhat
- * 5.0!
- */
-# ifdef HAVE_SYS_STAT_H
-/* avoid duplicates or conflicts with <linux/stat.h> (RedHat alpha linux) */
-# if defined(S_IFREG) && defined(HAVE_STATBUF_H)
-# include <statbuf.h>
-# undef S_IFBLK
-# undef S_IFCHR
-# undef S_IFDIR
-# undef S_IFIFO
-# undef S_IFLNK
-# undef S_IFMT
-# undef S_IFREG
-# undef S_IFSOCK
-# undef S_IRGRP
-# undef S_IROTH
-# undef S_IRUSR
-# undef S_IRWXG
-# undef S_IRWXO
-# undef S_IRWXU
-# undef S_ISBLK
-# undef S_ISCHR
-# undef S_ISDIR
-# undef S_ISFIFO
-# undef S_ISGID
-# undef S_ISLNK
-# undef S_ISREG
-# undef S_ISSOCK
-# undef S_ISUID
-# undef S_ISVTX
-# undef S_IWGRP
-# undef S_IWOTH
-# undef S_IWUSR
-# undef S_IXGRP
-# undef S_IXOTH
-# undef S_IXUSR
-# endif /* defined(S_IFREG) && defined(HAVE_STATBUF_H) */
-# include <sys/stat.h>
-# endif /* HAVE_SYS_STAT_H */
-#endif /* not STAT_MACROS_BROKEN_notused */
-
-/*
- * Actions to take if <stdio.h> exists.
- */
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif /* HAVE_STDIO_H */
-
-/*
- * Actions to take if <stdlib.h> exists.
- */
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif /* HAVE_STDLIB_H */
-
-/*
- * Actions to take if <regex.h> exists.
- */
-#ifdef HAVE_REGEX_H
-# include <regex.h>
-#endif /* HAVE_REGEX_H */
-
-/*
- * Actions to take if <tcpd.h> exists.
- */
-#if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP)
-# include <tcpd.h>
-#endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */
-
-
-/****************************************************************************/
-/*
- * Specific macros we're looking for.
- */
-#ifndef HAVE_MEMSET
-# ifdef HAVE_BZERO
-# define memset(ptr, val, len) bzero((ptr), (len))
-# else /* not HAVE_BZERO */
-# error Cannot find either memset or bzero!
-# endif /* not HAVE_BZERO */
-#endif /* not HAVE_MEMSET */
-
-#ifndef HAVE_MEMMOVE
-# ifdef HAVE_BCOPY
-# define memmove(to, from, len) bcopy((from), (to), (len))
-# else /* not HAVE_BCOPY */
-# error Cannot find either memmove or bcopy!
-# endif /* not HAVE_BCOPY */
-#endif /* not HAVE_MEMMOVE */
-
-/*
- * memcmp() is more problematic:
- * Systems that don't have it, but have bcmp(), will use bcmp() instead.
- * Those that have it, but it is bad (SunOS 4 doesn't handle
- * 8 bit comparisons correctly), will get to use am_memcmp().
- * Otherwise if you have memcmp() and it is good, use it.
- */
-#ifdef HAVE_MEMCMP
-# ifdef HAVE_BAD_MEMCMP
-# define memcmp am_memcmp
-extern int am_memcmp(const voidp s1, const voidp s2, size_t len);
-# endif /* HAVE_BAD_MEMCMP */
-#else /* not HAVE_MEMCMP */
-# ifdef HAVE_BCMP
-# define memcmp(a, b, len) bcmp((a), (b), (len))
-# endif /* HAVE_BCMP */
-#endif /* not HAVE_MEMCMP */
-
-#ifndef HAVE_SETEUID
-# ifdef HAVE_SETRESUID
-# define seteuid(x) setresuid(-1,(x),-1)
-# else /* not HAVE_SETRESUID */
-# error Cannot find either seteuid or setresuid!
-# endif /* not HAVE_SETRESUID */
-#endif /* not HAVE_SETEUID */
-
-/*
- * Define type of mntent_t.
- * Defaults to struct mntent, else struct mnttab. If neither is found, and
- * the operating system does keep not mount tables in the kernel, then flag
- * it as an error. If neither is found and the OS keeps mount tables in the
- * kernel, then define our own version of mntent; it will be needed for amd
- * to keep its own internal version of the mount tables.
- */
-#ifdef HAVE_STRUCT_MNTENT
-typedef struct mntent mntent_t;
-#else /* not HAVE_STRUCT_MNTENT */
-# ifdef HAVE_STRUCT_MNTTAB
-typedef struct mnttab mntent_t;
-/* map struct mnttab field names to struct mntent field names */
-# define mnt_fsname mnt_special
-# define mnt_dir mnt_mountp
-# define mnt_opts mnt_mntopts
-# define mnt_type mnt_fstype
-# else /* not HAVE_STRUCT_MNTTAB */
-# ifdef MOUNT_TABLE_ON_FILE
-# error Could not find definition for struct mntent or struct mnttab!
-# else /* not MOUNT_TABLE_ON_FILE */
-typedef struct _am_mntent {
- char *mnt_fsname; /* name of mounted file system */
- char *mnt_dir; /* file system path prefix */
- char *mnt_type; /* MNTTAB_TYPE_* */
- char *mnt_opts; /* MNTTAB_OPT_* */
- int mnt_freq; /* dump frequency, in days */
- int mnt_passno; /* pass number on parallel fsck */
-} mntent_t;
-# endif /* not MOUNT_TABLE_ON_FILE */
-# endif /* not HAVE_STRUCT_MNTTAB */
-#endif /* not HAVE_STRUCT_MNTENT */
-
-/*
- * Provide FD_* macros for systems that lack them.
- */
-#ifndef FD_SET
-# define FD_SET(fd, set) (*(set) |= (1 << (fd)))
-# define FD_ISSET(fd, set) (*(set) & (1 << (fd)))
-# define FD_CLR(fd, set) (*(set) &= ~(1 << (fd)))
-# define FD_ZERO(set) (*(set) = 0)
-#endif /* not FD_SET */
-
-
-/*
- * Complete external definitions missing from some systems.
- */
-
-#ifndef HAVE_EXTERN_SYS_ERRLIST
-extern const char *const sys_errlist[];
-#endif /* not HAVE_EXTERN_SYS_ERRLIST */
-
-#ifndef HAVE_EXTERN_OPTARG
-extern char *optarg;
-extern int optind;
-#endif /* not HAVE_EXTERN_OPTARG */
-
-#if defined(HAVE_CLNT_SPCREATEERROR) && !defined(HAVE_EXTERN_CLNT_SPCREATEERROR)
-extern char *clnt_spcreateerror(const char *s);
-#endif /* defined(HAVE_CLNT_SPCREATEERROR) && !defined(HAVE_EXTERN_CLNT_SPCREATEERROR) */
-
-#if defined(HAVE_CLNT_SPERRNO) && !defined(HAVE_EXTERN_CLNT_SPERRNO)
-extern char *clnt_sperrno(const enum clnt_stat num);
-#endif /* defined(HAVE_CLNT_SPERRNO) && !defined(HAVE_EXTERN_CLNT_SPERRNO) */
-
-#ifndef HAVE_EXTERN_FREE
-extern void free(voidp);
-#endif /* not HAVE_EXTERN_FREE */
-
-#if defined(HAVE_GET_MYADDRESS) && !defined(HAVE_EXTERN_GET_MYADDRESS)
-extern void get_myaddress(struct sockaddr_in *addr);
-#endif /* defined(HAVE_GET_MYADDRESS) && !defined(HAVE_EXTERN_GET_MYADDRESS) */
-
-#if defined(HAVE_GETDOMAINNAME) && !defined(HAVE_EXTERN_GETDOMAINNAME)
-# if defined(HAVE_MAP_NIS) || defined(HAVE_MAP_NISPLUS)
-extern int getdomainname(char *name, int namelen);
-# endif /* defined(HAVE_MAP_NIS) || defined(HAVE_MAP_NISPLUS) */
-#endif /* defined(HAVE_GETDOMAINNAME) && !defined(HAVE_EXTERN_GETDOMAINNAME) */
-
-#if defined(HAVE_GETDTABLESIZE) && !defined(HAVE_EXTERN_GETDTABLESIZE)
-extern int getdtablesize(void);
-#endif /* defined(HAVE_GETDTABLESIZE) && !defined(HAVE_EXTERN_GETDTABLESIZE) */
-
-#if defined(HAVE_GETHOSTNAME) && !defined(HAVE_EXTERN_GETHOSTNAME)
-extern int gethostname(char *name, int namelen);
-#endif /* defined(HAVE_GETHOSTNAME) && !defined(HAVE_EXTERN_GETHOSTNAME) */
-
-#ifndef HAVE_EXTERN_GETLOGIN
-extern char *getlogin(void);
-#endif /* not HAVE_EXTERN_GETLOGIN */
-
-#if defined(HAVE_GETPAGESIZE) && !defined(HAVE_EXTERN_GETPAGESIZE)
-extern int getpagesize(void);
-#endif /* defined(HAVE_GETPAGESIZE) && !defined(HAVE_EXTERN_GETPAGESIZE) */
-
-#ifndef HAVE_EXTERN_GETWD
-extern char *getwd(char *s);
-#endif /* not HAVE_EXTERN_GETWD */
-
-#if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) && !defined(HAVE_EXTERN_HOSTS_CTL)
-extern int hosts_ctl(char *daemon, char *client_name, char *client_addr, char *client_user);
-#endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) && !defined(HAVE_EXTERN_HOSTS_CTL) */
-
-#ifndef HAVE_EXTERN_INNETGR
-extern int innetgr(char *, char *, char *, char *);
-#endif /* not HAVE_EXTERN_INNETGR */
-
-#if defined(HAVE_MKSTEMP) && !defined(HAVE_EXTERN_MKSTEMP)
-extern int mkstemp(char *);
-#endif /* defined(HAVE_MKSTEMP) && !defined(HAVE_EXTERN_MKSTEMP) */
-
-#ifndef HAVE_EXTERN_SBRK
-extern caddr_t sbrk(int incr);
-#endif /* not HAVE_EXTERN_SBRK */
-
-#if defined(HAVE_SETEUID) && !defined(HAVE_EXTERN_SETEUID)
-extern int seteuid(uid_t euid);
-#endif /* not defined(HAVE_SETEUID) && !defined(HAVE_EXTERN_SETEUID) */
-
-#if defined(HAVE_SETITIMER) && !defined(HAVE_EXTERN_SETITIMER)
-extern int setitimer(int, struct itimerval *, struct itimerval *);
-#endif /* defined(HAVE_SETITIMER) && !defined(HAVE_EXTERN_SETITIMER) */
-
-#ifndef HAVE_EXTERN_SLEEP
-extern unsigned int sleep(unsigned int seconds);
-#endif /* not HAVE_EXTERN_SETITIMER */
-
-#ifndef HAVE_EXTERN_STRCASECMP
-/*
- * define this extern even if function does not exist, for it will
- * be filled in by libamu/strcasecmp.c
- */
-extern int strcasecmp(const char *s1, const char *s2);
-#endif /* not HAVE_EXTERN_STRCASECMP */
-
-#ifndef HAVE_EXTERN_STRLCAT
-/*
- * define this extern even if function does not exist, for it will
- * be filled in by libamu/strlcat.c
- */
-extern size_t strlcat(char *dst, const char *src, size_t siz);
-#endif /* not HAVE_EXTERN_STRLCAT */
-
-#ifndef HAVE_EXTERN_STRLCPY
-/*
- * define this extern even if function does not exist, for it will
- * be filled in by libamu/strlcpy.c
- */
-extern size_t strlcpy(char *dst, const char *src, size_t siz);
-#endif /* not HAVE_EXTERN_STRLCPY */
-
-#if defined(HAVE_STRSTR) && !defined(HAVE_EXTERN_STRSTR)
-extern char *strstr(const char *s1, const char *s2);
-#endif /* defined(HAVE_STRSTR) && !defined(HAVE_EXTERN_STRSTR) */
-
-#if defined(HAVE_USLEEP) && !defined(HAVE_EXTERN_USLEEP)
-extern int usleep(u_int useconds);
-#endif /* defined(HAVE_USLEEP) && !defined(HAVE_EXTERN_USLEEP) */
-
-#ifndef HAVE_EXTERN_UALARM
-extern u_int ualarm(u_int usecs, u_int interval);
-#endif /* not HAVE_EXTERN_UALARM */
-
-#if defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3)
-extern int wait3(int *statusp, int options, struct rusage *rusage);
-#endif /* defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3) */
-
-#if defined(HAVE_VSNPRINTF) && !defined(HAVE_EXTERN_VSNPRINTF)
-extern int vsnprintf(char *, int, const char *, ...);
-#endif /* defined(HAVE_VSNPRINTF) && !defined(HAVE_EXTERN_VSNPRINTF) */
-
-#ifndef HAVE_EXTERN_XDR_CALLMSG
-extern bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *msg);
-#endif /* not HAVE_EXTERN_XDR_CALLMSG */
-
-#ifndef HAVE_EXTERN_XDR_OPAQUE_AUTH
-extern bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *auth);
-#endif /* not HAVE_EXTERN_XDR_OPAQUE_AUTH */
-
-/****************************************************************************/
-/*
- * amd-specific header files.
- */
-#ifdef THIS_HEADER_FILE_IS_INCLUDED_ABOVE
-# include <amu_nfs_prot.h>
-#endif /* THIS_HEADER_FILE_IS_INCLUDED_ABOVE */
-#include <am_compat.h>
-#include <am_xdr_func.h>
-#include <am_utils.h>
-#include <amq_defs.h>
-#include <aux_conf.h>
-
-
-/****************************************************************************/
-/*
- * External definitions that depend on other macros available (or not)
- * and those are probably declared in any of the above headers.
- */
-
-#ifdef HAVE_HASMNTOPT
-# ifdef HAVE_BAD_HASMNTOPT
-extern char *amu_hasmntopt(mntent_t *mnt, char *opt);
-# else /* not HAVE_BAD_HASMNTOPT */
-# define amu_hasmntopt hasmntopt
-# endif /* not HAVE_BAD_HASMNTOPT */
-#else /* not HAVE_HASMNTOPT */
-extern char *amu_hasmntopt(mntent_t *mnt, char *opt);
-#endif /* not HAVE_HASMNTOPT */
-
-#endif /* not _AM_DEFS_H */
diff --git a/contrib/amd/include/am_utils.h b/contrib/amd/include/am_utils.h
deleted file mode 100644
index 0de881ad8c85..000000000000
--- a/contrib/amd/include/am_utils.h
+++ /dev/null
@@ -1,536 +0,0 @@
-/*
- * Copyright (c) 1997-2014 Erez Zadok
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * File: am-utils/include/am_utils.h
- *
- */
-
-/*
- * Definitions that are specific to the am-utils package.
- */
-
-#ifndef _AM_UTILS_H
-#define _AM_UTILS_H
-
-
-#include "aux_conf.h"
-
-/**************************************************************************/
-/*** MACROS ***/
-/**************************************************************************/
-
-/*
- * General macros.
- */
-#ifndef FALSE
-# define FALSE 0
-#endif /* not FALSE */
-#ifndef TRUE
-# define TRUE 1
-#endif /* not TRUE */
-#ifndef MAX
-# define MAX(a, b) ((a) > (b) ? (a) : (b))
-#endif /* not MAX */
-#ifndef MIN
-# define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif /* not MIN */
-
-#define ONE_HOUR (60 * 60) /* One hour in seconds */
-
-#ifndef MAXHOSTNAMELEN
-# ifdef HOSTNAMESZ
-# define MAXHOSTNAMELEN HOSTNAMESZ
-# else /* not HOSTNAMESZ */
-# define MAXHOSTNAMELEN 256
-# endif /* not HOSTNAMESZ */
-#endif /* not MAXHOSTNAMELEN */
-
-/*
- * for hlfsd, and amd for detecting uid/gid
- */
-#ifndef INVALIDID
-/* this is also defined in include/am_utils.h */
-# define INVALIDID (((unsigned short) ~0) - 3)
-#endif /* not INVALIDID */
-
-/*
- * String comparison macros
- */
-#define STREQ(s1, s2) (strcmp((s1), (s2)) == 0)
-#define STRCEQ(s1, s2) (strcasecmp((s1), (s2)) == 0)
-#define NSTREQ(s1, s2, n) (strncmp((s1), (s2), (n)) == 0)
-#define NSTRCEQ(s1, s2, n) (strncasecmp((s1), (s2), (n)) == 0)
-#define FSTREQ(s1, s2) ((*(s1) == *(s2)) && STREQ((s1),(s2)))
-
-/*
- * Logging options/flags
- */
-#define XLOG_FATAL 0x0001
-#define XLOG_ERROR 0x0002
-#define XLOG_USER 0x0004
-#define XLOG_WARNING 0x0008
-#define XLOG_INFO 0x0010
-#define XLOG_DEBUG 0x0020
-#define XLOG_MAP 0x0040
-#define XLOG_STATS 0x0080
-/* log option compositions */
-#define XLOG_MASK 0x00ff /* mask for all flags */
-#define XLOG_MANDATORY (XLOG_FATAL|XLOG_ERROR) /* cannot turn these off */
-#define XLOG_ALL (XLOG_FATAL|XLOG_ERROR|XLOG_USER|XLOG_WARNING|XLOG_INFO|XLOG_MAP|XLOG_STATS)
-/* default: fatal + error + user + warning + info */
-#define XLOG_DEFAULT (XLOG_MASK & (XLOG_ALL & ~XLOG_MAP & ~XLOG_STATS))
-
-/* default: no logging options */
-
-#define NO_SUBNET "notknown" /* default subnet name for no subnet */
-#define NEXP_AP (1022) /* gdmr: was 254 */
-#define NEXP_AP_MARGIN (128) /* ???? not used */
-
-/*
- * Linked list macros
- */
-#define AM_FIRST(ty, q) ((ty *) ((q)->q_forw))
-#define AM_LAST(ty, q) ((ty *) ((q)->q_back))
-#define NEXT(ty, q) ((ty *) (((qelem *) q)->q_forw))
-#define PREV(ty, q) ((ty *) (((qelem *) q)->q_back))
-#define HEAD(ty, q) ((ty *) q)
-#define ITER(v, ty, q) \
- for ((v) = AM_FIRST(ty,(q)); (v) != HEAD(ty,(q)); (v) = NEXT(ty,(v)))
-
-/* allocate anything of type ty */
-#define ALLOC(ty) ((ty *) xmalloc(sizeof(ty)))
-#define CALLOC(ty) ((ty *) xzalloc(sizeof(ty)))
-/* simply allocate b bytes */
-#define SALLOC(b) xmalloc((b))
-
-/*
- * Systems which have the mount table in a file need to read it before
- * they can perform an unmount() system call.
- */
-#define UMOUNT_FS(dir, mtb_name, unmount_flags) umount_fs(dir, mtb_name, unmount_flags)
-/* next two are imported via $srcdir/conf/umount/umount_*.c */
-extern int umount_fs(char *mntdir, const char *mnttabname, u_int unmount_flags);
-#ifdef MNT2_GEN_OPT_FORCE
-extern int umount2_fs(const char *mntdir, u_int unmount_flags);
-#endif /* MNT2_GEN_OPT_FORCE */
-
-/* unmount-related flags (special handling of autofs, forced/lazy, etc.) */
-#define AMU_UMOUNT_FORCE 0x1
-#define AMU_UMOUNT_DETACH 0x2
-#define AMU_UMOUNT_AUTOFS 0x4
-
-/*
- * The following values can be tuned...
- */
-#define ALLOWED_MOUNT_TIME 40 /* 40s for a mount */
-
-/*
- * RPC-related macros.
- */
-#define RPC_XID_PORTMAP 0
-#define RPC_XID_MOUNTD 1
-#define RPC_XID_NFSPING 2
-#define RPC_XID_WEBNFS 3
-#define RPC_XID_MASK (0x0f) /* 16 id's for now */
-#define MK_RPC_XID(type_id, uniq) ((type_id) | ((uniq) << 4))
-
-/*
- * What level of AMD are we backward compatible with?
- * This only applies to externally visible characteristics.
- * Rev.Minor.Branch.Patch (2 digits each)
- */
-#define AMD_COMPAT 5000000 /* 5.0 */
-
-
-/**************************************************************************/
-/*** STRUCTURES AND TYPEDEFS ***/
-/**************************************************************************/
-
-/* some typedefs must come first */
-typedef char *amq_string;
-typedef struct _qelem qelem;
-typedef struct mntlist mntlist;
-
-/*
- * Linked list
- * (the name 'struct qelem' conflicts with linux's unistd.h)
- */
-struct _qelem {
- qelem *q_forw;
- qelem *q_back;
-};
-
-/*
- * Option tables
- */
-struct opt_tab {
- char *opt;
- int flag;
-};
-
-/*
- * Server states
- */
-typedef enum {
- Start,
- Run,
- Finishing,
- Quit,
- Done
-} serv_state;
-
-
-/*
- * List of mount table entries
- */
-struct mntlist {
- struct mntlist *mnext;
- mntent_t *mnt;
-};
-
-/*
- * Mount map
- */
-typedef struct mnt_map mnt_map;
-
-
-/**************************************************************************/
-/*** EXTERNALS ***/
-/**************************************************************************/
-
-/*
- * Useful constants
- */
-extern char *mnttab_file_name; /* Mount table */
-extern char *cpu; /* "CPU type" */
-extern char *endian; /* "big" */
-extern char *hostdomain; /* "southseas.nz" */
-extern char copyright[]; /* Copyright info */
-extern char version[]; /* Version info */
-
-/*
- * Global variables.
- */
-extern AUTH *nfs_auth; /* Dummy authorization for remote servers */
-extern FILE *logfp; /* Log file */
-extern SVCXPRT *nfsxprt;
-extern char *PrimNetName; /* Name of primary connected network */
-extern char *PrimNetNum; /* Name of primary connected network */
-extern char *SubsNetName; /* Name of subsidiary connected network */
-extern char *SubsNetNum; /* Name of subsidiary connected network */
-
-extern void am_set_progname(char *pn); /* "amd" */
-extern const char *am_get_progname(void); /* "amd" */
-extern void am_set_hostname(char *hn);
-extern const char *am_get_hostname(void);
-extern pid_t am_set_mypid(void);
-extern pid_t am_mypid;
-
-extern int foreground; /* Foreground process */
-extern int orig_umask; /* umask() on startup */
-extern serv_state amd_state; /* Should we go now */
-extern struct in_addr myipaddr; /* (An) IP address of this host */
-extern struct opt_tab xlog_opt[];
-extern u_short nfs_port; /* Our NFS service port */
-
-/*
- * Global routines
- */
-extern CLIENT *get_mount_client(char *unused_host, struct sockaddr_in *sin, struct timeval *tv, int *sock, u_long mnt_version);
-extern RETSIGTYPE sigchld(int);
-extern bool_t xdr_amq_string(XDR *xdrs, amq_string *objp);
-extern bool_t xdr_dirpath(XDR *xdrs, dirpath *objp);
-extern char **strsplit(char *, int, int);
-extern char *expand_selectors(char *);
-extern char *get_version_string(void);
-extern char *inet_dquad(char *, size_t, u_long);
-extern char *print_wires(void);
-extern char *str3cat(char *, char *, char *, char *);
-extern char *strvcat(const char *, ...);
-extern char *strealloc(char *, char *);
-extern char *strip_selectors(char *, char *);
-extern char *strnsave(const char *, int);
-extern int amu_close(int fd);
-extern int bind_resv_port(int, u_short *);
-extern int cmdoption(char *, struct opt_tab *, u_int *);
-extern int compute_automounter_mount_flags(mntent_t *);
-extern int compute_mount_flags(mntent_t *);
-extern void discard_nfs_args(void *, u_long);
-extern u_long get_amd_program_number(void);
-extern int getcreds(struct svc_req *, uid_t *, gid_t *, SVCXPRT *);
-extern int hasmntval(mntent_t *, char *);
-extern unsigned int hasmntvalerr(mntent_t *, char *, int *);
-extern char *hasmntstr(mntent_t *, char *);
-extern char *hasmnteq(mntent_t *, char *);
-extern char *haseq(char *);
-extern int is_network_member(const char *net);
-extern int is_interface_local(u_long);
-extern int islocalnet(u_long);
-extern int make_rpc_packet(char *, int, u_long, struct rpc_msg *, voidp, XDRPROC_T_TYPE, AUTH *);
-extern int mkdirs(char *, int);
-extern int mount_fs(mntent_t *, int, caddr_t, int, MTYPE_TYPE, u_long, const char *, const char *, int);
-extern void nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp);
-extern void nfs_program_3(struct svc_req *rqstp, SVCXPRT *transp);
-#define get_nfs_dispatcher_version(a) \
- ((a) == nfs_program_2 ? NFS_VERSION : NFS_VERSION3)
-extern int pickup_rpc_reply(voidp, int, voidp, XDRPROC_T_TYPE);
-extern int switch_option(char *);
-extern int switch_to_logfile(char *logfile, int orig_umask, int truncate_log);
-extern mntlist *read_mtab(char *, const char *);
-#ifndef HAVE_TRANSPORT_TYPE_TLI
-extern struct sockaddr_in *amu_svc_getcaller(SVCXPRT *xprt);
-#endif /* not HAVE_TRANSPORT_TYPE_TLI */
-extern time_t time(time_t *);
-extern void amu_get_myaddress(struct in_addr *iap, const char *preferred_localhost);
-extern void amu_release_controlling_tty(void);
-extern void compute_automounter_nfs_args(nfs_args_t *nap, mntent_t *mntp);
-extern void discard_mntlist(mntlist *mp);
-extern void free_mntlist(mntlist *);
-extern void getwire(char **name1, char **number1);
-extern void going_down(int);
-extern void mnt_free(mntent_t *);
-extern void plog(int, const char *,...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
-extern void rmdirs(char *);
-extern void rpc_msg_init(struct rpc_msg *, u_long, u_long, u_long);
-extern void set_amd_program_number(u_long program);
-extern void show_opts(int ch, struct opt_tab *);
-extern void unregister_amq(void);
-extern voidp xmalloc(int);
-extern voidp xrealloc(voidp, int);
-extern voidp xzalloc(int);
-extern char *xstrdup(const char *);
-extern int check_pmap_up(char *host, struct sockaddr_in* sin);
-extern u_long get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const char *proto, u_long def);
-extern int nfs_valid_version(u_long vers);
-extern long get_server_pid(void);
-extern void setup_sighandler(int signum, void (*handler)(int));
-extern time_t clocktime(nfstime *nt);
-
-#if defined(DEBUG) && (defined(HAVE_C99_VARARGS_MACROS) || defined(HAVE_GCC_VARARGS_MACROS))
-# ifdef HAVE_C99_VARARGS_MACROS
-#define xsnprintf(str,size,fmt,...) _xsnprintf(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__)
-# endif /* HAVE_C99_VARARGS_MACROS */
-# ifdef HAVE_GCC_VARARGS_MACROS
-#define xsnprintf(str,size,fmt,args...) _xsnprintf(__FILE__,__LINE__,(str),(size),(fmt),args)
-# endif /* HAVE_GCC_VARARGS_MACROS */
-extern int _xsnprintf(const char *filename, int lineno, char *str, size_t size, const char *format, ...);
-#define xvsnprintf(str,size,fmt,ap) _xvsnprintf(__FILE__,__LINE__,(str),(size),(fmt),(ap))
-extern int _xvsnprintf(const char *filename, int lineno, char *str, size_t size, const char *format, va_list ap);
-#else /* not DEBUG or no C99/GCC-style vararg cpp macros supported */
-extern int xsnprintf(char *str, size_t size, const char *format, ...);
-extern int xvsnprintf(char *str, size_t size, const char *format, va_list ap);
-#endif /* not DEBUG or no C99/GCC-style vararg cpp macros supported */
-
-#ifdef DEBUG
-extern void _xstrlcat(const char *filename, int lineno, char *dst, const char *src, size_t len);
-# define xstrlcat(d,s,l) _xstrlcat(__FILE__,__LINE__,(d),(s),(l))
-extern void _xstrlcpy(const char *filename, int lineno, char *dst, const char *src, size_t len);
-# define xstrlcpy(d,s,l) _xstrlcpy(__FILE__,__LINE__,(d),(s),(l))
-#else /* not DEBUG */
-extern void xstrlcat(char *dst, const char *src, size_t len);
-extern void xstrlcpy(char *dst, const char *src, size_t len);
-#endif /* not DEBUG */
-
-#ifdef MOUNT_TABLE_ON_FILE
-extern void rewrite_mtab(mntlist *, const char *);
-extern void unlock_mntlist(void);
-extern void write_mntent(mntent_t *, const char *);
-#endif /* MOUNT_TABLE_ON_FILE */
-
-#if defined(HAVE_SYSLOG_H) || defined(HAVE_SYS_SYSLOG_H)
-extern int syslogging;
-#endif /* defined(HAVE_SYSLOG_H) || defined(HAVE_SYS_SYSLOG_H) */
-
-extern void compute_nfs_args(void *nap, mntent_t *mntp, int genflags, struct netconfig *nfsncp, struct sockaddr_in *ip_addr, u_long nfs_version, char *nfs_proto, am_nfs_handle_t *fhp, char *host_name, char *fs_name);
-extern void destroy_nfs_args(void *nap, u_long nfs_version);
-extern int create_amq_service(int *udp_soAMQp, SVCXPRT **udp_amqpp, struct netconfig **udp_amqncpp, int *tcp_soAMQp, SVCXPRT **tcp_amqpp, struct netconfig **tcp_amqncpp, u_short preferred_amq_port);
-extern int create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp), u_long nfs_version);
-extern int amu_svc_register(SVCXPRT *, u_long, u_long, void (*)(struct svc_req *, SVCXPRT *), u_long, struct netconfig *);
-
-#ifdef HAVE_TRANSPORT_TYPE_TLI
-
-extern int get_knetconfig(struct knetconfig **kncpp, struct netconfig *in_ncp, char *nc_protoname);
-extern struct netconfig *nfsncp;
-extern void free_knetconfig(struct knetconfig *kncp);
-
-#endif /* HAVE_TRANSPORT_TYPE_TLI */
-
-#ifdef HAVE_FS_AUTOFS
-extern int register_autofs_service(char *autofs_conftype, void (*autofs_dispatch)(struct svc_req *rqstp, SVCXPRT *xprt));
-extern int unregister_autofs_service(char *autofs_conftype);
-#endif /* HAVE_FS_AUTOFS */
-
-
-#ifndef HAVE_STRUCT_FHSTATUS_FHS_FH
-# define fhs_fh fhstatus_u.fhs_fhandle
-#endif /* not HAVE_STRUCT_FHSTATUS_FHS_FH */
-
-
-/*
- * Network File System: the old faithful generation NFS V.2
- */
-#ifndef NFS_VERSION2
-# define NFS_VERSION2 ((u_int) 2)
-#endif /* not NFS_VERSION2 */
-
-/*
- * Network File System: the not so new anymore generation NFS V.3
- */
-#ifdef HAVE_FS_NFS3
-# ifndef NFS_VERSION3
-# define NFS_VERSION3 ((u_int) 3)
-# endif /* not NFS_VERSION3 */
-#endif /* HAVE_FS_NFS3 */
-
-/*
- * Network File System: the new generation NFS V.4
- */
-#ifdef HAVE_FS_NFS4
-# ifndef NFS_VERSION4
-# define NFS_VERSION4 ((u_int) 4)
-# endif /* not NFS_VERSION4 */
-#endif /* HAVE_FS_NFS4 */
-
-/**************************************************************************/
-/*** DEBUGGING ***/
-/**************************************************************************/
-
-/*
- * DEBUGGING:
- */
-
-#ifdef DEBUG
-
-# define D_DAEMON 0x0001 /* Enter daemon mode */
-# define D_TRACE 0x0002 /* Do protocol trace */
-# define D_FULL 0x0004 /* Do full trace */
-# define D_MTAB 0x0008 /* Use local mtab */
-# define D_AMQ 0x0010 /* Register amq program */
-# define D_STR 0x0020 /* Debug string munging */
-# ifdef DEBUG_MEM
-# define D_MEM 0x0040 /* Trace memory allocations */
-# else /* not DEBUG_MEM */
-# define D_MEM 0x0000 /* Dummy */
-# endif /* not DEBUG_MEM */
-# define D_FORK 0x0080 /* Fork server (hlfsd only) */
-# define D_INFO 0x0100 /* info service specific debugging (hesiod, nis, etc) */
-# define D_HRTIME 0x0200 /* Print high resolution time stamps */
-# define D_XDRTRACE 0x0400 /* Trace xdr routines */
-# define D_READDIR 0x0800 /* Show browsable_dir progress */
-/* debug option compositions */
-# define D_MASK 0x0fff /* mask of known flags */
-# define D_BASIC (D_TRACE|D_FULL|D_STR|D_MEM|D_INFO|D_XDRTRACE|D_READDIR)
-# define D_CONTROL (D_DAEMON|D_AMQ|D_FORK)
-/* immutable flags: cannot be changed via "amq -D" */
-# define D_IMMUTABLE (D_MTAB | D_CONTROL)
-# define D_ALL (D_BASIC | D_CONTROL)
-# define D_DEFAULT (D_MASK & D_ALL & ~D_XDRTRACE)
-/* test mode: nodaemon, noamq, nofork, (local) mtab */
-# define D_TEST (D_BASIC | D_MTAB)
-
-# define amuDebug(x) (debug_flags & (x))
-# define dlog if (amuDebug(D_FULL)) dplog
-
-/* my favorite debugging tool -Erez */
-#define EZKDBG plog(XLOG_INFO,"EZK:%s:%s:%d\n",__FILE__,__FUNCTION__,__LINE__)
-
-# ifdef DEBUG_MEM
-/*
- * If debugging memory, then call a special freeing function that logs
- * more info, and resets the pointer to NULL so it cannot be used again.
- */
-# define XFREE(x) dxfree(__FILE__,__LINE__,x)
-extern void dxfree(char *file, int line, voidp ptr);
-extern void malloc_verify(void);
-# else /* not DEBUG_MEM */
-/*
- * If regular debugging, then free the pointer and reset to NULL.
- * This should remain so for as long as am-utils is in alpha/beta testing.
- */
-# define XFREE(x) do { free((voidp)x); x = NULL;} while (0)
-# endif /* not DEBUG_MEM */
-
-/* functions that depend solely on debugging */
-extern void print_nfs_args(const void *, u_long nfs_version);
-extern int debug_option (char *opt);
-extern void dplog(const char *fmt, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
-
-#else /* not DEBUG */
-
-/* set dummy flags to zero */
-# define D_DAEMON 0x0001 /* Enter daemon mode */
-# define D_TRACE 0x0000 /* dummy: Do protocol trace */
-# define D_FULL 0x0000 /* dummy: Do full trace */
-# define D_MTAB 0x0000 /* dummy: Use local mtab */
-# define D_AMQ 0x0010 /* Register amq program */
-# define D_STR 0x0000 /* dummy: Debug string munging */
-# define D_MEM 0x0000 /* dummy: Trace memory allocations */
-# define D_FORK 0x0080 /* Fork server (hlfsd only) */
-# define D_INFO 0x0000 /* dummy: info service debugging */
-# define D_HRTIME 0x0000 /* dummy: hi-res time stamps */
-# define D_XDRTRACE 0x0000 /* dummy: Trace xdr routines */
-# define D_READDIR 0x0000 /* dummy: browsable_dir progress */
-# define D_CONTROL (D_DAEMON|D_AMQ|D_FORK)
-# define amuDebug(x) (debug_flags & (x))
-/*
- * If not debugging, then also reset the pointer.
- * It's safer -- and besides, free() should do that anyway.
- */
-# define XFREE(x) do { free((voidp)x); x = NULL;} while (0)
-
-# if defined(HAVE_GCC_VARARGS_MACROS)
-# define dlog(fmt...)
-# elif defined(HAVE_C99_VARARGS_MACROS)
-# define dlog(...)
-# else /* no c99 varargs */
-/* this define means that we CCP leaves code behind the (list,of,args) */
-# define dlog
-# endif /* no c99 varargs */
-
-# define print_nfs_args(nap, nfs_version)
-# define debug_option(x) (1)
-
-#endif /* not DEBUG */
-
-extern u_int debug_flags; /* Debug options */
-extern struct opt_tab dbg_opt[];
-
-/**************************************************************************/
-/*** MISC (stuff left to autoconfiscate) ***/
-/**************************************************************************/
-
-#endif /* not _AM_UTILS_H */
diff --git a/contrib/amd/include/am_xdr_func.h b/contrib/amd/include/am_xdr_func.h
deleted file mode 100644
index 3659942ecb6a..000000000000
--- a/contrib/amd/include/am_xdr_func.h
+++ /dev/null
@@ -1,1330 +0,0 @@
-/*
- * Copyright (c) 1997-2014 Erez Zadok
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * File: am-utils/include/am_xdr_func.h
- *
- */
-
-#ifdef HAVE_FS_NFS3
-
-#define AM_MOUNTVERS3 ((unsigned long)(3))
-
-#define AM_FHSIZE3 64 /* size in bytes of a file handle (v3) */
-#define AM_NFS3_WRITEVERFSIZE 8
-#define AM_NFS3_CREATEVERFSIZE 8
-#define AM_NFS3_COOKIEVERFSIZE 8
-#define AM_ACCESS3_READ 0x0001
-#define AM_ACCESS3_LOOKUP 0x0002
-#define AM_ACCESS3_MODIFY 0x0004
-#define AM_ACCESS3_EXTEND 0x0008
-#define AM_ACCESS3_DELETE 0x0010
-#define AM_ACCESS3_EXECUTE 0x0020
-#define AM_FSF3_LINK 0x0001
-#define AM_FSF3_SYMLINK 0x0002
-#define AM_FSF3_HOMOGENEOUS 0x0008
-#define AM_FSF3_CANSETTIME 0x0010
-
-typedef char am_cookieverf3[AM_NFS3_COOKIEVERFSIZE];
-
-typedef uint64 am_cookie3;
-
-/* NFSv3 handle */
-struct am_nfs_fh3 {
- u_int am_fh3_length;
- char am_fh3_data[AM_FHSIZE3];
-};
-typedef struct am_nfs_fh3 am_nfs_fh3;
-
-#define AM_NFSPROC3_LOOKUP ((u_long) 3)
-enum am_nfsstat3 {
- AM_NFS3_OK = 0,
- AM_NFS3ERR_PERM = 1,
- AM_NFS3ERR_NOENT = 2,
- AM_NFS3ERR_IO = 5,
- AM_NFS3ERR_NXIO = 6,
- AM_NFS3ERR_ACCES = 13,
- AM_NFS3ERR_EXIST = 17,
- AM_NFS3ERR_XDEV = 18,
- AM_NFS3ERR_NODEV = 19,
- AM_NFS3ERR_NOTDIR = 20,
- AM_NFS3ERR_ISDIR = 21,
- AM_NFS3ERR_INVAL = 22,
- AM_NFS3ERR_FBIG = 27,
- AM_NFS3ERR_NOSPC = 28,
- AM_NFS3ERR_ROFS = 30,
- AM_NFS3ERR_MLINK = 31,
- AM_NFS3ERR_NAMETOOLONG = 63,
- AM_NFS3ERR_NOTEMPTY = 66,
- AM_NFS3ERR_DQUOT = 69,
- AM_NFS3ERR_STALE = 70,
- AM_NFS3ERR_REMOTE = 71,
- AM_NFS3ERR_BADHANDLE = 10001,
- AM_NFS3ERR_NOT_SYNC = 10002,
- AM_NFS3ERR_BAD_COOKIE = 10003,
- AM_NFS3ERR_NOTSUPP = 10004,
- AM_NFS3ERR_TOOSMALL = 10005,
- AM_NFS3ERR_SERVERFAULT = 10006,
- AM_NFS3ERR_BADTYPE = 10007,
- AM_NFS3ERR_JUKEBOX = 10008
-};
-typedef enum am_nfsstat3 am_nfsstat3;
-
-typedef struct {
- u_int fhandle3_len;
- char *fhandle3_val;
-} am_fhandle3;
-
-enum am_mountstat3 {
- AM_MNT3_OK = 0,
- AM_MNT3ERR_PERM = 1,
- AM_MNT3ERR_NOENT = 2,
- AM_MNT3ERR_IO = 5,
- AM_MNT3ERR_ACCES = 13,
- AM_MNT3ERR_NOTDIR = 20,
- AM_MNT3ERR_INVAL = 22,
- AM_MNT3ERR_NAMETOOLONG = 63,
- AM_MNT3ERR_NOTSUPP = 10004,
- AM_MNT3ERR_SERVERFAULT = 10006
-};
-typedef enum am_mountstat3 am_mountstat3;
-
-struct am_mountres3_ok {
- am_fhandle3 fhandle;
- struct {
- u_int auth_flavors_len;
- int *auth_flavors_val;
- } auth_flavors;
-};
-typedef struct am_mountres3_ok am_mountres3_ok;
-
-struct am_mountres3 {
- am_mountstat3 fhs_status;
- union {
- am_mountres3_ok mountinfo;
- } mountres3_u;
-};
-typedef struct am_mountres3 am_mountres3;
-
-typedef char *am_filename3;
-
-struct am_diropargs3 {
- am_nfs_fh3 dir;
- am_filename3 name;
-};
-typedef struct am_diropargs3 am_diropargs3;
-
-enum am_ftype3 {
- AM_NF3REG = 1,
- AM_NF3DIR = 2,
- AM_NF3BLK = 3,
- AM_NF3CHR = 4,
- AM_NF3LNK = 5,
- AM_NF3SOCK = 6,
- AM_NF3FIFO = 7,
-};
-typedef enum am_ftype3 am_ftype3;
-
-typedef u_int am_mode3;
-
-typedef u_int am_uid3;
-
-typedef u_int am_gid3;
-
-typedef uint64 am_size3;
-
-typedef uint64 am_fileid3;
-
-struct am_specdata3 {
- u_int specdata1;
- u_int specdata2;
-};
-typedef struct am_specdata3 am_specdata3;
-
-struct am_nfstime3 {
- u_int seconds;
- u_int nseconds;
-};
-typedef struct am_nfstime3 am_nfstime3;
-
-struct am_fattr3 {
- am_ftype3 type;
- am_mode3 mode;
- u_int nlink;
- am_uid3 uid;
- am_gid3 gid;
- am_size3 size;
- am_size3 used;
- am_specdata3 rdev;
- uint64 fsid;
- am_fileid3 fileid;
- am_nfstime3 atime;
- am_nfstime3 mtime;
- am_nfstime3 ctime;
-};
-typedef struct am_fattr3 am_fattr3;
-
-struct am_post_op_attr {
- bool_t attributes_follow;
- union {
- am_fattr3 attributes;
- } am_post_op_attr_u;
-};
-typedef struct am_post_op_attr am_post_op_attr;
-
-enum am_stable_how {
- AM_UNSTABLE = 0,
- AM_DATA_SYNC = 1,
- AM_FILE_SYNC = 2,
-};
-typedef enum am_stable_how am_stable_how;
-
-typedef uint64 am_offset3;
-
-typedef u_int am_count3;
-
-struct am_wcc_attr {
- am_size3 size;
- am_nfstime3 mtime;
- am_nfstime3 ctime;
-};
-typedef struct am_wcc_attr am_wcc_attr;
-
-struct am_pre_op_attr {
- bool_t attributes_follow;
- union {
- am_wcc_attr attributes;
- } am_pre_op_attr_u;
-};
-typedef struct am_pre_op_attr am_pre_op_attr;
-
-struct am_wcc_data {
- am_pre_op_attr before;
- am_post_op_attr after;
-};
-typedef struct am_wcc_data am_wcc_data;
-
-struct am_WRITE3args {
- am_nfs_fh3 file;
- am_offset3 offset;
- am_count3 count;
- am_stable_how stable;
- struct {
- u_int data_len;
- char *data_val;
- } data;
-};
-typedef struct am_WRITE3args am_WRITE3args;
-
-typedef char am_writeverf3[AM_NFS3_WRITEVERFSIZE];
-
-struct am_WRITE3resok {
- am_wcc_data file_wcc;
- am_count3 count;
- am_stable_how committed;
- am_writeverf3 verf;
-};
-typedef struct am_WRITE3resok am_WRITE3resok;
-
-struct am_WRITE3resfail {
- am_wcc_data file_wcc;
-};
-typedef struct am_WRITE3resfail am_WRITE3resfail;
-
-struct am_WRITE3res {
- am_nfsstat3 status;
- union {
- am_WRITE3resok ok;
- am_WRITE3resfail fail;
- } res_u;
-};
-typedef struct am_WRITE3res am_WRITE3res;
-
-struct am_LOOKUP3args {
- am_diropargs3 what;
-};
-typedef struct am_LOOKUP3args am_LOOKUP3args;
-
-struct am_LOOKUP3resok {
- am_nfs_fh3 object;
- am_post_op_attr obj_attributes;
- am_post_op_attr dir_attributes;
-};
-typedef struct am_LOOKUP3resok am_LOOKUP3resok;
-
-struct am_LOOKUP3resfail {
- am_post_op_attr dir_attributes;
-};
-typedef struct am_LOOKUP3resfail am_LOOKUP3resfail;
-
-struct am_LOOKUP3res {
- am_nfsstat3 status;
- union {
- am_LOOKUP3resok ok;
- am_LOOKUP3resfail fail;
- } res_u;
-};
-typedef struct am_LOOKUP3res am_LOOKUP3res;
-
-struct am_COMMIT3args {
- am_nfs_fh3 file;
- am_offset3 offset;
- am_count3 count;
-};
-typedef struct am_COMMIT3args am_COMMIT3args;
-
-struct am_COMMIT3resok {
- am_wcc_data file_wcc;
- am_writeverf3 verf;
-};
-typedef struct am_COMMIT3resok am_COMMIT3resok;
-
-struct am_COMMIT3resfail {
- am_wcc_data file_wcc;
-};
-typedef struct am_COMMIT3resfail am_COMMIT3resfail;
-
-struct am_COMMIT3res {
- am_nfsstat3 status;
- union {
- am_COMMIT3resok ok;
- am_COMMIT3resfail fail;
- } res_u;
-};
-typedef struct am_COMMIT3res am_COMMIT3res;
-
-struct am_ACCESS3args {
- am_nfs_fh3 object;
- u_int access;
-};
-typedef struct am_ACCESS3args am_ACCESS3args;
-
-struct am_ACCESS3resok {
- am_post_op_attr obj_attributes;
- u_int access;
-};
-typedef struct am_ACCESS3resok am_ACCESS3resok;
-
-struct am_ACCESS3resfail {
- am_post_op_attr obj_attributes;
-};
-typedef struct am_ACCESS3resfail am_ACCESS3resfail;
-
-struct am_ACCESS3res {
- am_nfsstat3 status;
- union {
- am_ACCESS3resok ok;
- am_ACCESS3resfail fail;
- } res_u;
-};
-typedef struct am_ACCESS3res am_ACCESS3res;
-
-struct am_GETATTR3args {
- am_nfs_fh3 object;
-};
-typedef struct am_GETATTR3args am_GETATTR3args;
-
-struct am_GETATTR3resok {
- am_fattr3 obj_attributes;
-};
-typedef struct am_GETATTR3resok am_GETATTR3resok;
-
-struct am_GETATTR3res {
- am_nfsstat3 status;
- union {
- am_GETATTR3resok ok;
- } res_u;
-};
-typedef struct am_GETATTR3res am_GETATTR3res;
-
-enum am_time_how {
- AM_DONT_CHANGE = 0,
- AM_SET_TO_SERVER_TIME = 1,
- AM_SET_TO_CLIENT_TIME = 2,
-};
-typedef enum am_time_how am_time_how;
-
-struct am_set_mode3 {
- bool_t set_it;
- union {
- am_mode3 mode;
- } am_set_mode3_u;
-};
-typedef struct am_set_mode3 am_set_mode3;
-
-struct am_set_uid3 {
- bool_t set_it;
- union {
- am_uid3 uid;
- } am_set_uid3_u;
-};
-typedef struct am_set_uid3 am_set_uid3;
-
-struct am_set_gid3 {
- bool_t set_it;
- union {
- am_gid3 gid;
- } am_set_gid3_u;
-};
-typedef struct am_set_gid3 am_set_gid3;
-
-struct am_set_size3 {
- bool_t set_it;
- union {
- am_size3 size;
- } am_set_size3_u;
-};
-typedef struct am_set_size3 am_set_size3;
-
-struct am_set_atime {
- am_time_how set_it;
- union {
- am_nfstime3 atime;
- } am_set_atime_u;
-};
-typedef struct am_set_atime am_set_atime;
-
-struct am_set_mtime {
- am_time_how set_it;
- union {
- am_nfstime3 mtime;
- } am_set_mtime_u;
-};
-typedef struct am_set_mtime am_set_mtime;
-
-struct am_sattr3 {
- am_set_mode3 mode;
- am_set_uid3 uid;
- am_set_gid3 gid;
- am_set_size3 size;
- am_set_atime atime;
- am_set_mtime mtime;
-};
-typedef struct am_sattr3 am_sattr3;
-
-enum am_createmode3 {
- AM_UNCHECKED = 0,
- AM_GUARDED = 1,
- AM_EXCLUSIVE = 2,
-};
-typedef enum am_createmode3 am_createmode3;
-
-typedef char am_createverf3[AM_NFS3_CREATEVERFSIZE];
-
-struct am_createhow3 {
- am_createmode3 mode;
- union {
- am_sattr3 obj_attributes;
- am_sattr3 g_obj_attributes;
- am_createverf3 verf;
- } am_createhow3_u;
-};
-typedef struct am_createhow3 am_createhow3;
-
-struct am_CREATE3args {
- am_diropargs3 where;
- am_createhow3 how;
-};
-typedef struct am_CREATE3args am_CREATE3args;
-
-struct am_post_op_fh3 {
- bool_t handle_follows;
- union {
- am_nfs_fh3 handle;
- } am_post_op_fh3_u;
-};
-typedef struct am_post_op_fh3 am_post_op_fh3;
-
-struct am_CREATE3resok {
- am_post_op_fh3 obj;
- am_post_op_attr obj_attributes;
- am_wcc_data dir_wcc;
-};
-typedef struct am_CREATE3resok am_CREATE3resok;
-
-struct am_CREATE3resfail {
- am_wcc_data dir_wcc;
-};
-typedef struct am_CREATE3resfail am_CREATE3resfail;
-
-struct am_CREATE3res {
- am_nfsstat3 status;
- union {
- am_CREATE3resok ok;
- am_CREATE3resfail fail;
- } res_u;
-};
-typedef struct am_CREATE3res am_CREATE3res;
-
-struct am_REMOVE3args {
- am_diropargs3 object;
-};
-typedef struct am_REMOVE3args am_REMOVE3args;
-
-struct am_REMOVE3resok {
- am_wcc_data dir_wcc;
-};
-typedef struct am_REMOVE3resok am_REMOVE3resok;
-
-struct am_REMOVE3resfail {
- am_wcc_data dir_wcc;
-};
-typedef struct am_REMOVE3resfail am_REMOVE3resfail;
-
-struct am_REMOVE3res {
- am_nfsstat3 status;
- union {
- am_REMOVE3resok ok;
- am_REMOVE3resfail fail;
- } res_u;
-};
-typedef struct am_REMOVE3res am_REMOVE3res;
-
-struct am_READ3args {
- am_nfs_fh3 file;
- am_offset3 offset;
- am_count3 count;
-};
-typedef struct am_READ3args am_READ3args;
-
-struct am_READ3resok {
- am_post_op_attr file_attributes;
- am_count3 count;
- bool_t eof;
- struct {
- u_int data_len;
- char *data_val;
- } data;
-};
-typedef struct am_READ3resok am_READ3resok;
-
-struct am_READ3resfail {
- am_post_op_attr file_attributes;
-};
-typedef struct am_READ3resfail am_READ3resfail;
-
-struct am_READ3res {
- am_nfsstat3 status;
- union {
- am_READ3resok ok;
- am_READ3resfail fail;
- } res_u;
-};
-typedef struct am_READ3res am_READ3res;
-
-struct am_FSINFO3args {
- am_nfs_fh3 fsroot;
-};
-typedef struct am_FSINFO3args am_FSINFO3args;
-
-struct am_FSINFO3resok {
- am_post_op_attr obj_attributes;
- u_int rtmax;
- u_int rtpref;
- u_int rtmult;
- u_int wtmax;
- u_int wtpref;
- u_int wtmult;
- u_int dtpref;
- am_size3 maxfilesize;
- am_nfstime3 time_delta;
- u_int properties;
-};
-typedef struct am_FSINFO3resok am_FSINFO3resok;
-
-struct am_FSINFO3resfail {
- am_post_op_attr obj_attributes;
-};
-typedef struct am_FSINFO3resfail am_FSINFO3resfail;
-
-struct am_FSINFO3res {
- am_nfsstat3 status;
- union {
- am_FSINFO3resok ok;
- am_FSINFO3resfail fail;
- } res_u;
-};
-typedef struct am_FSINFO3res am_FSINFO3res;
-
-struct am_FSSTAT3args {
- am_nfs_fh3 fsroot;
-};
-typedef struct am_FSSTAT3args am_FSSTAT3args;
-
-struct am_FSSTAT3resok {
- am_post_op_attr obj_attributes;
- am_size3 tbytes;
- am_size3 fbytes;
- am_size3 abytes;
- am_size3 tfiles;
- am_size3 ffiles;
- am_size3 afiles;
- u_int invarsec;
-};
-typedef struct am_FSSTAT3resok am_FSSTAT3resok;
-
-struct am_FSSTAT3resfail {
- am_post_op_attr obj_attributes;
-};
-typedef struct am_FSSTAT3resfail am_FSSTAT3resfail;
-
-struct am_FSSTAT3res {
- am_nfsstat3 status;
- union {
- am_FSSTAT3resok ok;
- am_FSSTAT3resfail fail;
- } res_u;
-};
-typedef struct am_FSSTAT3res am_FSSTAT3res;
-
-struct am_PATHCONF3args {
- am_nfs_fh3 object;
-};
-typedef struct am_PATHCONF3args am_PATHCONF3args;
-
-struct am_PATHCONF3resok {
- am_post_op_attr obj_attributes;
- u_int linkmax;
- u_int name_max;
- bool_t no_trunc;
- bool_t chown_restricted;
- bool_t case_insensitive;
- bool_t case_preserving;
-};
-typedef struct am_PATHCONF3resok am_PATHCONF3resok;
-
-struct am_PATHCONF3resfail {
- am_post_op_attr obj_attributes;
-};
-typedef struct am_PATHCONF3resfail am_PATHCONF3resfail;
-
-struct am_PATHCONF3res {
- am_nfsstat3 status;
- union {
- am_PATHCONF3resok ok;
- am_PATHCONF3resfail fail;
- } res_u;
-};
-typedef struct am_PATHCONF3res am_PATHCONF3res;
-
-typedef char *am_nfspath3;
-
-struct am_symlinkdata3 {
- am_sattr3 symlink_attributes;
- am_nfspath3 symlink_data;
-};
-typedef struct am_symlinkdata3 am_symlinkdata3;
-
-struct am_SYMLINK3args {
- am_diropargs3 where;
- am_symlinkdata3 symlink;
-};
-typedef struct am_SYMLINK3args am_SYMLINK3args;
-
-struct am_SYMLINK3resok {
- am_post_op_fh3 obj;
- am_post_op_attr obj_attributes;
- am_wcc_data dir_wcc;
-};
-typedef struct am_SYMLINK3resok am_SYMLINK3resok;
-
-struct am_SYMLINK3resfail {
- am_wcc_data dir_wcc;
-};
-typedef struct am_SYMLINK3resfail am_SYMLINK3resfail;
-
-struct am_SYMLINK3res {
- am_nfsstat3 status;
- union {
- am_SYMLINK3resok ok;
- am_SYMLINK3resfail fail;
- } res_u;
-};
-typedef struct am_SYMLINK3res am_SYMLINK3res;
-
-struct am_READLINK3args {
- am_nfs_fh3 symlink;
-};
-typedef struct am_READLINK3args am_READLINK3args;
-
-struct am_READLINK3resok {
- am_post_op_attr symlink_attributes;
- am_nfspath3 data;
-};
-typedef struct am_READLINK3resok am_READLINK3resok;
-
-struct am_READLINK3resfail {
- am_post_op_attr symlink_attributes;
-};
-typedef struct am_READLINK3resfail am_READLINK3resfail;
-
-struct am_READLINK3res {
- am_nfsstat3 status;
- union {
- am_READLINK3resok ok;
- am_READLINK3resfail fail;
- } res_u;
-};
-typedef struct am_READLINK3res am_READLINK3res;
-
-struct am_devicedata3 {
- am_sattr3 dev_attributes;
- am_specdata3 spec;
-};
-typedef struct am_devicedata3 am_devicedata3;
-
-struct am_mknoddata3 {
- am_ftype3 type;
- union {
- am_devicedata3 chr_device;
- am_devicedata3 blk_device;
- am_sattr3 sock_attributes;
- am_sattr3 pipe_attributes;
- } am_mknoddata3_u;
-};
-typedef struct am_mknoddata3 am_mknoddata3;
-
-struct am_MKNOD3args {
- am_diropargs3 where;
- am_mknoddata3 what;
-};
-typedef struct am_MKNOD3args am_MKNOD3args;
-
-struct am_MKNOD3resok {
- am_post_op_fh3 obj;
- am_post_op_attr obj_attributes;
- am_wcc_data dir_wcc;
-};
-typedef struct am_MKNOD3resok am_MKNOD3resok;
-
-struct am_MKNOD3resfail {
- am_wcc_data dir_wcc;
-};
-typedef struct am_MKNOD3resfail am_MKNOD3resfail;
-
-struct am_MKNOD3res {
- am_nfsstat3 status;
- union {
- am_MKNOD3resok ok;
- am_MKNOD3resfail fail;
- } res_u;
-};
-typedef struct am_MKNOD3res am_MKNOD3res;
-
-struct am_MKDIR3args {
- am_diropargs3 where;
- am_sattr3 attributes;
-};
-typedef struct am_MKDIR3args am_MKDIR3args;
-
-struct am_MKDIR3resok {
- am_post_op_fh3 obj;
- am_post_op_attr obj_attributes;
- am_wcc_data dir_wcc;
-};
-typedef struct am_MKDIR3resok am_MKDIR3resok;
-
-struct am_MKDIR3resfail {
- am_wcc_data dir_wcc;
-};
-typedef struct am_MKDIR3resfail am_MKDIR3resfail;
-
-struct am_MKDIR3res {
- am_nfsstat3 status;
- union {
- am_MKDIR3resok ok;
- am_MKDIR3resfail fail;
- } res_u;
-};
-typedef struct am_MKDIR3res am_MKDIR3res;
-
-struct am_RMDIR3args {
- am_diropargs3 object;
-};
-typedef struct am_RMDIR3args am_RMDIR3args;
-
-struct am_RMDIR3resok {
- am_wcc_data dir_wcc;
-};
-typedef struct am_RMDIR3resok am_RMDIR3resok;
-
-struct am_RMDIR3resfail {
- am_wcc_data dir_wcc;
-};
-typedef struct am_RMDIR3resfail am_RMDIR3resfail;
-
-struct am_RMDIR3res {
- am_nfsstat3 status;
- union {
- am_RMDIR3resok ok;
- am_RMDIR3resfail fail;
- } res_u;
-};
-typedef struct am_RMDIR3res am_RMDIR3res;
-
-struct am_RENAME3args {
- am_diropargs3 from;
- am_diropargs3 to;
-};
-typedef struct am_RENAME3args am_RENAME3args;
-
-struct am_RENAME3resok {
- am_wcc_data fromdir_wcc;
- am_wcc_data todir_wcc;
-};
-typedef struct am_RENAME3resok am_RENAME3resok;
-
-struct am_RENAME3resfail {
- am_wcc_data fromdir_wcc;
- am_wcc_data todir_wcc;
-};
-typedef struct am_RENAME3resfail am_RENAME3resfail;
-
-struct am_RENAME3res {
- am_nfsstat3 status;
- union {
- am_RENAME3resok ok;
- am_RENAME3resfail fail;
- } res_u;
-};
-typedef struct am_RENAME3res am_RENAME3res;
-
-struct am_READDIRPLUS3args {
- am_nfs_fh3 dir;
- am_cookie3 cookie;
- am_cookieverf3 cookieverf;
- am_count3 dircount;
- am_count3 maxcount;
-};
-typedef struct am_READDIRPLUS3args am_READDIRPLUS3args;
-
-struct am_entryplus3 {
- am_fileid3 fileid;
- am_filename3 name;
- am_cookie3 cookie;
- am_post_op_attr name_attributes;
- am_post_op_fh3 name_handle;
- struct am_entryplus3 *nextentry;
-};
-typedef struct am_entryplus3 am_entryplus3;
-
-struct am_dirlistplus3 {
- am_entryplus3 *entries;
- bool_t eof;
-};
-typedef struct am_dirlistplus3 am_dirlistplus3;
-
-struct am_READDIRPLUS3resok {
- am_post_op_attr dir_attributes;
- am_cookieverf3 cookieverf;
- am_dirlistplus3 reply;
-};
-typedef struct am_READDIRPLUS3resok am_READDIRPLUS3resok;
-
-struct am_READDIRPLUS3resfail {
- am_post_op_attr dir_attributes;
-};
-typedef struct am_READDIRPLUS3resfail am_READDIRPLUS3resfail;
-
-struct am_READDIRPLUS3res {
- am_nfsstat3 status;
- union {
- am_READDIRPLUS3resok ok;
- am_READDIRPLUS3resfail fail;
- } res_u;
-};
-typedef struct am_READDIRPLUS3res am_READDIRPLUS3res;
-
-struct am_READDIR3args {
- am_nfs_fh3 dir;
- am_cookie3 cookie;
- am_cookieverf3 cookieverf;
- am_count3 count;
-};
-typedef struct am_READDIR3args am_READDIR3args;
-
-struct am_entry3 {
- am_fileid3 fileid;
- am_filename3 name;
- am_cookie3 cookie;
- struct am_entry3 *nextentry;
-};
-typedef struct am_entry3 am_entry3;
-
-struct am_dirlist3 {
- am_entry3 *entries;
- bool_t eof;
-};
-typedef struct am_dirlist3 am_dirlist3;
-
-struct am_READDIR3resok {
- am_post_op_attr dir_attributes;
- am_cookieverf3 cookieverf;
- am_dirlist3 reply;
-};
-typedef struct am_READDIR3resok am_READDIR3resok;
-
-struct am_READDIR3resfail {
- am_post_op_attr dir_attributes;
-};
-typedef struct am_READDIR3resfail am_READDIR3resfail;
-
-struct am_READDIR3res {
- am_nfsstat3 status;
- union {
- am_READDIR3resok ok;
- am_READDIR3resfail fail;
- } res_u;
-};
-typedef struct am_READDIR3res am_READDIR3res;
-
-struct am_LINK3args {
- am_nfs_fh3 file;
- am_diropargs3 link;
-};
-typedef struct am_LINK3args am_LINK3args;
-
-struct am_LINK3resok {
- am_post_op_attr file_attributes;
- am_wcc_data linkdir_wcc;
-};
-typedef struct am_LINK3resok am_LINK3resok;
-
-struct am_LINK3resfail {
- am_post_op_attr file_attributes;
- am_wcc_data linkdir_wcc;
-};
-typedef struct am_LINK3resfail am_LINK3resfail;
-
-struct am_LINK3res {
- am_nfsstat3 status;
- union {
- am_LINK3resok ok;
- am_LINK3resfail fail;
- } res_u;
-};
-typedef struct am_LINK3res am_LINK3res;
-
-struct am_sattrguard3 {
- bool_t check;
- union {
- am_nfstime3 obj_ctime;
- } am_sattrguard3_u;
-};
-typedef struct am_sattrguard3 am_sattrguard3;
-
-struct am_SETATTR3args {
- am_nfs_fh3 object;
- am_sattr3 new_attributes;
- am_sattrguard3 guard;
-};
-typedef struct am_SETATTR3args am_SETATTR3args;
-
-struct am_SETATTR3resok {
- am_wcc_data obj_wcc;
-};
-typedef struct am_SETATTR3resok am_SETATTR3resok;
-
-struct am_SETATTR3resfail {
- am_wcc_data obj_wcc;
-};
-typedef struct am_SETATTR3resfail am_SETATTR3resfail;
-
-struct am_SETATTR3res {
- am_nfsstat3 status;
- union {
- am_SETATTR3resok ok;
- am_SETATTR3resfail fail;
- } res_u;
-};
-typedef struct am_SETATTR3res am_SETATTR3res;
-#endif /* HAVE_FS_NFS3 */
-
-/*
- * Multi-protocol NFS file handle
- */
-union am_nfs_handle {
- /* placeholder for V4 file handle */
-#ifdef HAVE_FS_NFS3
- am_nfs_fh3 v3; /* NFS version 3 handle */
-#endif /* HAVE_FS_NFS3 */
- am_nfs_fh v2; /* NFS version 2 handle */
-};
-typedef union am_nfs_handle am_nfs_handle_t;
-
-
-/*
- * Definitions of all possible xdr functions that are otherwise
- * not defined elsewhere.
- */
-
-#ifndef _AM_XDR_FUNC_H
-#define _AM_XDR_FUNC_H
-
-#ifndef HAVE_XDR_ATTRSTAT
-bool_t xdr_attrstat(XDR *xdrs, nfsattrstat *objp);
-#endif /* not HAVE_XDR_ATTRSTAT */
-#ifndef HAVE_XDR_CREATEARGS
-bool_t xdr_createargs(XDR *xdrs, nfscreateargs *objp);
-#endif /* not HAVE_XDR_CREATEARGS */
-#ifndef HAVE_XDR_DIRLIST
-bool_t xdr_dirlist(XDR *xdrs, nfsdirlist *objp);
-#endif /* not HAVE_XDR_DIRLIST */
-#ifndef HAVE_XDR_DIROPARGS
-bool_t xdr_diropargs(XDR *xdrs, nfsdiropargs *objp);
-#endif /* not HAVE_XDR_DIROPARGS */
-#ifndef HAVE_XDR_DIROPOKRES
-bool_t xdr_diropokres(XDR *xdrs, nfsdiropokres *objp);
-#endif /* not HAVE_XDR_DIROPOKRES */
-#ifndef HAVE_XDR_DIROPRES
-bool_t xdr_diropres(XDR *xdrs, nfsdiropres *objp);
-#endif /* not HAVE_XDR_DIROPRES */
-#ifndef HAVE_XDR_DIRPATH
-bool_t xdr_dirpath(XDR *xdrs, dirpath *objp);
-#endif /* not HAVE_XDR_DIRPATH */
-#ifndef HAVE_XDR_ENTRY
-bool_t xdr_entry(XDR *xdrs, nfsentry *objp);
-#endif /* not HAVE_XDR_ENTRY */
-#ifndef HAVE_XDR_EXPORTNODE
-bool_t xdr_exportnode(XDR *xdrs, exportnode *objp);
-#endif /* not HAVE_XDR_EXPORTNODE */
-#ifndef HAVE_XDR_EXPORTS
-bool_t xdr_exports(XDR *xdrs, exports *objp);
-#endif /* not HAVE_XDR_EXPORTS */
-#ifndef HAVE_XDR_FATTR
-bool_t xdr_fattr(XDR *xdrs, nfsfattr *objp);
-#endif /* not HAVE_XDR_FATTR */
-#ifndef HAVE_XDR_FHANDLE
-bool_t xdr_fhandle(XDR *xdrs, fhandle objp);
-#endif /* not HAVE_XDR_FHANDLE */
-#ifndef HAVE_XDR_FHSTATUS
-bool_t xdr_fhstatus(XDR *xdrs, fhstatus *objp);
-#endif /* not HAVE_XDR_FHSTATUS */
-#ifndef HAVE_XDR_FILENAME
-bool_t xdr_filename(XDR *xdrs, filename *objp);
-#endif /* not HAVE_XDR_FILENAME */
-#ifndef HAVE_XDR_FTYPE
-bool_t xdr_ftype(XDR *xdrs, nfsftype *objp);
-#endif /* not HAVE_XDR_FTYPE */
-#ifndef HAVE_XDR_GROUPNODE
-bool_t xdr_groupnode(XDR *xdrs, groupnode *objp);
-#endif /* not HAVE_XDR_GROUPNODE */
-#ifndef HAVE_XDR_GROUPS
-bool_t xdr_groups(XDR *xdrs, groups *objp);
-#endif /* not HAVE_XDR_GROUPS */
-#ifndef HAVE_XDR_LINKARGS
-bool_t xdr_linkargs(XDR *xdrs, nfslinkargs *objp);
-#endif /* not HAVE_XDR_LINKARGS */
-#ifndef HAVE_XDR_MOUNTBODY
-bool_t xdr_mountbody(XDR *xdrs, mountbody *objp);
-#endif /* not HAVE_XDR_MOUNTBODY */
-#ifndef HAVE_XDR_MOUNTLIST
-bool_t xdr_mountlist(XDR *xdrs, mountlist *objp);
-#endif /* not HAVE_XDR_MOUNTLIST */
-#ifndef HAVE_XDR_NAME
-bool_t xdr_name(XDR *xdrs, name *objp);
-#endif /* not HAVE_XDR_NAME */
-#ifndef HAVE_XDR_NFS_FH
-bool_t xdr_nfs_fh(XDR *xdrs, am_nfs_fh *objp);
-#endif /* not HAVE_XDR_NFS_FH */
-#ifndef HAVE_XDR_NFSCOOKIE
-bool_t xdr_nfscookie(XDR *xdrs, nfscookie objp);
-#endif /* not HAVE_XDR_NFSCOOKIE */
-#ifndef HAVE_XDR_NFSPATH
-bool_t xdr_nfspath(XDR *xdrs, nfspath *objp);
-#endif /* not HAVE_XDR_NFSPATH */
-#ifndef HAVE_XDR_NFSSTAT
-bool_t xdr_nfsstat(XDR *xdrs, nfsstat *objp);
-#endif /* not HAVE_XDR_NFSSTAT */
-#ifndef HAVE_XDR_NFSTIME
-bool_t xdr_nfstime(XDR *xdrs, nfstime *objp);
-#endif /* not HAVE_XDR_NFSTIME */
-#ifndef HAVE_XDR_POINTER
-bool_t xdr_pointer(register XDR *xdrs, char **objpp, u_int obj_size, XDRPROC_T_TYPE xdr_obj);
-#endif /* not HAVE_XDR_POINTER */
-#ifndef HAVE_XDR_READARGS
-bool_t xdr_readargs(XDR *xdrs, nfsreadargs *objp);
-#endif /* not HAVE_XDR_READARGS */
-#ifndef HAVE_XDR_READDIRARGS
-bool_t xdr_readdirargs(XDR *xdrs, nfsreaddirargs *objp);
-#endif /* not HAVE_XDR_READDIRARGS */
-#ifndef HAVE_XDR_READDIRRES
-bool_t xdr_readdirres(XDR *xdrs, nfsreaddirres *objp);
-#endif /* not HAVE_XDR_READDIRRES */
-#ifndef HAVE_XDR_READLINKRES
-bool_t xdr_readlinkres(XDR *xdrs, nfsreadlinkres *objp);
-#endif /* not HAVE_XDR_READLINKRES */
-#ifndef HAVE_XDR_READOKRES
-bool_t xdr_readokres(XDR *xdrs, nfsreadokres *objp);
-#endif /* not HAVE_XDR_READOKRES */
-#ifndef HAVE_XDR_READRES
-bool_t xdr_readres(XDR *xdrs, nfsreadres *objp);
-#endif /* not HAVE_XDR_READRES */
-#ifndef HAVE_XDR_RENAMEARGS
-bool_t xdr_renameargs(XDR *xdrs, nfsrenameargs *objp);
-#endif /* not HAVE_XDR_RENAMEARGS */
-#ifndef HAVE_XDR_SATTR
-bool_t xdr_sattr(XDR *xdrs, nfssattr *objp);
-#endif /* not HAVE_XDR_SATTR */
-#ifndef HAVE_XDR_SATTRARGS
-bool_t xdr_sattrargs(XDR *xdrs, nfssattrargs *objp);
-#endif /* not HAVE_XDR_SATTRARGS */
-#ifndef HAVE_XDR_STATFSOKRES
-bool_t xdr_statfsokres(XDR *xdrs, nfsstatfsokres *objp);
-#endif /* not HAVE_XDR_STATFSOKRES */
-#ifndef HAVE_XDR_STATFSRES
-bool_t xdr_statfsres(XDR *xdrs, nfsstatfsres *objp);
-#endif /* not HAVE_XDR_STATFSRES */
-#ifndef HAVE_XDR_SYMLINKARGS
-bool_t xdr_symlinkargs(XDR *xdrs, nfssymlinkargs *objp);
-#endif /* not HAVE_XDR_SYMLINKARGS */
-#ifndef HAVE_XDR_WRITEARGS
-bool_t xdr_writeargs(XDR *xdrs, nfswriteargs *objp);
-#endif /* not HAVE_XDR_WRITEARGS */
-
-/*
- * NFS3 XDR FUNCTIONS:
- */
-#ifdef HAVE_FS_NFS3
-#define AM_NFS3_NULL 0
-void * am_nfs3_null_3(void *, CLIENT *);
-void * am_nfs3_null_3_svc(void *, struct svc_req *);
-#define AM_NFS3_GETATTR 1
-am_GETATTR3res * am_nfs3_getattr_3(am_GETATTR3args *, CLIENT *);
-am_GETATTR3res * am_nfs3_getattr_3_svc(am_GETATTR3args *, struct svc_req *);
-#define AM_NFS3_SETATTR 2
-am_SETATTR3res * am_nfs3_setattr_3(am_SETATTR3args *, CLIENT *);
-am_SETATTR3res * am_nfs3_setattr_3_svc(am_SETATTR3args *, struct svc_req *);
-#define AM_NFS3_LOOKUP 3
-am_LOOKUP3res * am_nfs3_lookup_3(am_LOOKUP3args *, CLIENT *);
-am_LOOKUP3res * am_nfs3_lookup_3_svc(am_LOOKUP3args *, struct svc_req *);
-#define AM_NFS3_ACCESS 4
-am_ACCESS3res * am_nfs3_access_3(am_ACCESS3args *, CLIENT *);
-am_ACCESS3res * am_nfs3_access_3_svc(am_ACCESS3args *, struct svc_req *);
-#define AM_NFS3_READLINK 5
-am_READLINK3res * am_nfs3_readlink_3(am_READLINK3args *, CLIENT *);
-am_READLINK3res * am_nfs3_readlink_3_svc(am_READLINK3args *, struct svc_req *);
-#define AM_NFS3_READ 6
-am_READ3res * am_nfs3_read_3(am_READ3args *, CLIENT *);
-am_READ3res * am_nfs3_read_3_svc(am_READ3args *, struct svc_req *);
-#define AM_NFS3_WRITE 7
-am_WRITE3res * am_nfs3_write_3(am_WRITE3args *, CLIENT *);
-am_WRITE3res * am_nfs3_write_3_svc(am_WRITE3args *, struct svc_req *);
-#define AM_NFS3_CREATE 8
-am_CREATE3res * am_nfs3_create_3(am_CREATE3args *, CLIENT *);
-am_CREATE3res * am_nfs3_create_3_svc(am_CREATE3args *, struct svc_req *);
-#define AM_NFS3_MKDIR 9
-am_MKDIR3res * am_nfs3_mkdir_3(am_MKDIR3args *, CLIENT *);
-am_MKDIR3res * am_nfs3_mkdir_3_svc(am_MKDIR3args *, struct svc_req *);
-#define AM_NFS3_SYMLINK 10
-am_SYMLINK3res * am_nfs3_symlink_3(am_SYMLINK3args *, CLIENT *);
-am_SYMLINK3res * am_nfs3_symlink_3_svc(am_SYMLINK3args *, struct svc_req *);
-#define AM_NFS3_MKNOD 11
-am_MKNOD3res * am_nfs3_mknod_3(am_MKNOD3args *, CLIENT *);
-am_MKNOD3res * am_nfs3_mknod_3_svc(am_MKNOD3args *, struct svc_req *);
-#define AM_NFS3_REMOVE 12
-am_REMOVE3res * am_nfs3_remove_3(am_REMOVE3args *, CLIENT *);
-am_REMOVE3res * am_nfs3_remove_3_svc(am_REMOVE3args *, struct svc_req *);
-#define AM_NFS3_RMDIR 13
-am_RMDIR3res * am_nfs3_rmdir_3(am_RMDIR3args *, CLIENT *);
-am_RMDIR3res * am_nfs3_rmdir_3_svc(am_RMDIR3args *, struct svc_req *);
-#define AM_NFS3_RENAME 14
-am_RENAME3res * am_nfs3_rename_3(am_RENAME3args *, CLIENT *);
-am_RENAME3res * am_nfs3_rename_3_svc(am_RENAME3args *, struct svc_req *);
-#define AM_NFS3_LINK 15
-am_LINK3res * am_nfs3_link_3(am_LINK3args *, CLIENT *);
-am_LINK3res * am_nfs3_link_3_svc(am_LINK3args *, struct svc_req *);
-#define AM_NFS3_READDIR 16
-am_READDIR3res * am_nfs3_readdir_3(am_READDIR3args *, CLIENT *);
-am_READDIR3res * am_nfs3_readdir_3_svc(am_READDIR3args *, struct svc_req *);
-#define AM_NFS3_READDIRPLUS 17
-am_READDIRPLUS3res * am_nfs3_readdirplus_3(am_READDIRPLUS3args *, CLIENT *);
-am_READDIRPLUS3res * am_nfs3_readdirplus_3_svc(am_READDIRPLUS3args *, struct svc_req *);
-#define AM_NFS3_FSSTAT 18
-am_FSSTAT3res * am_nfs3_fsstat_3(am_FSSTAT3args *, CLIENT *);
-am_FSSTAT3res * am_nfs3_fsstat_3_svc(am_FSSTAT3args *, struct svc_req *);
-#define AM_NFS3_FSINFO 19
-am_FSINFO3res * am_nfs3_fsinfo_3(am_FSINFO3args *, CLIENT *);
-am_FSINFO3res * am_nfs3_fsinfo_3_svc(am_FSINFO3args *, struct svc_req *);
-#define AM_NFS3_PATHCONF 20
-am_PATHCONF3res * am_nfs3_pathconf_3(am_PATHCONF3args *, CLIENT *);
-am_PATHCONF3res * am_nfs3_pathconf_3_svc(am_PATHCONF3args *, struct svc_req *);
-#define AM_NFS3_COMMIT 21
-am_COMMIT3res * am_nfs3_commit_3(am_COMMIT3args *, CLIENT *);
-am_COMMIT3res * am_nfs3_commit_3_svc(am_COMMIT3args *, struct svc_req *);
-int nfs_program_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-
-bool_t xdr_am_fhandle3(XDR *xdrs, am_fhandle3 *objp);
-bool_t xdr_am_mountstat3(XDR *xdrs, am_mountstat3 *objp);
-bool_t xdr_am_mountres3_ok(XDR *xdrs, am_mountres3_ok *objp);
-bool_t xdr_am_mountres3(XDR *xdrs, am_mountres3 *objp);
-bool_t xdr_am_diropargs3(XDR *xdrs, am_diropargs3 *objp);
-bool_t xdr_am_filename3(XDR *xdrs, am_filename3 *objp);
-bool_t xdr_am_LOOKUP3args(XDR *xdrs, am_LOOKUP3args *objp);
-bool_t xdr_am_LOOKUP3res(XDR *xdrs, am_LOOKUP3res *objp);
-bool_t xdr_am_LOOKUP3resfail(XDR *xdrs, am_LOOKUP3resfail *objp);
-bool_t xdr_am_LOOKUP3resok(XDR *xdrs, am_LOOKUP3resok *objp);
-bool_t xdr_am_nfsstat3(XDR *xdrs, am_nfsstat3 *objp);
-bool_t xdr_am_nfs_fh3(XDR *xdrs, am_nfs_fh3 *objp);
-bool_t xdr_am_cookieverf3 (XDR *, am_cookieverf3);
-bool_t xdr_uint64 (XDR *, uint64*);
-bool_t xdr_am_cookie3 (XDR *, am_cookie3*);
-bool_t xdr_am_nfs_fh3 (XDR *, am_nfs_fh3*);
-bool_t xdr_am_nfsstat3 (XDR *, am_nfsstat3*);
-bool_t xdr_am_filename3 (XDR *, am_filename3*);
-bool_t xdr_am_diropargs3 (XDR *, am_diropargs3*);
-bool_t xdr_am_ftype3 (XDR *, am_ftype3*);
-bool_t xdr_am_mode3 (XDR *, am_mode3*);
-bool_t xdr_am_uid3 (XDR *, am_uid3*);
-bool_t xdr_am_gid3 (XDR *, am_gid3*);
-bool_t xdr_am_size3 (XDR *, am_size3*);
-bool_t xdr_am_fileid3 (XDR *, am_fileid3*);
-bool_t xdr_am_specdata3 (XDR *, am_specdata3*);
-bool_t xdr_am_nfstime3 (XDR *, am_nfstime3*);
-bool_t xdr_am_fattr3 (XDR *, am_fattr3*);
-bool_t xdr_am_post_op_attr (XDR *, am_post_op_attr*);
-bool_t xdr_am_stable_how (XDR *, am_stable_how*);
-bool_t xdr_am_offset3 (XDR *, am_offset3*);
-bool_t xdr_am_count3 (XDR *, am_count3*);
-bool_t xdr_am_wcc_attr (XDR *, am_wcc_attr*);
-bool_t xdr_am_pre_op_attr (XDR *, am_pre_op_attr*);
-bool_t xdr_am_wcc_data (XDR *, am_wcc_data*);
-bool_t xdr_am_WRITE3args (XDR *, am_WRITE3args*);
-bool_t xdr_am_writeverf3 (XDR *, am_writeverf3);
-bool_t xdr_am_WRITE3resok (XDR *, am_WRITE3resok*);
-bool_t xdr_am_WRITE3resfail (XDR *, am_WRITE3resfail*);
-bool_t xdr_am_WRITE3res (XDR *, am_WRITE3res*);
-bool_t xdr_am_LOOKUP3args (XDR *, am_LOOKUP3args*);
-bool_t xdr_am_LOOKUP3resok (XDR *, am_LOOKUP3resok*);
-bool_t xdr_am_LOOKUP3resfail (XDR *, am_LOOKUP3resfail*);
-bool_t xdr_am_LOOKUP3res (XDR *, am_LOOKUP3res*);
-bool_t xdr_am_COMMIT3args (XDR *, am_COMMIT3args*);
-bool_t xdr_am_COMMIT3resok (XDR *, am_COMMIT3resok*);
-bool_t xdr_am_COMMIT3resfail (XDR *, am_COMMIT3resfail*);
-bool_t xdr_am_COMMIT3res (XDR *, am_COMMIT3res*);
-bool_t xdr_am_ACCESS3args (XDR *, am_ACCESS3args*);
-bool_t xdr_am_ACCESS3resok (XDR *, am_ACCESS3resok*);
-bool_t xdr_am_ACCESS3resfail (XDR *, am_ACCESS3resfail*);
-bool_t xdr_am_ACCESS3res (XDR *, am_ACCESS3res*);
-bool_t xdr_am_GETATTR3args (XDR *, am_GETATTR3args*);
-bool_t xdr_am_GETATTR3resok (XDR *, am_GETATTR3resok*);
-bool_t xdr_am_GETATTR3res (XDR *, am_GETATTR3res*);
-bool_t xdr_am_time_how (XDR *, am_time_how*);
-bool_t xdr_am_set_mode3 (XDR *, am_set_mode3*);
-bool_t xdr_am_set_uid3 (XDR *, am_set_uid3*);
-bool_t xdr_am_set_gid3 (XDR *, am_set_gid3*);
-bool_t xdr_am_set_size3 (XDR *, am_set_size3*);
-bool_t xdr_am_set_atime (XDR *, am_set_atime*);
-bool_t xdr_am_set_mtime (XDR *, am_set_mtime*);
-bool_t xdr_am_sattr3 (XDR *, am_sattr3*);
-bool_t xdr_am_createmode3 (XDR *, am_createmode3*);
-bool_t xdr_am_createverf3 (XDR *, am_createverf3);
-bool_t xdr_am_createhow3 (XDR *, am_createhow3*);
-bool_t xdr_am_CREATE3args (XDR *, am_CREATE3args*);
-bool_t xdr_am_post_op_fh3 (XDR *, am_post_op_fh3*);
-bool_t xdr_am_CREATE3resok (XDR *, am_CREATE3resok*);
-bool_t xdr_am_CREATE3resfail (XDR *, am_CREATE3resfail*);
-bool_t xdr_am_CREATE3res (XDR *, am_CREATE3res*);
-bool_t xdr_am_REMOVE3args (XDR *, am_REMOVE3args*);
-bool_t xdr_am_REMOVE3resok (XDR *, am_REMOVE3resok*);
-bool_t xdr_am_REMOVE3resfail (XDR *, am_REMOVE3resfail*);
-bool_t xdr_am_REMOVE3res (XDR *, am_REMOVE3res*);
-bool_t xdr_am_READ3args (XDR *, am_READ3args*);
-bool_t xdr_am_READ3resok (XDR *, am_READ3resok*);
-bool_t xdr_am_READ3resfail (XDR *, am_READ3resfail*);
-bool_t xdr_am_READ3res (XDR *, am_READ3res*);
-bool_t xdr_am_FSINFO3args (XDR *, am_FSINFO3args*);
-bool_t xdr_am_FSINFO3resok (XDR *, am_FSINFO3resok*);
-bool_t xdr_am_FSINFO3resfail (XDR *, am_FSINFO3resfail*);
-bool_t xdr_am_FSINFO3res (XDR *, am_FSINFO3res*);
-bool_t xdr_am_FSSTAT3args (XDR *, am_FSSTAT3args*);
-bool_t xdr_am_FSSTAT3resok (XDR *, am_FSSTAT3resok*);
-bool_t xdr_am_FSSTAT3resfail (XDR *, am_FSSTAT3resfail*);
-bool_t xdr_am_FSSTAT3res (XDR *, am_FSSTAT3res*);
-bool_t xdr_am_PATHCONF3args (XDR *, am_PATHCONF3args*);
-bool_t xdr_am_PATHCONF3resok (XDR *, am_PATHCONF3resok*);
-bool_t xdr_am_PATHCONF3resfail (XDR *, am_PATHCONF3resfail*);
-bool_t xdr_am_PATHCONF3res (XDR *, am_PATHCONF3res*);
-bool_t xdr_am_nfspath3 (XDR *, am_nfspath3*);
-bool_t xdr_am_symlinkdata3 (XDR *, am_symlinkdata3*);
-bool_t xdr_am_SYMLINK3args (XDR *, am_SYMLINK3args*);
-bool_t xdr_am_SYMLINK3resok (XDR *, am_SYMLINK3resok*);
-bool_t xdr_am_SYMLINK3resfail (XDR *, am_SYMLINK3resfail*);
-bool_t xdr_am_SYMLINK3res (XDR *, am_SYMLINK3res*);
-bool_t xdr_am_READLINK3args (XDR *, am_READLINK3args*);
-bool_t xdr_am_READLINK3resok (XDR *, am_READLINK3resok*);
-bool_t xdr_am_READLINK3resfail (XDR *, am_READLINK3resfail*);
-bool_t xdr_am_READLINK3res (XDR *, am_READLINK3res*);
-bool_t xdr_am_devicedata3 (XDR *, am_devicedata3*);
-bool_t xdr_am_mknoddata3 (XDR *, am_mknoddata3*);
-bool_t xdr_am_MKNOD3args (XDR *, am_MKNOD3args*);
-bool_t xdr_am_MKNOD3resok (XDR *, am_MKNOD3resok*);
-bool_t xdr_am_MKNOD3resfail (XDR *, am_MKNOD3resfail*);
-bool_t xdr_am_MKNOD3res (XDR *, am_MKNOD3res*);
-bool_t xdr_am_MKDIR3args (XDR *, am_MKDIR3args*);
-bool_t xdr_am_MKDIR3resok (XDR *, am_MKDIR3resok*);
-bool_t xdr_am_MKDIR3resfail (XDR *, am_MKDIR3resfail*);
-bool_t xdr_am_MKDIR3res (XDR *, am_MKDIR3res*);
-bool_t xdr_am_RMDIR3args (XDR *, am_RMDIR3args*);
-bool_t xdr_am_RMDIR3resok (XDR *, am_RMDIR3resok*);
-bool_t xdr_am_RMDIR3resfail (XDR *, am_RMDIR3resfail*);
-bool_t xdr_am_RMDIR3res (XDR *, am_RMDIR3res*);
-bool_t xdr_am_RENAME3args (XDR *, am_RENAME3args*);
-bool_t xdr_am_RENAME3resok (XDR *, am_RENAME3resok*);
-bool_t xdr_am_RENAME3resfail (XDR *, am_RENAME3resfail*);
-bool_t xdr_am_RENAME3res (XDR *, am_RENAME3res*);
-bool_t xdr_am_READDIRPLUS3args (XDR *, am_READDIRPLUS3args*);
-bool_t xdr_am_entryplus3 (XDR *, am_entryplus3*);
-bool_t xdr_am_dirlistplus3 (XDR *, am_dirlistplus3*);
-bool_t xdr_am_READDIRPLUS3resok (XDR *, am_READDIRPLUS3resok*);
-bool_t xdr_am_READDIRPLUS3resfail (XDR *, am_READDIRPLUS3resfail*);
-bool_t xdr_am_READDIRPLUS3res (XDR *, am_READDIRPLUS3res*);
-bool_t xdr_am_READDIR3args (XDR *, am_READDIR3args*);
-bool_t xdr_am_entry3 (XDR *, am_entry3*);
-bool_t xdr_am_dirlist3 (XDR *, am_dirlist3*);
-bool_t xdr_am_READDIR3resok (XDR *, am_READDIR3resok*);
-bool_t xdr_am_READDIR3resfail (XDR *, am_READDIR3resfail*);
-bool_t xdr_am_READDIR3res (XDR *, am_READDIR3res*);
-bool_t xdr_am_LINK3args (XDR *, am_LINK3args*);
-bool_t xdr_am_LINK3resok (XDR *, am_LINK3resok*);
-bool_t xdr_am_LINK3resfail (XDR *, am_LINK3resfail*);
-bool_t xdr_am_LINK3res (XDR *, am_LINK3res*);
-bool_t xdr_am_sattrguard3 (XDR *, am_sattrguard3*);
-bool_t xdr_am_SETATTR3args (XDR *, am_SETATTR3args*);
-bool_t xdr_am_SETATTR3resok (XDR *, am_SETATTR3resok*);
-bool_t xdr_am_SETATTR3resfail (XDR *, am_SETATTR3resfail*);
-bool_t xdr_am_SETATTR3res (XDR *, am_SETATTR3res*);
-#endif /* HAVE_FS_NFS3 */
-
-#endif /* not _AM_XDR_FUNC_H */
diff --git a/contrib/amd/include/amq_defs.h b/contrib/amd/include/amq_defs.h
deleted file mode 100644
index 4db5133cba42..000000000000
--- a/contrib/amd/include/amq_defs.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 1997-2014 Erez Zadok
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * File: am-utils/include/amq_defs.h
- *
- */
-
-#ifndef _AMQ_DEFS_H
-#define _AMQ_DEFS_H
-
-/*
- * MACROS
- */
-#ifndef AMQ_SIZE
-# define AMQ_SIZE 16384
-#endif /* not AMQ_SIZE */
-#define AMQ_STRLEN 16384
-#define AMQ_PROGRAM ((u_long)300019)
-#define AMQ_VERSION ((u_long)1)
-#define AMQPROC_NULL ((u_long)0)
-#define AMQPROC_MNTTREE ((u_long)1)
-#define AMQPROC_UMNT ((u_long)2) /* asynchronous unmount */
-#define AMQPROC_STATS ((u_long)3)
-#define AMQPROC_EXPORT ((u_long)4)
-#define AMQPROC_SETOPT ((u_long)5)
-#define AMQPROC_GETMNTFS ((u_long)6)
-#define AMQPROC_MOUNT ((u_long)7)
-#define AMQPROC_GETVERS ((u_long)8)
-#define AMQPROC_GETPID ((u_long)9)
-#define AMQPROC_PAWD ((u_long)10)
-#define AMQPROC_SYNC_UMNT ((u_long)11) /* synchronous unmount */
-#define AMQPROC_GETMAPINFO ((u_long)12)
-
-/*
- * TYPEDEFS
- */
-typedef time_t *time_type;
-typedef struct amq_mount_info amq_mount_info;
-typedef struct amq_map_info amq_map_info;
-typedef struct amq_mount_stats amq_mount_stats;
-typedef struct amq_mount_tree amq_mount_tree;
-typedef struct amq_setopt amq_setopt;
-typedef struct amq_sync_umnt amq_sync_umnt;
-typedef amq_mount_tree *amq_mount_tree_p;
-
-/*
- * STRUCTURES:
- */
-struct amq_mount_tree {
- amq_string mt_mountinfo;
- amq_string mt_directory;
- amq_string mt_mountpoint;
- amq_string mt_type;
- time_type mt_mounttime;
- u_short mt_mountuid;
- int mt_getattr;
- int mt_lookup;
- int mt_readdir;
- int mt_readlink;
- int mt_statfs;
- struct amq_mount_tree *mt_next;
- struct amq_mount_tree *mt_child;
-};
-
-struct amq_mount_info {
- amq_string mi_type;
- amq_string mi_mountpt;
- amq_string mi_mountinfo;
- amq_string mi_fserver;
- int mi_error;
- int mi_refc;
- int mi_up;
-};
-
-typedef struct {
- u_int amq_mount_info_list_len;
- amq_mount_info *amq_mount_info_list_val;
-} amq_mount_info_list;
-
-typedef struct {
- u_int amq_mount_tree_list_len;
- amq_mount_tree_p *amq_mount_tree_list_val;
-} amq_mount_tree_list;
-
-struct amq_map_info {
- amq_string mi_name;
- amq_string mi_wildcard;
- time_type mi_modify;
- int mi_flags;
- int mi_refc;
- int mi_up;
- int mi_reloads;
- int mi_nentries;
-};
-
-typedef struct {
- u_int amq_map_info_list_len;
- amq_map_info *amq_map_info_list_val;
-} amq_map_info_list;
-
-struct amq_mount_stats {
- int as_drops;
- int as_stale;
- int as_mok;
- int as_merr;
- int as_uerr;
-};
-
-typedef enum {
- AMQ_UMNT_OK = 0, /* must be zero! */
- AMQ_UMNT_FAILED = 1, /* unmount failed */
- AMQ_UMNT_FORK = 2, /* fork failed */
- AMQ_UMNT_READ = 3, /* pipe read failed */
- AMQ_UMNT_SERVER = 4, /* server down */
- AMQ_UMNT_SIGNAL = 5 /* received signal */
-} au_etype;
-
-struct amq_sync_umnt {
- au_etype au_etype; /* error type */
- int au_errno; /* error number */
- int au_signal; /* signal received */
-};
-
-enum amq_opt {
- AMOPT_DEBUG = 0,
- AMOPT_LOGFILE = 1,
- AMOPT_XLOG = 2,
- AMOPT_FLUSHMAPC = 3
-};
-typedef enum amq_opt amq_opt; /* enum typedefs should be after enum */
-
-struct amq_setopt {
- amq_opt as_opt;
- amq_string as_str;
-};
-
-/*
- * EXTERNALS:
- *
- * external definitions for amqproc_*_1() have been moved off to private
- * headers in lib/amu.h, amd/amd.h, etc. They have to be private since the
- * same named functions appear in different places with different prototypes
- * an functionality.
- */
-extern bool_t xdr_amq_mount_info(XDR *xdrs, amq_mount_info *objp);
-extern bool_t xdr_amq_mount_info_list(XDR *xdrs, amq_mount_info_list *objp);
-extern bool_t xdr_amq_map_info(XDR *xdrs, amq_map_info *objp);
-extern bool_t xdr_amq_map_info_list(XDR *xdrs, amq_map_info_list *objp);
-extern bool_t xdr_amq_mount_stats(XDR *xdrs, amq_mount_stats *objp);
-extern bool_t xdr_amq_mount_tree(XDR *xdrs, amq_mount_tree *objp);
-extern bool_t xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp);
-extern bool_t xdr_amq_mount_tree_p(XDR *xdrs, amq_mount_tree_p *objp);
-extern bool_t xdr_amq_opt(XDR *xdrs, amq_opt *objp);
-extern bool_t xdr_amq_setopt(XDR *xdrs, amq_setopt *objp);
-extern bool_t xdr_amq_sync_umnt(XDR *xdrs, amq_sync_umnt *objp);
-extern bool_t xdr_pri_free(XDRPROC_T_TYPE xdr_args, caddr_t args_ptr);
-extern bool_t xdr_time_type(XDR *xdrs, time_type *objp);
-
-#endif /* not _AMQ_DEFS_H */
diff --git a/contrib/amd/include/mount_headers1.h b/contrib/amd/include/mount_headers1.h
deleted file mode 100644
index 7d518a06aa26..000000000000
--- a/contrib/amd/include/mount_headers1.h
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Copyright (c) 1997-2014 Erez Zadok
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * File: am-utils/include/mount_headers1.h
- *
- */
-
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif /* HAVE_SYS_TYPES_H */
-#ifdef HAVE_SYS_ERRNO_H
-# include <sys/errno.h>
-#endif /* HAVE_SYS_ERRNO_H */
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif /* HAVE_SYS_PARAM_H */
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif /* HAVE_SYS_TIME_H */
-#ifdef HAVE_SYS_UCRED_H
-# include <sys/ucred.h>
-#endif /* HAVE_SYS_UCRED_H */
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif /* HAVE_SYS_SOCKET_H */
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif /* HAVE_NETINET_IN_H */
-#ifdef HAVE_NET_IF_H
-# include <net/if.h>
-#endif /* HAVE_NET_IF_H */
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif /* HAVE_STDIO_H */
-
-#ifndef KERNEL
-# define KERNEL_off_for_now_breaks_FreeBSD
-#endif /* not KERNEL */
-
-#ifdef HAVE_SYS_MNTENT_H
-# include <sys/mntent.h>
-#endif /* HAVE_SYS_MNTENT_H */
-#ifdef HAVE_MNTENT_H
-# include <mntent.h>
-#endif /* HAVE_MNTENT_H */
-#ifdef HAVE_SYS_MNTTAB_H
-# include <sys/mnttab.h>
-#endif /* HAVE_SYS_MNTTAB_H */
-#if defined(HAVE_MNTTAB_H) && !defined(MNTTAB)
-/*
- * Do not include it if MNTTAB is already defined because it probably
- * came from <sys/mnttab.h> and we do not want conflicting definitions.
- */
-# include <mnttab.h>
-#endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */
-
-#ifdef HAVE_SYS_MOUNT_H
-# ifndef NFSCLIENT
-# define NFSCLIENT
-# endif /* not NFSCLIENT */
-# ifndef PCFS
-# define PCFS
-# endif /* not PCFS */
-# ifndef LOFS
-# define LOFS
-# endif /* not LOFS */
-# ifndef RFS
-# define RFS
-# endif /* not RFS */
-# ifndef MSDOSFS
-# define MSDOSFS
-# endif /* not MSDOSFS */
-# ifndef MFS
-# define MFS 1
-# endif /* not MFS */
-# ifndef CD9660
-# define CD9660
-# endif /* not CD9660 */
-# ifndef NFS
-# define NFS
-# endif /* not NFS */
-# include <sys/mount.h>
-#endif /* HAVE_SYS_MOUNT_H */
-
-#ifdef HAVE_SYS_VMOUNT_H
-# include <sys/vmount.h>
-#endif /* HAVE_SYS_VMOUNT_H */
-
-#if HAVE_LINUX_FS_H
-# if !defined(__GLIBC__) || __GLIBC__ < 2
-/*
- * There's a conflict of definitions on redhat alpha linux between
- * <netinet/in.h> and <linux/fs.h>.
- * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64
- * between <netinet/in.h> and <linux/byteorder/generic.h> (2.1 kernels).
- */
-# ifdef HAVE_SOCKETBITS_H
-# define _LINUX_SOCKET_H
-# undef BLKFLSBUF
-# undef BLKGETSIZE
-# undef BLKRAGET
-# undef BLKRASET
-# undef BLKROGET
-# undef BLKROSET
-# undef BLKRRPART
-# undef MS_MGC_VAL
-# undef MS_RMT_MASK
-# endif /* HAVE_SOCKETBITS_H */
-# ifdef HAVE_LINUX_POSIX_TYPES_H
-# include <linux/posix_types.h>
-# endif /* HAVE_LINUX_POSIX_TYPES_H */
-# ifndef _LINUX_BYTEORDER_GENERIC_H
-# define _LINUX_BYTEORDER_GENERIC_H
-# endif /* _LINUX_BYTEORDER_GENERIC_H */
-# ifndef _LINUX_STRING_H_
-# define _LINUX_STRING_H_
-# endif /* not _LINUX_STRING_H_ */
-# ifdef HAVE_LINUX_KDEV_T_H
-# define __KERNEL__
-# include <linux/kdev_t.h>
-# undef __KERNEL__
-# endif /* HAVE_LINUX_KDEV_T_H */
-# ifdef HAVE_LINUX_LIST_H
-# define __KERNEL__
-# include <linux/list.h>
-# undef __KERNEL__
-# endif /* HAVE_LINUX_LIST_H */
-# include <linux/fs.h>
-# else
-# include <linux/fs.h>
-# endif/* (!__GLIBC__ || __GLIBC__ < 2) */
-#endif /* HAVE_LINUX_FS_H */
-
-#ifdef HAVE_SYS_FS_TYPES_H
-# include <sys/fs_types.h>
-#endif /* HAVE_SYS_FS_TYPES_H */
-
-#ifdef HAVE_UFS_UFS_MOUNT_H
-# include <ufs/ufs_mount.h>
-#endif /* HAVE_UFS_UFS_MOUNT_H */
-#ifdef HAVE_UFS_UFS_UFSMOUNT_H_off
-# error do not include this file here because on *bsd it
-# error causes errors with other header files. Instead, add it to the
-# error specific conf/nfs_prot_*.h file.
-# include <ufs/ufs/ufsmount.h>
-#endif /* HAVE_UFS_UFS_UFSMOUNT_H_off */
-
-#ifdef HAVE_CDFS_CDFS_MOUNT_H
-# include <cdfs/cdfs_mount.h>
-#endif /* HAVE_CDFS_CDFS_MOUNT_H */
-#ifdef HAVE_CDFS_CDFSMOUNT_H
-# include <cdfs/cdfsmount.h>
-#endif /* HAVE_CDFS_CDFSMOUNT_H */
-#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H
-# include <isofs/cd9660/cd9660_mount.h>
-#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
-
-#ifdef HAVE_FS_UDF_UDF_MOUNT_H
-# include <fs/udf/udf_mount.h>
-#endif /* HAVE_FS_UDF_UDF_MOUNT_H */
-
-#ifdef HAVE_SYS_FS_PC_FS_H
-# include <sys/fs/pc_fs.h>
-#endif /* HAVE_SYS_FS_PC_FS_H */
-#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H
-# include <msdosfs/msdosfsmount.h>
-#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */
-#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H
-# include <fs/msdosfs/msdosfsmount.h>
-#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */
-
-#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H
-# include <fs/tmpfs/tmpfs_args.h>
-#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */
-
-#ifdef HAVE_FS_EFS_EFS_MOUNT_H
-# include <fs/efs/efs_mount.h>
-#endif /* HAVE_FS_EFS_EFS_MOUNT_H */
-
-#ifdef HAVE_RPC_RPC_H
-# include <rpc/rpc.h>
-#endif /* HAVE_RPC_RPC_H */
-#ifdef HAVE_RPC_TYPES_H
-# include <rpc/types.h>
-#endif /* HAVE_RPC_TYPES_H */
-/* Prevent multiple inclusion on Ultrix 4 */
-#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
-# include <rpc/xdr.h>
-#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
-
-/* ALWAYS INCLUDE AM-UTILS' SPECIFIC NFS PROTOCOL HEADER NEXT! */
diff --git a/contrib/amd/include/mount_headers2.h b/contrib/amd/include/mount_headers2.h
deleted file mode 100644
index 87bf18efd8bb..000000000000
--- a/contrib/amd/include/mount_headers2.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1997-2014 Erez Zadok
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * File: am-utils/include/mount_headers2.h
- *
- */
-
-
-
-#ifdef HAVE_RPCSVC_MOUNT_H
-# include <rpcsvc/mount.h>
-#endif /* HAVE_RPCSVC_MOUNT_H */
-
-#ifdef HAVE_MOUNT_H
-# include <mount.h>
-#endif /* HAVE_MOUNT_H */
-
-#ifdef HAVE_NFS_NFS_GFS_H
-# include <nfs/nfs_gfs.h>
-#endif /* HAVE_NFS_NFS_GFS_H */
-
-#ifdef HAVE_NFS_MOUNT_H
-# include <nfs/mount.h>
-#endif /* HAVE_NFS_MOUNT_H */
-
-#ifdef HAVE_SYS_FS_NFS_CLNT_H
-# include <sys/fs/nfs_clnt.h>
-#endif /* HAVE_SYS_FS_NFS_CLNT_H */
-
-#ifdef HAVE_LINUX_NFS_MOUNT_H
-# ifndef _LINUX_NFS_H
-# define _LINUX_NFS_H
-# endif /* not _LINUX_NFS_H */
-# ifndef _LINUX_NFS2_H
-# define _LINUX_NFS2_H
-# endif /* not _LINUX_NFS2_H */
-# ifndef _LINUX_NFS3_H
-# define _LINUX_NFS3_H
-# endif /* not _LINUX_NFS3_H */
-# ifndef _LINUX_NFS_FS_H
-# define _LINUX_NFS_FS_H
-# endif /* not _LINUX_NFS_FS_H */
-# ifndef _LINUX_IN_H
-# define _LINUX_IN_H
-# endif /* not _LINUX_IN_H */
-# ifndef __KERNEL__
-# define __KERNEL__
-# endif /* __KERNEL__ */
-# include <linux/nfs_mount.h>
-# undef __KERNEL__
-#endif /* HAVE_LINUX_NFS_MOUNT_H */
diff --git a/contrib/amd/include/nfs_common.h b/contrib/amd/include/nfs_common.h
deleted file mode 100644
index d89632b59330..000000000000
--- a/contrib/amd/include/nfs_common.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2011 Christos Zoulas
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * File: am-utils/include/nfs_common.c
- *
- */
-struct nfs_common_args {
- u_long flags;
- u_long acdirmin;
- u_long acdirmax;
- u_long acregmin;
- u_long acregmax;
- u_long timeo;
- u_long retrans;
- u_long rsize;
- u_long wsize;
-};
-
-#ifdef HAVE_NFS_ARGS_T_ACREGMIN
-#define GET_ACREGMIN(nap, a) nap->acregmin = a.acregmin;
-#define PUT_ACREGMIN(nap, a) a.acregmin = nap->acregmin;
-#else
-#define GET_ACREGMIN(nap, a)
-#define PUT_ACREGMIN(nap, a)
-#endif
-#ifdef HAVE_NFS_ARGS_T_ACREGMAX
-#define GET_ACREGMAX(nap, a) nap->acregmax = a.acregmax;
-#define PUT_ACREGMAX(nap, a) a.acregmax = nap->acregmax;
-#else
-#define GET_ACREGMAX(nap, a)
-#define PUT_ACREGMAX(nap, a)
-#endif
-
-#ifdef HAVE_NFS_ARGS_T_ACDIRMIN
-#define GET_ACDIRMIN(nap, a) nap->acdirmin = a.acdirmin;
-#define PUT_ACDIRMIN(nap, a) a.acdirmin = nap->acdirmin;
-#else
-#define GET_ACDIRMIN(nap, a)
-#define PUT_ACDIRMIN(nap, a)
-#endif
-#ifdef HAVE_NFS_ARGS_T_ACDIRMAX
-#define GET_ACDIRMAX(nap, a) nap->acdirmax = a.acdirmax;
-#define PUT_ACDIRMAX(nap, a) a.acdirmax = nap->acdirmax;
-#else
-#define GET_ACDIRMAX(nap, a)
-#define PUT_ACDIRMAX(nap, a)
-#endif
-
-#define get_nfs_common_args(nap, a) \
- do { \
- nap->flags = a.flags; \
- GET_ACREGMIN(nap, a) \
- GET_ACREGMAX(nap, a) \
- GET_ACDIRMIN(nap, a) \
- GET_ACDIRMAX(nap, a) \
- nap->timeo = a.timeo; \
- nap->retrans = a.retrans; \
- nap->rsize = a.rsize; \
- nap->wsize = a.wsize; \
- } while (/*CONSTCOND*/0)
-
-#define put_nfs_common_args(nap, a) \
- do { \
- a.flags = nap->flags; \
- PUT_ACREGMIN(nap, a) \
- PUT_ACREGMAX(nap, a) \
- PUT_ACDIRMIN(nap, a) \
- PUT_ACDIRMAX(nap, a) \
- a.timeo = nap->timeo; \
- a.retrans = nap->retrans; \
- a.rsize = nap->rsize; \
- a.wsize = nap->wsize; \
- } while (/*CONSTCOND*/0)