use strerror
[unix-history] / usr / src / usr.sbin / amd / config / os-bsd44.h
CommitLineData
e1a31032 1/*
e1a31032
KM
2 * Copyright (c) 1990 Jan-Simon Pendry
3 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Jan-Simon Pendry at Imperial College, London.
9 *
10 * %sccs.include.redist.c%
11 *
fbc0c551 12 * @(#)os-bsd44.h 5.5 (Berkeley) %G%
8d2991d5 13 *
332f0791 14 * $Id: os-bsd44.h,v 5.2.2.1 1992/02/09 15:10:11 jsp beta $
8d2991d5
JSP
15 *
16 * 4.4 BSD definitions for Amd (automounter)
e1a31032
KM
17 */
18
19/*
20 * Does the compiler grok void *
21 */
22#define VOIDP
23
24/*
25 * Which version of the Sun RPC library we are using
26 * This is the implementation release number, not
27 * the protocol revision number.
28 */
2f619045 29#define RPC_4
e1a31032
KM
30
31/*
32 * Which version of the NFS interface are we using.
33 * This is the implementation release number, not
34 * the protocol revision number.
35 */
36#define NFS_44
37#define HAS_TCP_NFS
38
39/*
40 * Does this OS have NDBM support?
41 */
42#define OS_HAS_NDBM
43
2f619045
JSP
44/*
45 * 4.4 doesn't provide NIS.
46 */
47#undef HAS_NIS_MAPS
48
fbc0c551
JSP
49/*
50 * OS provides strerror()
51 */
52#define HAS_STRERROR
53
e1a31032
KM
54/*
55 * The mount table is obtained from the kernel
56 */
57#undef UPDATE_MTAB
58
59/*
60 * No mntent info on 4.4 BSD
61 */
62#undef MNTENT_HDR
63
64/*
65 * Name of filesystem types
66 */
67#define MOUNT_TYPE_NFS MOUNT_NFS
68#define MOUNT_TYPE_UFS MOUNT_UFS
69#undef MTAB_TYPE_UFS
70#define MTAB_TYPE_UFS "ufs"
71#define MTAB_TYPE_MFS "mfs"
72
73/*
74 * How to unmount filesystems
75 */
76#undef UNMOUNT_TRAP
77#undef NEED_UMOUNT_FS
78#define NEED_UMOUNT_BSD
79
80/*
81 * How to copy an address into an NFS filehandle
82 */
83#undef NFS_SA_DREF
84#define NFS_SA_DREF(dst, src) { \
85 (dst).addr = (struct sockaddr *) (src); \
332f0791 86 (dst).addrlen = sizeof(*src); \
e1a31032
KM
87 (dst).sotype = SOCK_DGRAM; \
88 (dst).proto = 0; \
89 }
90
91/*
92 * Byte ordering
93 */
94#ifndef BYTE_ORDER
95#include <machine/endian.h>
96#endif /* BYTE_ORDER */
97
98#undef ARCH_ENDIAN
99#if BYTE_ORDER == LITTLE_ENDIAN
100#define ARCH_ENDIAN "little"
101#else
102#if BYTE_ORDER == BIG_ENDIAN
103#define ARCH_ENDIAN "big"
104#else
105XXX - Probably no hope of running Amd on this machine!
106#endif /* BIG */
107#endif /* LITTLE */
108
109/*
110 * Miscellaneous 4.4 BSD bits
111 */
e1a31032
KM
112#define NEED_MNTOPT_PARSER
113#define SHORT_MOUNT_NAME
114
115#define MNTMAXSTR 128
116
117#define MNTTYPE_UFS "ufs" /* Un*x file system */
118#define MNTTYPE_NFS "nfs" /* network file system */
119#define MNTTYPE_MFS "mfs" /* memory file system */
120#define MNTTYPE_IGNORE "ignore" /* No type specified, ignore this entry */
121
122#define M_RDONLY MNT_RDONLY
123#define M_SYNC MNT_SYNCHRONOUS
124#define M_NOEXEC MNT_NOEXEC
125#define M_NOSUID MNT_NOSUID
126#define M_NODEV MNT_NODEV
127
128#define MNTOPT_SOFT "soft" /* soft mount */
129#define MNTOPT_INTR "intr" /* interrupts allowed */
130
332f0791
JSP
131#define NFSMNT_HOSTNAME 0 /* hostname on 4.4 is not optional */
132
e1a31032
KM
133struct mntent {
134 char *mnt_fsname; /* name of mounted file system */
135 char *mnt_dir; /* file system path prefix */
136 char *mnt_type; /* MNTTYPE_* */
137 char *mnt_opts; /* MNTOPT* */
138 int mnt_freq; /* dump frequency, in days */
139 int mnt_passno; /* pass number on parallel fsck */
140};
141
142/*
143 * Type of a file handle
144 */
145#undef NFS_FH_TYPE
146#define NFS_FH_TYPE nfsv2fh_t *
147
148/*
149 * How to get a mount list
150 */
151#undef READ_MTAB_FROM_FILE
152#define READ_MTAB_BSD_STYLE
153
154/*
155 * The data for the mount syscall needs the path in addition to the
156 * host name since that is the only source of information about the
157 * mounted filesystem.
158 */
159#define NFS_ARGS_NEEDS_PATH
2f619045
JSP
160
161/*
162 * 4.4 has RE support built in
163 */
164#undef RE_HDR
165#define RE_HDR <regexp.h>