1 /* $NetBSD: am_compat.h,v 1.1.1.2 2009/03/20 20:26:55 christos Exp $ */
4 * Copyright (c) 1997-2009 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.
10 * This code is derived from software contributed to Berkeley by
11 * Jan-Simon Pendry at Imperial College, London.
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
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.
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
42 * File: am-utils/include/am_compat.h
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.
52 * Each compatibility macro/function must include instructions on how/when
53 * it can be removed the am-utils code.
61 * incomplete mount options definitions (sunos4, irix6, linux, etc.)
66 * Complete MNTTAB_OPT_* options based on MNT2_NFS_OPT_* mount options.
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
150 * Complete MNTTAB_OPT_* options based on MNT2_CDFS_OPT_* mount options.
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) */
156 #if defined(MNT2_CDFS_OPT_NODEFPERM) && !defined(MNTTAB_OPT_NODEFPERM)
157 # define MNTTAB_OPT_NODEFPERM "nodefperm"
159 * DEC OSF/1 V3.x/Digital UNIX V4.0 have M_NODEFPERM only, but
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) */
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) */
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) */
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) */
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) */
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) */
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) */
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) */
199 * Complete MNTTAB_OPT_* options based on MNT2_UDF_OPT_* mount options.
201 #if defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION)
202 # define MNTTAB_OPT_CLOSESESSION "closesession"
203 #endif /* defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION) */
206 * Complete MNTTAB_OPT_* options based on MNT2_PCFS_OPT_* mount options.
208 #if defined(MNT2_PCFS_OPT_LONGNAME) && !defined(MNTTAB_OPT_LONGNAME)
209 # define MNTTAB_OPT_LONGNAME "longnames"
210 #endif /* defined(MNT2_PCFS_OPT_LONGNAME) && !defined(MNTTAB_OPT_LONGNAME) */
211 #if defined(MNT2_PCFS_OPT_NOWIN95) && !defined(MNTTAB_OPT_NOWIN95)
212 # define MNTTAB_OPT_NOWIN95 "nowin95"
213 #endif /* defined(MNT2_PCFS_OPT_NOWIN95) && !defined(MNTTAB_OPT_NOWIN95) */
214 #if defined(MNT2_PCFS_OPT_SHORTNAME) && !defined(MNTTAB_OPT_SHORTNAME)
215 # define MNTTAB_OPT_SHORTNAME "shortnames"
216 #endif /* defined(MNT2_PCFS_OPT_SHORTNAME) && !defined(MNTTAB_OPT_SHORTNAME) */
219 * Complete MNTTAB_OPT_* options based on MNT2_GEN_OPT_* mount options.
221 #if defined(MNT2_GEN_OPT_GRPID) && !defined(MNTTAB_OPT_GRPID)
222 # define MNTTAB_OPT_GRPID "grpid"
223 #endif /* defined(MNT2_GEN_OPT_GRPID) && !defined(MNTTAB_OPT_GRPID) */
225 #if defined(MNT2_GEN_OPT_NOCACHE) && !defined(MNTTAB_OPT_NOCACHE)
226 # define MNTTAB_OPT_NOCACHE "nocache"
227 #endif /* defined(MNT2_GEN_OPT_NOCACHE) && !defined(MNTTAB_OPT_NOCACHE) */
229 #if defined(MNT2_GEN_OPT_NOSUID) && !defined(MNTTAB_OPT_NOSUID)
230 # define MNTTAB_OPT_NOSUID "nosuid"
231 #endif /* defined(MNT2_GEN_OPT_NOSUID) && !defined(MNTTAB_OPT_NOSUID) */
233 #if defined(MNT2_GEN_OPT_OVERLAY) && !defined(MNTTAB_OPT_OVERLAY)
234 # define MNTTAB_OPT_OVERLAY "overlay"
235 #endif /* defined(MNT2_GEN_OPT_OVERLAY) && !defined(MNTTAB_OPT_OVERLAY) */
238 * Complete MNTTAB_OPT_* options and their inverse based on MNT2_GEN_OPT_*
241 #if defined(MNT2_GEN_OPT_NODEV) && !defined(MNTTAB_OPT_NODEV)
242 # define MNTTAB_OPT_NODEV "nodev"
243 #endif /* defined(MNT2_GEN_OPT_NODEV) && !defined(MNTTAB_OPT_NODEV) */
245 #if defined(MNT2_GEN_OPT_NOEXEC) && !defined(MNTTAB_OPT_NOEXEC)
246 # define MNTTAB_OPT_NOEXEC "noexec"
247 /* this is missing under some versions of Linux */
248 # ifndef MNTTAB_OPT_EXEC
249 # define MNTTAB_OPT_EXEC "exec"
250 # endif /* not MNTTAB_OPT_EXEC */
251 #endif /* defined(MNT2_GEN_OPT_NOEXEC) && !defined(MNTTAB_OPT_NOEXEC) */
253 #if defined(MNT2_GEN_OPT_QUOTA) && !defined(MNTTAB_OPT_QUOTA)
254 # define MNTTAB_OPT_QUOTA "quota"
255 #endif /* defined(MNT2_GEN_OPT_QUOTA) && !defined(MNTTAB_OPT_QUOTA) */
257 #if defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC)
258 # define MNTTAB_OPT_SYNC "sync"
259 #endif /* defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC) */
261 #if defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG)
262 # define MNTTAB_OPT_LOG "log"
263 #endif /* defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG) */
265 #if defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME)
266 # define MNTTAB_OPT_LOG "noatime"
267 #endif /* defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME) */
269 #if defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME)
270 # define MNTTAB_OPT_LOG "nodevmtime"
271 #endif /* defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME) */
273 #if defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP)
274 # define MNTTAB_OPT_LOG "softdep"
275 #endif /* defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP) */
277 #if defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM)
278 # define MNTTAB_OPT_LOG "symperm"
279 #endif /* defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM) */
281 #if defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION)
282 # define MNTTAB_OPT_LOG "union"
283 #endif /* defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION) */
286 * Add missing MNTTAB_OPT_* options.
288 #ifndef MNTTAB_OPT_ACTIMEO
289 # define MNTTAB_OPT_ACTIMEO "actimeo"
290 #endif /* not MNTTAB_OPT_ACTIMEO */
292 #ifndef MNTTAB_OPT_INTR
293 # define MNTTAB_OPT_INTR "intr"
294 #endif /* not MNTTAB_OPT_INTR */
296 #ifndef MNTTAB_OPT_PORT
297 # define MNTTAB_OPT_PORT "port"
298 #endif /* not MNTTAB_OPT_PORT */
300 #ifndef MNTTAB_OPT_PUBLIC
301 # define MNTTAB_OPT_PUBLIC "public"
302 #endif /* not MNTTAB_OPT_PUBLIC */
304 #ifndef MNTTAB_OPT_RETRANS
305 # define MNTTAB_OPT_RETRANS "retrans"
306 #endif /* not MNTTAB_OPT_RETRANS */
308 #ifndef MNTTAB_OPT_RETRY
309 # define MNTTAB_OPT_RETRY "retry"
310 #endif /* not MNTTAB_OPT_RETRY */
312 #ifndef MNTTAB_OPT_RO
313 # define MNTTAB_OPT_RO "ro"
314 #endif /* not MNTTAB_OPT_RO */
316 #ifndef MNTTAB_OPT_RSIZE
317 # define MNTTAB_OPT_RSIZE "rsize"
318 #endif /* not MNTTAB_OPT_RSIZE */
320 #ifndef MNTTAB_OPT_RW
321 # define MNTTAB_OPT_RW "rw"
322 #endif /* not MNTTAB_OPT_RW */
324 #ifndef MNTTAB_OPT_TIMEO
325 # define MNTTAB_OPT_TIMEO "timeo"
326 #endif /* not MNTTAB_OPT_TIMEO */
328 #ifndef MNTTAB_OPT_WSIZE
329 # define MNTTAB_OPT_WSIZE "wsize"
330 #endif /* not MNTTAB_OPT_WSIZE */
332 /* next four are useful for pcfs mounts */
333 #ifndef MNTTAB_OPT_USER
334 # define MNTTAB_OPT_USER "user"
335 #endif /* not MNTTAB_OPT_USER */
336 #ifndef MNTTAB_OPT_GROUP
337 # define MNTTAB_OPT_GROUP "group"
338 #endif /* not MNTTAB_OPT_GROUP */
339 #ifndef MNTTAB_OPT_MASK
340 # define MNTTAB_OPT_MASK "mask"
341 #endif /* not MNTTAB_OPT_MASK */
342 #ifndef MNTTAB_OPT_DIRMASK
343 # define MNTTAB_OPT_DIRMASK "dirmask"
344 #endif /* not MNTTAB_OPT_DIRMASK */
346 /* useful for udf mounts */
347 #ifndef MNTTAB_OPT_USER
348 # define MNTTAB_OPT_USER "user"
349 #endif /* not MNTTAB_OPT_USER */
350 #ifndef MNTTAB_OPT_GROUP
351 # define MNTTAB_OPT_GROUP "group"
352 #endif /* not MNTTAB_OPT_GROUP */
353 #ifndef MNTTAB_OPT_GMTOFF
354 # define MNTTAB_OPT_GMTOFF "gmtoff"
355 #endif /* not MNTTAB_OPT_GMTOFF */
356 #ifndef MNTTAB_OPT_SESSIONNR
357 # define MNTTAB_OPT_SESSIONNR "sessionnr"
358 #endif /* not MNTTAB_OPT_SESSIONNR */
361 * Incomplete filesystem definitions (sunos4, irix6, solaris2)
363 #if defined(HAVE_FS_CDFS) && defined(MOUNT_TYPE_CDFS) && !defined(MNTTYPE_CDFS)
364 # define MNTTYPE_CDFS "hsfs"
365 #endif /* defined(HAVE_FS_CDFS) && defined(MOUNT_TYPE_CDFS) && !defined(MNTTYPE_CDFS) */
369 * Solaris has an HSFS filesystem, but does not define hsfs_args.
370 * XXX: the definition here for solaris is wrong, since under solaris,
371 * hsfs_args should be a single integer used as a bit-field for options.
372 * so this code has to be fixed later. -Erez.
375 char *fspec
; /* name of filesystem to mount */
378 # define cdfs_args_t struct hsfs_args
379 # define HAVE_CDFS_ARGS_T_NORRIP
380 #endif /* not cdfs_args_t */
383 * if does not define struct pc_args, assume integer bit-field (irix6)
385 #if defined(HAVE_FS_PCFS) && !defined(pcfs_args_t)
386 # define pcfs_args_t u_int
387 #endif /* defined(HAVE_FS_PCFS) && !defined(pcfs_args_t) */
390 * if does not define struct ufs_args, assume integer bit-field (linux)
392 #if defined(HAVE_FS_UFS) && !defined(ufs_args_t)
393 # define ufs_args_t u_int
394 #endif /* defined(HAVE_FS_UFS) && !defined(ufs_args_t) */
397 * if does not define struct udf_args, assume integer bit-field (linux)
399 #if defined(HAVE_FS_UDF) && !defined(udf_args_t)
400 # define udf_args_t u_int
401 #endif /* defined(HAVE_FS_UDF) && !defined(udf_args_t) */
404 * if does not define struct efs_args, assume integer bit-field (linux)
406 #if defined(HAVE_FS_EFS) && !defined(efs_args_t)
407 # define efs_args_t u_int
408 #endif /* defined(HAVE_FS_EFS) && !defined(efs_args_t) */
410 #if defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t)
411 # define tmpfs_args_t u_int
412 #endif /* defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t) */
415 * if does not define struct xfs_args, assume integer bit-field (linux)
417 #if defined(HAVE_FS_XFS) && !defined(xfs_args_t)
418 # define xfs_args_t u_int
419 #endif /* defined(HAVE_FS_XFS) && !defined(xfs_args_t) */
421 #if defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS)
422 # define MNTTYPE_AUTOFS "autofs"
423 #endif /* defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS) */
426 * If NFS3, then make sure that "proto" and "vers" mnttab options
430 # ifndef MNTTAB_OPT_VERS
431 # define MNTTAB_OPT_VERS "vers"
432 # endif /* not MNTTAB_OPT_VERS */
433 # ifndef MNTTAB_OPT_PROTO
434 # define MNTTAB_OPT_PROTO "proto"
435 # endif /* not MNTTAB_OPT_PROTO */
436 #endif /* not HAVE_FS_NFS3 */
439 * If loop device (header file) exists, define mount table option
441 #if defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP)
442 # define MNTTAB_OPT_LOOP "loop"
443 #endif /* defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP) */
446 * Define a dummy struct netconfig for non-TLI systems
448 #if !defined(HAVE_NETCONFIG_H) && !defined(HAVE_SYS_NETCONFIG_H)
452 #endif /* not HAVE_NETCONFIG_H and not HAVE_SYS_NETCONFIG_H */
454 /* some OSs don't define INADDR_NONE and assume it's unsigned -1 */
456 # define INADDR_NONE 0xffffffffU
457 #endif /* INADDR_NONE */
458 /* some OSs don't define INADDR_LOOPBACK */
459 #ifndef INADDR_LOOPBACK
460 # define INADDR_LOOPBACK 0x7f000001
461 #endif /* not INADDR_LOOPBACK */
463 #endif /* not _AM_COMPAT_H */