xref: /netbsd-src/external/bsd/am-utils/dist/include/am_compat.h (revision 4da6d876cd9670a0f55b4857d574006fa142db45)
1 /*	$NetBSD: am_compat.h,v 1.4 2015/01/17 17:46:31 christos Exp $	*/
2 
3 /*
4  * Copyright (c) 1997-2014 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. Neither the name of the University nor the names of its contributors
22  *    may be used to endorse or promote products derived from this software
23  *    without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35  * SUCH DAMAGE.
36  *
37  *
38  * File: am-utils/include/am_compat.h
39  *
40  */
41 
42 /*
43  *
44  * This file contains compatibility functions and macros, all of which
45  * should be auto-discovered, but for one reason or another (mostly
46  * brain-damage on the part of system designers and header files) they cannot.
47  *
48  * Each compatibility macro/function must include instructions on how/when
49  * it can be removed the am-utils code.
50  *
51  */
52 
53 #ifndef _AM_COMPAT_H
54 # define _AM_COMPAT_H
55 
56 /*
57  * incomplete mount options definitions (sunos4, irix6, linux, etc.)
58  */
59 
60 
61 /*
62  * Complete MNTTAB_OPT_* options based on MNT2_NFS_OPT_* mount options.
63  */
64 #if defined(MNT2_NFS_OPT_ACDIRMAX) && !defined(MNTTAB_OPT_ACDIRMAX)
65 # define MNTTAB_OPT_ACDIRMAX "acdirmax"
66 #endif /* defined(MNT2_NFS_OPT_ACDIRMAX) && !defined(MNTTAB_OPT_ACDIRMAX) */
67 
68 #if defined(MNT2_NFS_OPT_ACDIRMIN) && !defined(MNTTAB_OPT_ACDIRMIN)
69 # define MNTTAB_OPT_ACDIRMIN "acdirmin"
70 #endif /* defined(MNT2_NFS_OPT_ACDIRMIN) && !defined(MNTTAB_OPT_ACDIRMIN) */
71 
72 #if defined(MNT2_NFS_OPT_ACREGMAX) && !defined(MNTTAB_OPT_ACREGMAX)
73 # define MNTTAB_OPT_ACREGMAX "acregmax"
74 #endif /* defined(MNT2_NFS_OPT_ACREGMAX) && !defined(MNTTAB_OPT_ACREGMAX) */
75 
76 #if defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNTTAB_OPT_ACREGMIN)
77 # define MNTTAB_OPT_ACREGMIN "acregmin"
78 #endif /* defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNTTAB_OPT_ACREGMIN) */
79 
80 #if !defined(MNTTAB_OPT_IGNORE)
81 /* SunOS 4.1.x and others define "noauto" option, but not "auto" */
82 # if defined(MNTTAB_OPT_NOAUTO) && !defined(MNTTAB_OPT_AUTO)
83 #  define MNTTAB_OPT_AUTO "auto"
84 # endif /* defined(MNTTAB_OPT_NOAUTO) && !defined(MNTTAB_OPT_AUTO) */
85 #endif /* !defined(MNTTAB_OPT_IGNORE) */
86 
87 #if defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC)
88 # define MNTTAB_OPT_NOAC "noac"
89 #endif /* defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC) */
90 
91 #if defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL)
92 # define MNTTAB_OPT_NOACL "noacl"
93 #endif /* defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL) */
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  * Complete MNTTAB_OPT_* options based on MNT2_UDF_OPT_* mount options.
200  */
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) */
204 
205 /*
206  * Complete MNTTAB_OPT_* options based on MNT2_PCFS_OPT_* mount options.
207  */
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) */
217 
218 /*
219  * Complete MNTTAB_OPT_* options based on MNT2_GEN_OPT_* mount options.
220  */
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) */
224 
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) */
228 
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) */
232 
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) */
236 
237 /*
238  * Complete MNTTAB_OPT_* options and their inverse based on MNT2_GEN_OPT_*
239  * options.
240  */
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) */
244 
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) */
252 
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) */
256 
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) */
260 
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) */
264 
265 #if defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME)
266 # define MNTTAB_OPT_NOATIME "noatime"
267 #endif /* defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME) */
268 
269 #if defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME)
270 # define MNTTAB_OPT_NODEVMTIME "nodevmtime"
271 #endif /* defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME) */
272 
273 #if defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP)
274 # define MNTTAB_OPT_SOFTDEP "softdep"
275 #endif /* defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP) */
276 
277 #if defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM)
278 # define MNTTAB_OPT_SYMPERM "symperm"
279 #endif /* defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM) */
280 
281 #if defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION)
282 # define MNTTAB_OPT_UNION "union"
283 #endif /* defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION) */
284 
285 /*
286  * Add missing MNTTAB_OPT_* options.
287  */
288 #ifndef MNTTAB_OPT_ACTIMEO
289 # define MNTTAB_OPT_ACTIMEO "actimeo"
290 #endif /* not MNTTAB_OPT_ACTIMEO */
291 
292 #ifndef MNTTAB_OPT_INTR
293 # define MNTTAB_OPT_INTR "intr"
294 #endif /* not MNTTAB_OPT_INTR */
295 
296 #ifndef MNTTAB_OPT_PORT
297 # define MNTTAB_OPT_PORT "port"
298 #endif /* not MNTTAB_OPT_PORT */
299 
300 #ifndef MNTTAB_OPT_PUBLIC
301 # define MNTTAB_OPT_PUBLIC "public"
302 #endif /* not MNTTAB_OPT_PUBLIC */
303 
304 #ifndef MNTTAB_OPT_RETRANS
305 # define MNTTAB_OPT_RETRANS "retrans"
306 #endif /* not MNTTAB_OPT_RETRANS */
307 
308 #ifndef MNTTAB_OPT_RETRY
309 # define MNTTAB_OPT_RETRY "retry"
310 #endif /* not MNTTAB_OPT_RETRY */
311 
312 #ifndef MNTTAB_OPT_RO
313 # define MNTTAB_OPT_RO "ro"
314 #endif /* not MNTTAB_OPT_RO */
315 
316 #ifndef MNTTAB_OPT_RSIZE
317 # define MNTTAB_OPT_RSIZE "rsize"
318 #endif /* not MNTTAB_OPT_RSIZE */
319 
320 #ifndef MNTTAB_OPT_RW
321 # define MNTTAB_OPT_RW "rw"
322 #endif /* not MNTTAB_OPT_RW */
323 
324 #ifndef MNTTAB_OPT_TIMEO
325 # define MNTTAB_OPT_TIMEO "timeo"
326 #endif /* not MNTTAB_OPT_TIMEO */
327 
328 #ifndef MNTTAB_OPT_WSIZE
329 # define MNTTAB_OPT_WSIZE "wsize"
330 #endif /* not MNTTAB_OPT_WSIZE */
331 
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 */
345 
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 */
359 
360 /*
361  * Incomplete filesystem definitions (sunos4, irix6, solaris2)
362  */
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) */
366 
367 #ifndef cdfs_args_t
368 /*
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.
373  */
374 struct hsfs_args {
375         char *fspec;    /* name of filesystem to mount */
376         int norrip;
377 };
378 # define cdfs_args_t struct hsfs_args
379 # define HAVE_CDFS_ARGS_T_NORRIP
380 #endif /* not cdfs_args_t */
381 
382 /*
383  * if does not define struct pc_args, assume integer bit-field (irix6)
384  */
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) */
388 
389 /*
390  * if does not define struct ufs_args, assume integer bit-field (linux)
391  */
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) */
395 
396 /*
397  * if does not define struct udf_args, assume integer bit-field (linux)
398  */
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) */
402 
403 /*
404  * if does not define struct efs_args, assume integer bit-field (linux)
405  */
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) */
409 
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) */
413 
414 /*
415  * if does not define struct xfs_args, assume integer bit-field (linux)
416  */
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) */
420 #if defined(HAVE_FS_EXT) && !defined(ext_args_t)
421 # define ext_args_t u_int
422 #endif /* defined(HAVE_FS_EXT) && !defined(ext_args_t) */
423 
424 #if defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS)
425 # define MNTTYPE_AUTOFS "autofs"
426 #endif /* defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS) */
427 
428 /*
429  * If NFS3, then make sure that "proto" and "vers" mnttab options
430  * are available.
431  */
432 #ifdef HAVE_FS_NFS3
433 # ifndef MNTTAB_OPT_VERS
434 #  define MNTTAB_OPT_VERS "vers"
435 # endif /* not MNTTAB_OPT_VERS */
436 # ifndef MNTTAB_OPT_PROTO
437 #  define MNTTAB_OPT_PROTO "proto"
438 # endif /* not MNTTAB_OPT_PROTO */
439 #endif /* not HAVE_FS_NFS3 */
440 
441 /*
442  * If NFS4, then make sure that the "sec" mnttab option is available.
443  */
444 #ifdef HAVE_FS_NFS4
445 # ifndef MNTTAB_OPT_SEC
446 #  define MNTTAB_OPT_SEC "sec"
447 # endif /* not MNTTAB_OPT_SEC */
448 #endif /* not HAVE_FS_NFS4 */
449 /*
450  * If loop device (header file) exists, define mount table option
451  */
452 #if defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP)
453 # define MNTTAB_OPT_LOOP "loop"
454 #endif /* defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP) */
455 
456 /*
457  * Define a dummy struct netconfig for non-TLI systems
458  */
459 #if !defined(HAVE_NETCONFIG_H) && !defined(HAVE_SYS_NETCONFIG_H)
460 struct netconfig {
461   int dummy;
462 };
463 #endif /* not HAVE_NETCONFIG_H and not HAVE_SYS_NETCONFIG_H */
464 
465 /* some OSs don't define INADDR_NONE and assume it's unsigned -1 */
466 #ifndef INADDR_NONE
467 # define INADDR_NONE	0xffffffffU
468 #endif /* INADDR_NONE */
469 /* some OSs don't define INADDR_LOOPBACK */
470 #ifndef INADDR_LOOPBACK
471 # define INADDR_LOOPBACK	0x7f000001
472 #endif /* not INADDR_LOOPBACK */
473 
474 #endif /* not _AM_COMPAT_H */
475