summaryrefslogtreecommitdiffstats
path: root/contrib/amd/include
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-09-15 02:50:52 +0000
committerobrien <obrien@FreeBSD.org>1999-09-15 02:50:52 +0000
commit422815db966fe7dc38dfc5df2be5e83d5ea9f48c (patch)
treebabaa2d3f02bbec865446438f974c81f18ae2607 /contrib/amd/include
parentc9384f1d982e4695904ef82271714a049cd32827 (diff)
downloadFreeBSD-src-422815db966fe7dc38dfc5df2be5e83d5ea9f48c.zip
FreeBSD-src-422815db966fe7dc38dfc5df2be5e83d5ea9f48c.tar.gz
Virgin import of AMD (am-utils) v6.0.1
Diffstat (limited to 'contrib/amd/include')
-rw-r--r--contrib/amd/include/am_compat.h10
-rw-r--r--contrib/amd/include/am_defs.h98
-rw-r--r--contrib/amd/include/am_utils.h13
-rw-r--r--contrib/amd/include/am_xdr_func.h4
-rw-r--r--contrib/amd/include/amq_defs.h6
5 files changed, 106 insertions, 25 deletions
diff --git a/contrib/amd/include/am_compat.h b/contrib/amd/include/am_compat.h
index ccb3528..876f2ea 100644
--- a/contrib/amd/include/am_compat.h
+++ b/contrib/amd/include/am_compat.h
@@ -111,6 +111,16 @@
#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) */
/*
* Complete MNTTAB_OPT_* options based on MNT2_GEN_OPT_* mount options.
diff --git a/contrib/amd/include/am_defs.h b/contrib/amd/include/am_defs.h
index 8eae15f..cc8035f 100644
--- a/contrib/amd/include/am_defs.h
+++ b/contrib/amd/include/am_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1998 Erez Zadok
+ * Copyright (c) 1997-1999 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.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_defs.h,v 1.2 1998/12/27 06:25:23 ezk Exp $
+ * $Id: am_defs.h,v 1.10 1999/08/22 05:12:54 ezk Exp $
*
*/
@@ -70,6 +70,24 @@ char *strchr(), *strrchr(), *strdup();
#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__ */
+
+/*
* How to handle signals of any type
*/
#ifdef HAVE_SYS_WAIT_H
@@ -303,7 +321,7 @@ extern int errno;
#endif /* HAVE_SYS_MNTENT_H */
/*
- * Actions to take if <ndbm.h> exists.
+ * 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".
*/
@@ -314,6 +332,13 @@ extern int errno;
# define DATUM
# endif /* not DATUM */
#endif /* HAVE_NDBM_H */
+#ifdef HAVE_DB1_NDBM_H
+# include <db1/ndbm.h>
+# ifndef DATUM
+/* ensure that struct datum is not included again from <rpcsvc/yp_prot.h> */
+# define DATUM
+# endif /* not DATUM */
+#endif /* HAVE_DB1_NDBM_H */
/*
* Actions to take if <net/errno.h> exists.
@@ -323,19 +348,19 @@ extern int errno;
#endif /* HAVE_NET_ERRNO_H */
/*
- * Actions to take if <net/if.h> exists.
+ * 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 <net/if.h> exists.
+ * 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> so I must
+ * 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
@@ -345,7 +370,7 @@ extern int errno;
# undef m_data
# endif /* m_data */
/*
- * AIX 3 defines MFREE and m_flags also in <sys/mount>.
+ * AIX 3 defines MFREE and m_flags also in <sys/mount.h>.
*/
# ifdef m_flags
# undef m_flags
@@ -470,8 +495,8 @@ struct ypall_callback;
*/
#ifdef HAVE_LINUX_FS_H
/*
- * There's a conflict of definitions on redhat alpha linux between
- * <netinet/in.h> and <linux/fs.h>.
+ * 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> */
@@ -485,23 +510,54 @@ struct ypall_callback;
# undef BLKRRPART
# undef MS_MGC_VAL
# undef MS_RMT_MASK
+# if defined(__GLIBC__) && __GLIBC__ >= 2
/* conflicts with <waitflags.h> */
-# undef WNOHANG
-# undef WUNTRACED
+# 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.1 kernels */
+/* conflicts with <sys/mount.h> in 2.[12] kernels */
# ifdef _SYS_MOUNT_H
-# ifdef BLOCK_SIZE
-# undef BLOCK_SIZE
-# endif /* BLOCK_SIZE */
+# 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 */
# include <linux/fs.h>
#endif /* HAVE_LINUX_FS_H */
@@ -576,7 +632,7 @@ struct ypall_callback;
# include <nfs/mount.h>
#endif /* HAVE_NFS_MOUNT_H */
#ifdef HAVE_NFS_NFS_MOUNT_H_off
-/* broken on netxtep3 (includes non-existing headers) */
+/* broken on nexttep3 (includes non-existing headers) */
# include <nfs/nfs_mount.h>
#endif /* HAVE_NFS_NFS_MOUNT_H */
#ifdef HAVE_NFS_PATHCONF_H
@@ -701,6 +757,12 @@ struct sockaddr_dl;
#ifdef HAVE_SYS_FS_UFS_MOUNT_H
# include <sys/fs/ufs_mount.h>
#endif /* HAVE_SYS_FS_UFS_MOUNT_H */
+#ifdef HAVE_UFS_UFS_UFSMOUNT_H_off
+# error do not include this file here because on netbsd/openbsd 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 */
/*
* Actions to take if <sys/fs/efs_clnt.h> exists.
@@ -1221,6 +1283,10 @@ 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) */
diff --git a/contrib/amd/include/am_utils.h b/contrib/amd/include/am_utils.h
index 24741b8..4098cd4 100644
--- a/contrib/amd/include/am_utils.h
+++ b/contrib/amd/include/am_utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1998 Erez Zadok
+ * Copyright (c) 1997-1999 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.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_utils.h,v 1.2 1998/12/27 06:25:23 ezk Exp $
+ * $Id: am_utils.h,v 1.6 1999/08/22 05:12:55 ezk Exp $
*
*/
@@ -127,6 +127,8 @@
/* allocate anything of type ty */
#define ALLOC(ty) ((ty *) xmalloc(sizeof(ty)))
#define CALLOC(ty) ((ty *) xcalloc(1, sizeof(ty)))
+/* simply allocate b bytes */
+#define SALLOC(b) xmalloc((b))
/* converting am-filehandles to mount-points */
#define fh_to_mp2(fhp, rp) fh_to_mp3(fhp, rp, VLOOK_CREATE)
@@ -565,6 +567,7 @@ extern int amu_close(int fd);
extern int background(void);
extern int bind_resv_port(int, u_short *);
extern int cmdoption(char *, struct opt_tab *, int *);
+extern int compute_automounter_mount_flags(mntent_t *);
extern int compute_mount_flags(mntent_t *);
extern int efs_readdir(am_node *, nfscookie, nfsdirlist *, nfsentry *, int);
extern int eval_fs_opts(am_opts *, char *, char *, char *, char *, char *);
@@ -640,7 +643,8 @@ extern void nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp);
extern void normalize_slash(char *);
extern void ops_showamfstypes(char *buf);
extern void ops_showfstypes(char *outbuf);
-extern void plog(int, char *,...);
+extern void plog(int, char *,...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
extern void rem_que(qelem *);
extern void reschedule_timeout_mp(void);
extern void restart(void);
@@ -961,7 +965,8 @@ extern void print_nfs_args(const nfs_args_t *nap, u_long nfs_version);
extern int debug_flags; /* Debug options */
extern int debug_option (char *opt);
extern struct opt_tab dbg_opt[];
-extern void dplog(char *fmt, ...);
+extern void dplog(char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
/**************************************************************************/
/*** MISC (stuff left to autoconfiscate) ***/
diff --git a/contrib/amd/include/am_xdr_func.h b/contrib/amd/include/am_xdr_func.h
index 206217c..b50e008 100644
--- a/contrib/amd/include/am_xdr_func.h
+++ b/contrib/amd/include/am_xdr_func.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1998 Erez Zadok
+ * Copyright (c) 1997-1999 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.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_xdr_func.h,v 1.1.1.1 1998/11/05 02:04:43 ezk Exp $
+ * $Id: am_xdr_func.h,v 1.2 1999/01/10 21:54:35 ezk Exp $
*
*/
diff --git a/contrib/amd/include/amq_defs.h b/contrib/amd/include/amq_defs.h
index f3caf8a..6564e24 100644
--- a/contrib/amd/include/amq_defs.h
+++ b/contrib/amd/include/amq_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1998 Erez Zadok
+ * Copyright (c) 1997-1999 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.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_defs.h,v 1.1.1.1 1998/11/05 02:04:44 ezk Exp $
+ * $Id: amq_defs.h,v 1.3 1999/09/08 23:36:52 ezk Exp $
*
*/
@@ -51,7 +51,7 @@
#ifndef AMQ_SIZE
# define AMQ_SIZE 16384
#endif /* not AMQ_SIZE */
-#define AMQ_STRLEN 1024
+#define AMQ_STRLEN 2048
#define AMQ_PROGRAM ((u_long)300019)
#define AMQ_VERSION ((u_long)1)
#define AMQPROC_NULL ((u_long)0)
OpenPOWER on IntegriCloud