xref: /netbsd-src/external/bsd/am-utils/dist/include/am_compat.h (revision 404fbe5fb94ca1e054339640cabb2801ce52dd30)
1 /*	$NetBSD: am_compat.h,v 1.2 2009/01/02 16:00:02 christos Exp $	*/
2 
3 /*
4  * Copyright (c) 1997-2007 Erez Zadok
5  * Copyright (c) 1990 Jan-Simon Pendry
6  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
7  * Copyright (c) 1990 The Regents of the University of California.
8  * All rights reserved.
9  *
10  * This code is derived from software contributed to Berkeley by
11  * Jan-Simon Pendry at Imperial College, London.
12  *
13  * Redistribution and use in source and binary forms, with or without
14  * modification, are permitted provided that the following conditions
15  * are met:
16  * 1. Redistributions of source code must retain the above copyright
17  *    notice, this list of conditions and the following disclaimer.
18  * 2. Redistributions in binary form must reproduce the above copyright
19  *    notice, this list of conditions and the following disclaimer in the
20  *    documentation and/or other materials provided with the distribution.
21  * 3. All advertising materials mentioning features or use of this software
22  *    must display the following acknowledgment:
23  *      This product includes software developed by the University of
24  *      California, Berkeley and its contributors.
25  * 4. Neither the name of the University nor the names of its contributors
26  *    may be used to endorse or promote products derived from this software
27  *    without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39  * SUCH DAMAGE.
40  *
41  *
42  * File: am-utils/include/am_compat.h
43  *
44  */
45 
46 /*
47  *
48  * This file contains compatibility functions and macros, all of which
49  * should be auto-discovered, but for one reason or another (mostly
50  * brain-damage on the part of system designers and header files) they cannot.
51  *
52  * Each compatibility macro/function must include instructions on how/when
53  * it can be removed the am-utils code.
54  *
55  */
56 
57 #ifndef _AM_COMPAT_H
58 # define _AM_COMPAT_H
59 
60 /*
61  * incomplete mount options definitions (sunos4, irix6, linux, etc.)
62  */
63 
64 
65 /*
66  * Complete MNTTAB_OPT_* options based on MNT2_NFS_OPT_* mount options.
67  */
68 #if defined(MNT2_NFS_OPT_ACDIRMAX) && !defined(MNTTAB_OPT_ACDIRMAX)
69 # define MNTTAB_OPT_ACDIRMAX "acdirmax"
70 #endif /* defined(MNT2_NFS_OPT_ACDIRMAX) && !defined(MNTTAB_OPT_ACDIRMAX) */
71 
72 #if defined(MNT2_NFS_OPT_ACDIRMIN) && !defined(MNTTAB_OPT_ACDIRMIN)
73 # define MNTTAB_OPT_ACDIRMIN "acdirmin"
74 #endif /* defined(MNT2_NFS_OPT_ACDIRMIN) && !defined(MNTTAB_OPT_ACDIRMIN) */
75 
76 #if defined(MNT2_NFS_OPT_ACREGMAX) && !defined(MNTTAB_OPT_ACREGMAX)
77 # define MNTTAB_OPT_ACREGMAX "acregmax"
78 #endif /* defined(MNT2_NFS_OPT_ACREGMAX) && !defined(MNTTAB_OPT_ACREGMAX) */
79 
80 #if defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNTTAB_OPT_ACREGMIN)
81 # define MNTTAB_OPT_ACREGMIN "acregmin"
82 #endif /* defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNTTAB_OPT_ACREGMIN) */
83 
84 #if !defined(MNTTAB_OPT_IGNORE)
85 /* SunOS 4.1.x and others define "noauto" option, but not "auto" */
86 # if defined(MNTTAB_OPT_NOAUTO) && !defined(MNTTAB_OPT_AUTO)
87 #  define MNTTAB_OPT_AUTO "auto"
88 # endif /* defined(MNTTAB_OPT_NOAUTO) && !defined(MNTTAB_OPT_AUTO) */
89 #endif /* !defined(MNTTAB_OPT_IGNORE) */
90 
91 #if defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC)
92 # define MNTTAB_OPT_NOAC "noac"
93 #endif /* defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC) */
94 
95 #if defined(MNT2_NFS_OPT_NOCONN) && !defined(MNTTAB_OPT_NOCONN)
96 # define MNTTAB_OPT_NOCONN "noconn"
97 # ifndef MNTTAB_OPT_CONN
98 #  define MNTTAB_OPT_CONN "conn"
99 # endif /* MNTTAB_OPT_CONN */
100 #endif /* defined(MNT2_NFS_OPT_NOCONN) && !defined(MNTTAB_OPT_NOCONN) */
101 
102 #if defined(MNT2_NFS_OPT_PGTHRESH) && !defined(MNTTAB_OPT_PGTHRESH)
103 # define MNTTAB_OPT_PGTHRESH "pgthresh"
104 #endif /* defined(MNT2_NFS_OPT_PGTHRESH) && !defined(MNTTAB_OPT_PGTHRESH) */
105 
106 #if defined(MNT2_NFS_OPT_PRIVATE) && !defined(MNTTAB_OPT_PRIVATE)
107 # define MNTTAB_OPT_PRIVATE "private"
108 #endif /* defined(MNT2_NFS_OPT_PRIVATE) && !defined(MNTTAB_OPT_PRIVATE) */
109 
110 #if defined(MNT2_NFS_OPT_RETRANS) && !defined(MNTTAB_OPT_RETRANS)
111 # define MNTTAB_OPT_RETRANS "retrans"
112 #endif /* defined(MNT2_NFS_OPT_RETRANS) && !defined(MNTTAB_OPT_RETRANS) */
113 
114 #if defined(MNT2_NFS_OPT_RSIZE) && !defined(MNTTAB_OPT_RSIZE)
115 # define MNTTAB_OPT_RSIZE "rsize"
116 #endif /* defined(MNT2_NFS_OPT_RSIZE) && !defined(MNTTAB_OPT_RSIZE) */
117 
118 #if defined(MNT2_NFS_OPT_SOFT) && !defined(MNTTAB_OPT_SOFT)
119 # define MNTTAB_OPT_SOFT "soft"
120 # ifndef MNTTAB_OPT_HARD
121 #  define MNTTAB_OPT_HARD "hard"
122 # endif /* not MNTTAB_OPT_HARD */
123 #endif /* defined(MNT2_NFS_OPT_SOFT) && !defined(MNTTAB_OPT_SOFT) */
124 
125 #if defined(MNT2_NFS_OPT_TIMEO) && !defined(MNTTAB_OPT_TIMEO)
126 # define MNTTAB_OPT_TIMEO "timeo"
127 #endif /* defined(MNT2_NFS_OPT_TIMEO) && !defined(MNTTAB_OPT_TIMEO) */
128 
129 #if defined(MNT2_NFS_OPT_WSIZE) && !defined(MNTTAB_OPT_WSIZE)
130 # define MNTTAB_OPT_WSIZE "wsize"
131 #endif /* defined(MNT2_NFS_OPT_WSIZE) && !defined(MNTTAB_OPT_WSIZE) */
132 
133 #if defined(MNT2_NFS_OPT_MAXGRPS) && !defined(MNTTAB_OPT_MAXGROUPS)
134 # define MNTTAB_OPT_MAXGROUPS "maxgroups"
135 #endif /* defined(MNT2_NFS_OPT_MAXGRPS) && !defined(MNTTAB_OPT_MAXGROUPS) */
136 
137 #if defined(MNT2_NFS_OPT_PROPLIST) && !defined(MNTTAB_OPT_PROPLIST)
138 # define MNTTAB_OPT_PROPLIST "proplist"
139 #endif /* defined(MNT2_NFS_OPT_PROPLIST) && !defined(MNTTAB_OPT_PROPLIST) */
140 
141 #if defined(MNT2_NFS_OPT_NONLM) && !defined(MNTTAB_OPT_NOLOCK)
142 # define MNTTAB_OPT_NOLOCK "nolock"
143 #endif /* defined(MNT2_NFS_OPT_NONLM) && !defined(MNTTAB_OPT_NOLOCK) */
144 
145 #if defined(MNT2_NFS_OPT_XLATECOOKIE) && !defined(MNTTAB_OPT_XLATECOOKIE)
146 # define MNTTAB_OPT_XLATECOOKIE "xlatecookie"
147 #endif /* defined(MNT2_NFS_OPT_XLATECOOKIE) && !defined(MNTTAB_OPT_XLATECOOKIE) */
148 
149 /*
150  * Complete MNTTAB_OPT_* options based on MNT2_CDFS_OPT_* mount options.
151  */
152 #if defined(MNT2_CDFS_OPT_DEFPERM) && !defined(MNTTAB_OPT_DEFPERM)
153 # define MNTTAB_OPT_DEFPERM "defperm"
154 #endif /* defined(MNT2_CDFS_OPT_DEFPERM) && !defined(MNTTAB_OPT_DEFPERM) */
155 
156 #if defined(MNT2_CDFS_OPT_NODEFPERM) && !defined(MNTTAB_OPT_NODEFPERM)
157 # define MNTTAB_OPT_NODEFPERM "nodefperm"
158 /*
159  * DEC OSF/1 V3.x/Digital UNIX V4.0 have M_NODEFPERM only, but
160  * both mnttab ops.
161  */
162 # ifndef MNTTAB_OPT_DEFPERM
163 #  define MNTTAB_OPT_DEFPERM "defperm"
164 # endif /* not MNTTAB_OPT_DEFPERM */
165 #endif /* defined(MNT2_CDFS_OPT_NODEFPERM) && !defined(MNTTAB_OPT_NODEFPERM) */
166 
167 #if defined(MNT2_CDFS_OPT_NOVERSION) && !defined(MNTTAB_OPT_NOVERSION)
168 # define MNTTAB_OPT_NOVERSION "noversion"
169 #endif /* defined(MNT2_CDFS_OPT_NOVERSION) && !defined(MNTTAB_OPT_NOVERSION) */
170 
171 #if defined(MNT2_CDFS_OPT_RRIP) && !defined(MNTTAB_OPT_RRIP)
172 # define MNTTAB_OPT_RRIP "rrip"
173 #endif /* defined(MNT2_CDFS_OPT_RRIP) && !defined(MNTTAB_OPT_RRIP) */
174 #if defined(MNT2_CDFS_OPT_NORRIP) && !defined(MNTTAB_OPT_NORRIP)
175 # define MNTTAB_OPT_NORRIP "norrip"
176 #endif /* defined(MNT2_CDFS_OPT_NORRIP) && !defined(MNTTAB_OPT_NORRIP) */
177 
178 #if defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS)
179 # define MNTTAB_OPT_GENS "gens"
180 #endif /* defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) */
181 
182 #if defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT)
183 # define MNTTAB_OPT_EXTATT "extatt"
184 #endif /* defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) */
185 
186 #if defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET)
187 # define MNTTAB_OPT_NOJOLIET "nojoliet"
188 #endif /* defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET) */
189 
190 #if defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS)
191 # define MNTTAB_OPT_NOCASETRANS "nocasetrans"
192 #endif /* defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS) */
193 
194 #if defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS)
195 # define MNTTAB_OPT_RRCASEINS "rrcaseins"
196 #endif /* defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS) */
197 
198 
199 /*
200  * Complete MNTTAB_OPT_* options based on MNT2_PCFS_OPT_* mount options.
201  */
202 #if defined(MNT2_PCFS_OPT_LONGNAME) && !defined(MNTTAB_OPT_LONGNAME)
203 # define MNTTAB_OPT_LONGNAME "longnames"
204 #endif /* defined(MNT2_PCFS_OPT_LONGNAME) && !defined(MNTTAB_OPT_LONGNAME) */
205 #if defined(MNT2_PCFS_OPT_NOWIN95) && !defined(MNTTAB_OPT_NOWIN95)
206 # define MNTTAB_OPT_NOWIN95 "nowin95"
207 #endif /* defined(MNT2_PCFS_OPT_NOWIN95) && !defined(MNTTAB_OPT_NOWIN95) */
208 #if defined(MNT2_PCFS_OPT_SHORTNAME) && !defined(MNTTAB_OPT_SHORTNAME)
209 # define MNTTAB_OPT_SHORTNAME "shortnames"
210 #endif /* defined(MNT2_PCFS_OPT_SHORTNAME) && !defined(MNTTAB_OPT_SHORTNAME) */
211 
212 /*
213  * Complete MNTTAB_OPT_* options based on MNT2_GEN_OPT_* mount options.
214  */
215 #if defined(MNT2_GEN_OPT_GRPID) && !defined(MNTTAB_OPT_GRPID)
216 # define MNTTAB_OPT_GRPID "grpid"
217 #endif /* defined(MNT2_GEN_OPT_GRPID) && !defined(MNTTAB_OPT_GRPID) */
218 
219 #if defined(MNT2_GEN_OPT_NOCACHE) && !defined(MNTTAB_OPT_NOCACHE)
220 # define MNTTAB_OPT_NOCACHE "nocache"
221 #endif /* defined(MNT2_GEN_OPT_NOCACHE) && !defined(MNTTAB_OPT_NOCACHE) */
222 
223 #if defined(MNT2_GEN_OPT_NOSUID) && !defined(MNTTAB_OPT_NOSUID)
224 # define MNTTAB_OPT_NOSUID "nosuid"
225 #endif /* defined(MNT2_GEN_OPT_NOSUID) && !defined(MNTTAB_OPT_NOSUID) */
226 
227 #if defined(MNT2_GEN_OPT_OVERLAY) && !defined(MNTTAB_OPT_OVERLAY)
228 # define MNTTAB_OPT_OVERLAY "overlay"
229 #endif /* defined(MNT2_GEN_OPT_OVERLAY) && !defined(MNTTAB_OPT_OVERLAY) */
230 
231 /*
232  * Complete MNTTAB_OPT_* options and their inverse based on MNT2_GEN_OPT_*
233  * options.
234  */
235 #if defined(MNT2_GEN_OPT_NODEV) && !defined(MNTTAB_OPT_NODEV)
236 # define MNTTAB_OPT_NODEV "nodev"
237 #endif /* defined(MNT2_GEN_OPT_NODEV) && !defined(MNTTAB_OPT_NODEV) */
238 
239 #if defined(MNT2_GEN_OPT_NOEXEC) && !defined(MNTTAB_OPT_NOEXEC)
240 # define MNTTAB_OPT_NOEXEC "noexec"
241 /* this is missing under some versions of Linux */
242 # ifndef MNTTAB_OPT_EXEC
243 #  define MNTTAB_OPT_EXEC "exec"
244 # endif /* not MNTTAB_OPT_EXEC */
245 #endif /* defined(MNT2_GEN_OPT_NOEXEC) && !defined(MNTTAB_OPT_NOEXEC) */
246 
247 #if defined(MNT2_GEN_OPT_QUOTA) && !defined(MNTTAB_OPT_QUOTA)
248 # define MNTTAB_OPT_QUOTA "quota"
249 #endif /* defined(MNT2_GEN_OPT_QUOTA) && !defined(MNTTAB_OPT_QUOTA) */
250 
251 #if defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC)
252 # define MNTTAB_OPT_SYNC "sync"
253 #endif /* defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC) */
254 
255 #if defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG)
256 # define MNTTAB_OPT_LOG "log"
257 #endif /* defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG) */
258 
259 #if defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME)
260 # define MNTTAB_OPT_LOG "noatime"
261 #endif /* defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME) */
262 
263 #if defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME)
264 # define MNTTAB_OPT_LOG "nodevmtime"
265 #endif /* defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME) */
266 
267 #if defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP)
268 # define MNTTAB_OPT_LOG "softdep"
269 #endif /* defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP) */
270 
271 #if defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM)
272 # define MNTTAB_OPT_LOG "symperm"
273 #endif /* defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM) */
274 
275 #if defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION)
276 # define MNTTAB_OPT_LOG "union"
277 #endif /* defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION) */
278 
279 /*
280  * Add missing MNTTAB_OPT_* options.
281  */
282 #ifndef MNTTAB_OPT_ACTIMEO
283 # define MNTTAB_OPT_ACTIMEO "actimeo"
284 #endif /* not MNTTAB_OPT_ACTIMEO */
285 
286 #ifndef MNTTAB_OPT_INTR
287 # define MNTTAB_OPT_INTR "intr"
288 #endif /* not MNTTAB_OPT_INTR */
289 
290 #ifndef MNTTAB_OPT_PORT
291 # define MNTTAB_OPT_PORT "port"
292 #endif /* not MNTTAB_OPT_PORT */
293 
294 #ifndef MNTTAB_OPT_PUBLIC
295 # define MNTTAB_OPT_PUBLIC "public"
296 #endif /* not MNTTAB_OPT_PUBLIC */
297 
298 #ifndef MNTTAB_OPT_RETRANS
299 # define MNTTAB_OPT_RETRANS "retrans"
300 #endif /* not MNTTAB_OPT_RETRANS */
301 
302 #ifndef MNTTAB_OPT_RETRY
303 # define MNTTAB_OPT_RETRY "retry"
304 #endif /* not MNTTAB_OPT_RETRY */
305 
306 #ifndef MNTTAB_OPT_RO
307 # define MNTTAB_OPT_RO "ro"
308 #endif /* not MNTTAB_OPT_RO */
309 
310 #ifndef MNTTAB_OPT_RSIZE
311 # define MNTTAB_OPT_RSIZE "rsize"
312 #endif /* not MNTTAB_OPT_RSIZE */
313 
314 #ifndef MNTTAB_OPT_RW
315 # define MNTTAB_OPT_RW "rw"
316 #endif /* not MNTTAB_OPT_RW */
317 
318 #ifndef MNTTAB_OPT_TIMEO
319 # define MNTTAB_OPT_TIMEO "timeo"
320 #endif /* not MNTTAB_OPT_TIMEO */
321 
322 #ifndef MNTTAB_OPT_WSIZE
323 # define MNTTAB_OPT_WSIZE "wsize"
324 #endif /* not MNTTAB_OPT_WSIZE */
325 
326 /* next four are useful for pcfs mounts */
327 #ifndef MNTTAB_OPT_USER
328 # define MNTTAB_OPT_USER "user"
329 #endif /* not MNTTAB_OPT_USER */
330 #ifndef MNTTAB_OPT_GROUP
331 # define MNTTAB_OPT_GROUP "group"
332 #endif /* not MNTTAB_OPT_GROUP */
333 #ifndef MNTTAB_OPT_MASK
334 # define MNTTAB_OPT_MASK "mask"
335 #endif /* not MNTTAB_OPT_MASK */
336 #ifndef MNTTAB_OPT_DIRMASK
337 # define MNTTAB_OPT_DIRMASK "dirmask"
338 #endif /* not MNTTAB_OPT_DIRMASK */
339 
340 /*
341  * Incomplete filesystem definitions (sunos4, irix6, solaris2)
342  */
343 #if defined(HAVE_FS_CDFS) && defined(MOUNT_TYPE_CDFS) && !defined(MNTTYPE_CDFS)
344 # define MNTTYPE_CDFS "hsfs"
345 #endif /* defined(HAVE_FS_CDFS) && defined(MOUNT_TYPE_CDFS) && !defined(MNTTYPE_CDFS) */
346 
347 #ifndef cdfs_args_t
348 /*
349  * Solaris has an HSFS filesystem, but does not define hsfs_args.
350  * XXX: the definition here for solaris is wrong, since under solaris,
351  * hsfs_args should be a single integer used as a bit-field for options.
352  * so this code has to be fixed later.  -Erez.
353  */
354 struct hsfs_args {
355         char *fspec;    /* name of filesystem to mount */
356         int norrip;
357 };
358 # define cdfs_args_t struct hsfs_args
359 # define HAVE_CDFS_ARGS_T_NORRIP
360 #endif /* not cdfs_args_t */
361 
362 /*
363  * if does not define struct pc_args, assume integer bit-field (irix6)
364  */
365 #if defined(HAVE_FS_PCFS) && !defined(pcfs_args_t)
366 # define pcfs_args_t u_int
367 #endif /* defined(HAVE_FS_PCFS) && !defined(pcfs_args_t) */
368 
369 /*
370  * if does not define struct ufs_args, assume integer bit-field (linux)
371  */
372 #if defined(HAVE_FS_UFS) && !defined(ufs_args_t)
373 # define ufs_args_t u_int
374 #endif /* defined(HAVE_FS_UFS) && !defined(ufs_args_t) */
375 
376 /*
377  * if does not define struct efs_args, assume integer bit-field (linux)
378  */
379 #if defined(HAVE_FS_EFS) && !defined(efs_args_t)
380 # define efs_args_t u_int
381 #endif /* defined(HAVE_FS_EFS) && !defined(efs_args_t) */
382 
383 #if defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t)
384 # define tmpfs_args_t u_int
385 #endif /* defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t) */
386 
387 /*
388  * if does not define struct xfs_args, assume integer bit-field (linux)
389  */
390 #if defined(HAVE_FS_XFS) && !defined(xfs_args_t)
391 # define xfs_args_t u_int
392 #endif /* defined(HAVE_FS_XFS) && !defined(xfs_args_t) */
393 
394 #if defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS)
395 # define MNTTYPE_AUTOFS "autofs"
396 #endif /* defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS) */
397 
398 /*
399  * If NFS3, then make sure that "proto" and "vers" mnttab options
400  * are available.
401  */
402 #ifdef HAVE_FS_NFS3
403 # ifndef MNTTAB_OPT_VERS
404 #  define MNTTAB_OPT_VERS "vers"
405 # endif /* not MNTTAB_OPT_VERS */
406 # ifndef MNTTAB_OPT_PROTO
407 #  define MNTTAB_OPT_PROTO "proto"
408 # endif /* not MNTTAB_OPT_PROTO */
409 #endif /* not HAVE_FS_NFS3 */
410 
411 /*
412  * If loop device (header file) exists, define mount table option
413  */
414 #if defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP)
415 # define MNTTAB_OPT_LOOP "loop"
416 #endif /* defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP) */
417 
418 /*
419  * Define a dummy struct netconfig for non-TLI systems
420  */
421 #if !defined(HAVE_NETCONFIG_H) && !defined(HAVE_SYS_NETCONFIG_H)
422 struct netconfig {
423   int dummy;
424 };
425 #endif /* not HAVE_NETCONFIG_H and not HAVE_SYS_NETCONFIG_H */
426 
427 /* some OSs don't define INADDR_NONE and assume it's unsigned -1 */
428 #ifndef INADDR_NONE
429 # define INADDR_NONE	0xffffffffU
430 #endif /* INADDR_NONE */
431 /* some OSs don't define INADDR_LOOPBACK */
432 #ifndef INADDR_LOOPBACK
433 # define INADDR_LOOPBACK	0x7f000001
434 #endif /* not INADDR_LOOPBACK */
435 
436 #endif /* not _AM_COMPAT_H */
437