Deleted Added
full compact
am_defs.h (41145) am_defs.h (42633)
1/*
2 * Copyright (c) 1997-1998 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
1/*
2 * Copyright (c) 1997-1998 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgement:
20 * must display the following acknowledgment:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * %W% (Berkeley) %G%
40 *
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * %W% (Berkeley) %G%
40 *
41 * $Id: am_defs.h,v 1.2 1998/08/27 07:33:23 obrien Exp $
41 * $Id: am_defs.h,v 1.3 1998/11/14 03:13:32 obrien Exp $
42 *
43 */
44
45/*
46 * Definitions that are not specific to the am-utils package, but
47 * are rather generic, and can be used elsewhere.
48 */
49
50#ifndef _AM_DEFS_H
51#define _AM_DEFS_H
52
53/*
54 * Actions to take if ANSI C.
55 */
56#if STDC_HEADERS
57# include <string.h>
58/* for function prototypes */
59# define P(x) x
60# define P_void void
61#else /* not STDC_HEADERS */
62/* empty function prototypes */
63# define P(x) ()
64# define P_void
65# ifndef HAVE_STRCHR
66# define strchr index
67# define strrchr rindex
68# endif /* not HAVE_STRCHR */
69char *strchr(), *strrchr(), *strdup();
70#endif /* not STDC_HEADERS */
71
72/*
73 * How to handle signals of any type
74 */
75#ifdef HAVE_SYS_WAIT_H
76# include <sys/wait.h>
77#endif /* HAVE_SYS_WAIT_H */
78#ifndef WEXITSTATUS
79# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
80#endif /* not WEXITSTATUS */
81#ifndef WIFEXITED
82# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
83#endif /* not WIFEXITED */
84
85/*
86 * Actions to take regarding <time.h> and <sys/time.h>.
87 */
88#if TIME_WITH_SYS_TIME
89# include <sys/time.h>
90# include <time.h>
91#else /* not TIME_WITH_SYS_TIME */
92# if HAVE_SYS_TIME_H
93# include <sys/time.h>
94# else /* not HAVE_SYS_TIME_H */
95# include <time.h>
96# endif /* not HAVE_SYS_TIME_H */
97#endif /* not TIME_WITH_SYS_TIME */
98
99/*
100 * Actions to take if <machine/endian.h> exists.
101 */
102#ifdef HAVE_MACHINE_ENDIAN_H
103# include <machine/endian.h>
104#endif /* HAVE_MACHINE_ENDIAN_H */
105
106/*
107 * Big-endian or little-endian?
108 */
109#ifdef WORDS_BIGENDIAN
110# define ARCH_ENDIAN "big"
111#else /* not WORDS_BIGENDIAN */
112# define ARCH_ENDIAN "little"
113#endif /* not WORDS_BIGENDIAN */
114
115/*
116 * Actions to take if HAVE_SYS_TYPES_H is defined.
117 */
118#if HAVE_SYS_TYPES_H
119# include <sys/types.h>
120#endif /* HAVE_SYS_TYPES_H */
121
122/*
123 * Actions to take if HAVE_UNISTD_H is defined.
124 */
125#if HAVE_UNISTD_H
126# include <unistd.h>
127#endif /* HAVE_UNISTD_H */
128
129/* after <unistd.h>, check if this is a POSIX.1 system */
130#ifdef _POSIX_VERSION
131/* Code for POSIX.1 systems. */
132#endif /* _POSIX_VERSION */
133
134/*
135 * Variable length argument lists.
136 * Must use only one of the two!
137 */
138#ifdef HAVE_STDARG_H
139# include <stdarg.h>
140/*
141 * On Solaris 2.6, <sys/varargs.h> is included in <sys/fs/autofs.h>
142 * So this ensures that only one is included.
143 */
144# ifndef _SYS_VARARGS_H
145# define _SYS_VARARGS_H
146# endif /* not _SYS_VARARGS_H */
147#else /* not HAVE_STDARG_H */
148# ifdef HAVE_VARARGS_H
149# include <varargs.h>
150# endif /* HAVE_VARARGS_H */
151#endif /* not HAVE_STDARG_H */
152
153/*
154 * Pick the right header file and macros for directory processing functions.
155 */
156#if HAVE_DIRENT_H
157# include <dirent.h>
158# define NAMLEN(dirent) strlen((dirent)->d_name)
159#else /* not HAVE_DIRENT_H */
160# define dirent direct
161# define NAMLEN(dirent) (dirent)->d_namlen
162# if HAVE_SYS_NDIR_H
163# include <sys/ndir.h>
164# endif /* HAVE_SYS_NDIR_H */
165# if HAVE_SYS_DIR_H
166# include <sys/dir.h>
167# endif /* HAVE_SYS_DIR_H */
168# if HAVE_NDIR_H
169# include <ndir.h>
170# endif /* HAVE_NDIR_H */
171#endif /* not HAVE_DIRENT_H */
172
173/*
174 * Actions to take if HAVE_FCNTL_H is defined.
175 */
176#if HAVE_FCNTL_H
177# include <fcntl.h>
178#endif /* HAVE_FCNTL_H */
179
180/*
181 * Actions to take if HAVE_MEMORY_H is defined.
182 */
183#if HAVE_MEMORY_H
184# include <memory.h>
185#endif /* HAVE_MEMORY_H */
186
187/*
188 * Actions to take if HAVE_SYS_FILE_H is defined.
189 */
190#if HAVE_SYS_FILE_H
191# include <sys/file.h>
192#endif /* HAVE_SYS_FILE_H */
193
194/*
195 * Actions to take if HAVE_SYS_IOCTL_H is defined.
196 */
197#if HAVE_SYS_IOCTL_H
198# include <sys/ioctl.h>
199#endif /* HAVE_SYS_IOCTL_H */
200
201/*
202 * Actions to take if HAVE_SYSLOG_H or HAVE_SYS_SYSLOG_H is defined.
203 */
204#ifdef HAVE_SYSLOG_H
205# include <syslog.h>
206#else /* not HAVE_SYSLOG_H */
207# if HAVE_SYS_SYSLOG_H
208# include <sys/syslog.h>
209# endif /* HAVE_SYS_SYSLOG_H */
210#endif /* HAVE_SYSLOG_H */
211
212/*
213 * Actions to take if <sys/param.h> exists.
214 */
215#ifdef HAVE_SYS_PARAM_H
216# include <sys/param.h>
217#endif /* HAVE_SYS_PARAM_H */
218
219/*
220 * Actions to take if <sys/socket.h> exists.
221 */
222#ifdef HAVE_SYS_SOCKET_H
223# include <sys/socket.h>
224#endif /* HAVE_SYS_SOCKET_H */
225
226/*
227 * Actions to take if <rpc/rpc.h> exists.
228 */
229#ifdef HAVE_RPC_RPC_H
230/*
231 * Turn on PORTMAP, so that additional header files would get included
232 * and the important definition for UDPMSGSIZE is included too.
233 */
234# ifndef PORTMAP
235# define PORTMAP
236# endif /* not PORTMAP */
237# include <rpc/rpc.h>
238# ifndef XDRPROC_T_TYPE
239typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...));
240# endif /* not XDRPROC_T_TYPE */
241#endif /* HAVE_RPC_RPC_H */
242
243/*
244 * Actions to take if <rpc/types.h> exists.
245 */
246#ifdef HAVE_RPC_TYPES_H
247# include <rpc/types.h>
248#endif /* HAVE_RPC_TYPES_H */
249
250/*
251 * Actions to take if <rpc/xdr.h> exists.
252 */
253/* Prevent multiple inclusion on Ultrix 4 */
254#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
255# include <rpc/xdr.h>
256#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
257
258/*
259 * Actions to take if <malloc.h> exists.
260 */
261#ifdef HAVE_MALLOC_H
262# include <malloc.h>
263#endif /* HAVE_MALLOC_H */
264
265/*
266 * Actions to take if <mntent.h> exists.
267 */
268#ifdef HAVE_MNTENT_H
269/* some systems need <stdio.h> before <mntent.h> is included */
270# ifdef HAVE_STDIO_H
271# include <stdio.h>
272# endif /* HAVE_STDIO_H */
273# include <mntent.h>
274#endif /* HAVE_MNTENT_H */
275
276/*
277 * Actions to take if <sys/errno.h> exists.
278 */
279#ifdef HAVE_SYS_ERRNO_H
280# include <sys/errno.h>
281extern int errno;
282#endif /* HAVE_SYS_ERRNO_H */
283
284/*
285 * Actions to take if <sys/fsid.h> exists.
286 */
287#ifdef HAVE_SYS_FSID_H
288# include <sys/fsid.h>
289#endif /* HAVE_SYS_FSID_H */
290
291/*
292 * Actions to take if <sys/utsname.h> exists.
293 */
294#ifdef HAVE_SYS_UTSNAME_H
295# include <sys/utsname.h>
296#endif /* HAVE_SYS_UTSNAME_H */
297
298/*
299 * Actions to take if <sys/mntent.h> exists.
300 */
301#ifdef HAVE_SYS_MNTENT_H
302# include <sys/mntent.h>
303#endif /* HAVE_SYS_MNTENT_H */
304
305/*
306 * Actions to take if <ndbm.h> exists.
307 * Should be included before <rpcsvc/yp_prot.h> because on some systems
308 * like Linux, it also defines "struct datum".
309 */
310#ifdef HAVE_NDBM_H
311# include <ndbm.h>
312# ifndef DATUM
313/* ensure that struct datum is not included again from <rpcsvc/yp_prot.h> */
314# define DATUM
315# endif /* not DATUM */
316#endif /* HAVE_NDBM_H */
317
318/*
319 * Actions to take if <net/errno.h> exists.
320 */
321#ifdef HAVE_NET_ERRNO_H
322# include <net/errno.h>
323#endif /* HAVE_NET_ERRNO_H */
324
325/*
326 * Actions to take if <net/if.h> exists.
327 */
328#ifdef HAVE_NET_ROUTE_H
329# include <net/route.h>
330#endif /* HAVE_NET_ROUTE_H */
331
332/*
333 * Actions to take if <net/if.h> exists.
334 */
335#ifdef HAVE_SYS_MBUF_H
336# include <sys/mbuf.h>
337/*
338 * OSF4 (DU-4.0) defines m_next and m_data also in <sys/mount> so I must
339 # undefine them here to avoid conflicts.
340 */
341# ifdef m_next
342# undef m_next
343# endif /* m_next */
344# ifdef m_data
345# undef m_data
346# endif /* m_data */
347/*
348 * AIX 3 defines MFREE and m_flags also in <sys/mount>.
349 */
350# ifdef m_flags
351# undef m_flags
352# endif /* m_flags */
353# ifdef MFREE
354# undef MFREE
355# endif /* MFREE */
356#endif /* HAVE_SYS_MBUF_H */
357
358/*
359 * Actions to take if <net/if.h> exists.
360 */
361#ifdef HAVE_NET_IF_H
362# include <net/if.h>
363#endif /* HAVE_NET_IF_H */
364
365/*
366 * Actions to take if <netdb.h> exists.
367 */
368#ifdef HAVE_NETDB_H
369# include <netdb.h>
370#endif /* HAVE_NETDB_H */
371
372/*
373 * Actions to take if <netdir.h> exists.
374 */
375#ifdef HAVE_NETDIR_H
376# include <netdir.h>
377#endif /* HAVE_NETDIR_H */
378
379/*
380 * Actions to take if <net/if_var.h> exists.
381 */
382#ifdef HAVE_NET_IF_VAR_H
383# include <net/if_var.h>
384#endif /* HAVE_NET_IF_VAR_H */
385
386/*
387 * Actions to take if <netinet/if_ether.h> exists.
388 */
389#ifdef HAVE_NETINET_IF_ETHER_H
390# include <netinet/if_ether.h>
391#endif /* HAVE_NETINET_IF_ETHER_H */
392
393/*
394 * Actions to take if <netinet/in.h> exists.
395 */
396#ifdef HAVE_NETINET_IN_H
397# include <netinet/in.h>
398#endif /* HAVE_NETINET_IN_H */
399
400/*
401 * Actions to take if <rpcsvc/yp_prot.h> exists.
402 */
403#ifdef HAVE_RPCSVC_YP_PROT_H
42 *
43 */
44
45/*
46 * Definitions that are not specific to the am-utils package, but
47 * are rather generic, and can be used elsewhere.
48 */
49
50#ifndef _AM_DEFS_H
51#define _AM_DEFS_H
52
53/*
54 * Actions to take if ANSI C.
55 */
56#if STDC_HEADERS
57# include <string.h>
58/* for function prototypes */
59# define P(x) x
60# define P_void void
61#else /* not STDC_HEADERS */
62/* empty function prototypes */
63# define P(x) ()
64# define P_void
65# ifndef HAVE_STRCHR
66# define strchr index
67# define strrchr rindex
68# endif /* not HAVE_STRCHR */
69char *strchr(), *strrchr(), *strdup();
70#endif /* not STDC_HEADERS */
71
72/*
73 * How to handle signals of any type
74 */
75#ifdef HAVE_SYS_WAIT_H
76# include <sys/wait.h>
77#endif /* HAVE_SYS_WAIT_H */
78#ifndef WEXITSTATUS
79# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
80#endif /* not WEXITSTATUS */
81#ifndef WIFEXITED
82# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
83#endif /* not WIFEXITED */
84
85/*
86 * Actions to take regarding <time.h> and <sys/time.h>.
87 */
88#if TIME_WITH_SYS_TIME
89# include <sys/time.h>
90# include <time.h>
91#else /* not TIME_WITH_SYS_TIME */
92# if HAVE_SYS_TIME_H
93# include <sys/time.h>
94# else /* not HAVE_SYS_TIME_H */
95# include <time.h>
96# endif /* not HAVE_SYS_TIME_H */
97#endif /* not TIME_WITH_SYS_TIME */
98
99/*
100 * Actions to take if <machine/endian.h> exists.
101 */
102#ifdef HAVE_MACHINE_ENDIAN_H
103# include <machine/endian.h>
104#endif /* HAVE_MACHINE_ENDIAN_H */
105
106/*
107 * Big-endian or little-endian?
108 */
109#ifdef WORDS_BIGENDIAN
110# define ARCH_ENDIAN "big"
111#else /* not WORDS_BIGENDIAN */
112# define ARCH_ENDIAN "little"
113#endif /* not WORDS_BIGENDIAN */
114
115/*
116 * Actions to take if HAVE_SYS_TYPES_H is defined.
117 */
118#if HAVE_SYS_TYPES_H
119# include <sys/types.h>
120#endif /* HAVE_SYS_TYPES_H */
121
122/*
123 * Actions to take if HAVE_UNISTD_H is defined.
124 */
125#if HAVE_UNISTD_H
126# include <unistd.h>
127#endif /* HAVE_UNISTD_H */
128
129/* after <unistd.h>, check if this is a POSIX.1 system */
130#ifdef _POSIX_VERSION
131/* Code for POSIX.1 systems. */
132#endif /* _POSIX_VERSION */
133
134/*
135 * Variable length argument lists.
136 * Must use only one of the two!
137 */
138#ifdef HAVE_STDARG_H
139# include <stdarg.h>
140/*
141 * On Solaris 2.6, <sys/varargs.h> is included in <sys/fs/autofs.h>
142 * So this ensures that only one is included.
143 */
144# ifndef _SYS_VARARGS_H
145# define _SYS_VARARGS_H
146# endif /* not _SYS_VARARGS_H */
147#else /* not HAVE_STDARG_H */
148# ifdef HAVE_VARARGS_H
149# include <varargs.h>
150# endif /* HAVE_VARARGS_H */
151#endif /* not HAVE_STDARG_H */
152
153/*
154 * Pick the right header file and macros for directory processing functions.
155 */
156#if HAVE_DIRENT_H
157# include <dirent.h>
158# define NAMLEN(dirent) strlen((dirent)->d_name)
159#else /* not HAVE_DIRENT_H */
160# define dirent direct
161# define NAMLEN(dirent) (dirent)->d_namlen
162# if HAVE_SYS_NDIR_H
163# include <sys/ndir.h>
164# endif /* HAVE_SYS_NDIR_H */
165# if HAVE_SYS_DIR_H
166# include <sys/dir.h>
167# endif /* HAVE_SYS_DIR_H */
168# if HAVE_NDIR_H
169# include <ndir.h>
170# endif /* HAVE_NDIR_H */
171#endif /* not HAVE_DIRENT_H */
172
173/*
174 * Actions to take if HAVE_FCNTL_H is defined.
175 */
176#if HAVE_FCNTL_H
177# include <fcntl.h>
178#endif /* HAVE_FCNTL_H */
179
180/*
181 * Actions to take if HAVE_MEMORY_H is defined.
182 */
183#if HAVE_MEMORY_H
184# include <memory.h>
185#endif /* HAVE_MEMORY_H */
186
187/*
188 * Actions to take if HAVE_SYS_FILE_H is defined.
189 */
190#if HAVE_SYS_FILE_H
191# include <sys/file.h>
192#endif /* HAVE_SYS_FILE_H */
193
194/*
195 * Actions to take if HAVE_SYS_IOCTL_H is defined.
196 */
197#if HAVE_SYS_IOCTL_H
198# include <sys/ioctl.h>
199#endif /* HAVE_SYS_IOCTL_H */
200
201/*
202 * Actions to take if HAVE_SYSLOG_H or HAVE_SYS_SYSLOG_H is defined.
203 */
204#ifdef HAVE_SYSLOG_H
205# include <syslog.h>
206#else /* not HAVE_SYSLOG_H */
207# if HAVE_SYS_SYSLOG_H
208# include <sys/syslog.h>
209# endif /* HAVE_SYS_SYSLOG_H */
210#endif /* HAVE_SYSLOG_H */
211
212/*
213 * Actions to take if <sys/param.h> exists.
214 */
215#ifdef HAVE_SYS_PARAM_H
216# include <sys/param.h>
217#endif /* HAVE_SYS_PARAM_H */
218
219/*
220 * Actions to take if <sys/socket.h> exists.
221 */
222#ifdef HAVE_SYS_SOCKET_H
223# include <sys/socket.h>
224#endif /* HAVE_SYS_SOCKET_H */
225
226/*
227 * Actions to take if <rpc/rpc.h> exists.
228 */
229#ifdef HAVE_RPC_RPC_H
230/*
231 * Turn on PORTMAP, so that additional header files would get included
232 * and the important definition for UDPMSGSIZE is included too.
233 */
234# ifndef PORTMAP
235# define PORTMAP
236# endif /* not PORTMAP */
237# include <rpc/rpc.h>
238# ifndef XDRPROC_T_TYPE
239typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...));
240# endif /* not XDRPROC_T_TYPE */
241#endif /* HAVE_RPC_RPC_H */
242
243/*
244 * Actions to take if <rpc/types.h> exists.
245 */
246#ifdef HAVE_RPC_TYPES_H
247# include <rpc/types.h>
248#endif /* HAVE_RPC_TYPES_H */
249
250/*
251 * Actions to take if <rpc/xdr.h> exists.
252 */
253/* Prevent multiple inclusion on Ultrix 4 */
254#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
255# include <rpc/xdr.h>
256#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
257
258/*
259 * Actions to take if <malloc.h> exists.
260 */
261#ifdef HAVE_MALLOC_H
262# include <malloc.h>
263#endif /* HAVE_MALLOC_H */
264
265/*
266 * Actions to take if <mntent.h> exists.
267 */
268#ifdef HAVE_MNTENT_H
269/* some systems need <stdio.h> before <mntent.h> is included */
270# ifdef HAVE_STDIO_H
271# include <stdio.h>
272# endif /* HAVE_STDIO_H */
273# include <mntent.h>
274#endif /* HAVE_MNTENT_H */
275
276/*
277 * Actions to take if <sys/errno.h> exists.
278 */
279#ifdef HAVE_SYS_ERRNO_H
280# include <sys/errno.h>
281extern int errno;
282#endif /* HAVE_SYS_ERRNO_H */
283
284/*
285 * Actions to take if <sys/fsid.h> exists.
286 */
287#ifdef HAVE_SYS_FSID_H
288# include <sys/fsid.h>
289#endif /* HAVE_SYS_FSID_H */
290
291/*
292 * Actions to take if <sys/utsname.h> exists.
293 */
294#ifdef HAVE_SYS_UTSNAME_H
295# include <sys/utsname.h>
296#endif /* HAVE_SYS_UTSNAME_H */
297
298/*
299 * Actions to take if <sys/mntent.h> exists.
300 */
301#ifdef HAVE_SYS_MNTENT_H
302# include <sys/mntent.h>
303#endif /* HAVE_SYS_MNTENT_H */
304
305/*
306 * Actions to take if <ndbm.h> exists.
307 * Should be included before <rpcsvc/yp_prot.h> because on some systems
308 * like Linux, it also defines "struct datum".
309 */
310#ifdef HAVE_NDBM_H
311# include <ndbm.h>
312# ifndef DATUM
313/* ensure that struct datum is not included again from <rpcsvc/yp_prot.h> */
314# define DATUM
315# endif /* not DATUM */
316#endif /* HAVE_NDBM_H */
317
318/*
319 * Actions to take if <net/errno.h> exists.
320 */
321#ifdef HAVE_NET_ERRNO_H
322# include <net/errno.h>
323#endif /* HAVE_NET_ERRNO_H */
324
325/*
326 * Actions to take if <net/if.h> exists.
327 */
328#ifdef HAVE_NET_ROUTE_H
329# include <net/route.h>
330#endif /* HAVE_NET_ROUTE_H */
331
332/*
333 * Actions to take if <net/if.h> exists.
334 */
335#ifdef HAVE_SYS_MBUF_H
336# include <sys/mbuf.h>
337/*
338 * OSF4 (DU-4.0) defines m_next and m_data also in <sys/mount> so I must
339 # undefine them here to avoid conflicts.
340 */
341# ifdef m_next
342# undef m_next
343# endif /* m_next */
344# ifdef m_data
345# undef m_data
346# endif /* m_data */
347/*
348 * AIX 3 defines MFREE and m_flags also in <sys/mount>.
349 */
350# ifdef m_flags
351# undef m_flags
352# endif /* m_flags */
353# ifdef MFREE
354# undef MFREE
355# endif /* MFREE */
356#endif /* HAVE_SYS_MBUF_H */
357
358/*
359 * Actions to take if <net/if.h> exists.
360 */
361#ifdef HAVE_NET_IF_H
362# include <net/if.h>
363#endif /* HAVE_NET_IF_H */
364
365/*
366 * Actions to take if <netdb.h> exists.
367 */
368#ifdef HAVE_NETDB_H
369# include <netdb.h>
370#endif /* HAVE_NETDB_H */
371
372/*
373 * Actions to take if <netdir.h> exists.
374 */
375#ifdef HAVE_NETDIR_H
376# include <netdir.h>
377#endif /* HAVE_NETDIR_H */
378
379/*
380 * Actions to take if <net/if_var.h> exists.
381 */
382#ifdef HAVE_NET_IF_VAR_H
383# include <net/if_var.h>
384#endif /* HAVE_NET_IF_VAR_H */
385
386/*
387 * Actions to take if <netinet/if_ether.h> exists.
388 */
389#ifdef HAVE_NETINET_IF_ETHER_H
390# include <netinet/if_ether.h>
391#endif /* HAVE_NETINET_IF_ETHER_H */
392
393/*
394 * Actions to take if <netinet/in.h> exists.
395 */
396#ifdef HAVE_NETINET_IN_H
397# include <netinet/in.h>
398#endif /* HAVE_NETINET_IN_H */
399
400/*
401 * Actions to take if <rpcsvc/yp_prot.h> exists.
402 */
403#ifdef HAVE_RPCSVC_YP_PROT_H
404# ifdef HAVE_BAD_HEADERS
405/* avoid circular dependency in aix 4.3 with <rpcsvc/ypclnt.h> */
406struct ypall_callback;
407# endif /* HAVE_BAD_HEADERS */
404# include <rpcsvc/yp_prot.h>
405#endif /* HAVE_RPCSVC_YP_PROT_H */
406
407/*
408 * Actions to take if <rpcsvc/ypclnt.h> exists.
409 */
410#ifdef HAVE_RPCSVC_YPCLNT_H
411# include <rpcsvc/ypclnt.h>
412#endif /* HAVE_RPCSVC_YPCLNT_H */
413
414/*
415 * Actions to take if <sys/ucred.h> exists.
416 */
417#ifdef HAVE_SYS_UCRED_H
418# include <sys/ucred.h>
419#endif /* HAVE_SYS_UCRED_H */
420
421
422/*
423 * Actions to take if <sys/mount.h> exists.
424 */
425#ifdef HAVE_SYS_MOUNT_H
426/*
427 * Some operating systems must define these variables to get
428 * NFS and other definitions included.
429 */
430# ifndef NFSCLIENT
431# define NFSCLIENT
432# endif /* not NFSCLIENT */
433# ifndef NFS
434# define NFS
435# endif /* not NFS */
436# ifndef PCFS
437# define PCFS
438# endif /* not PCFS */
439# ifndef LOFS
440# define LOFS
441# endif /* not LOFS */
442# ifndef RFS
443# define RFS
444# endif /* not RFS */
445# ifndef MSDOSFS
446# define MSDOSFS
447# endif /* not MSDOSFS */
448# ifndef MFS
449# define MFS
450# endif /* not MFS */
451# ifndef CD9660
452# define CD9660
453# endif /* not CD9660 */
454# ifndef NFS
455# define NFS
456# endif /* not NFS */
457# include <sys/mount.h>
458#endif /* HAVE_SYS_MOUNT_H */
459
460#ifdef HAVE_SYS_VMOUNT_H
461# include <sys/vmount.h>
462#endif /* HAVE_SYS_VMOUNT_H */
463
464/*
465 * Actions to take if <linux/fs.h> exists.
466 */
467#ifdef HAVE_LINUX_FS_H
468/*
469 * There's a conflict of definitions on redhat alpha linux between
470 * <netinet/in.h> and <linux/fs.h>.
471 */
472# ifdef HAVE_SOCKETBITS_H
473/* conflicts with <socketbits.h> */
474# define _LINUX_SOCKET_H
475# undef BLKFLSBUF
476# undef BLKGETSIZE
477# undef BLKRAGET
478# undef BLKRASET
479# undef BLKROGET
480# undef BLKROSET
481# undef BLKRRPART
482# undef MS_MGC_VAL
483# undef MS_RMT_MASK
484/* conflicts with <waitflags.h> */
485# undef WNOHANG
486# undef WUNTRACED
487/* conflicts with <statfsbuf.h> */
488# define _SYS_STATFS_H
489# endif /* HAVE_SOCKETBITS_H */
490# ifdef HAVE_LINUX_POSIX_TYPES_H
491# include <linux/posix_types.h>
492# endif /* HAVE_LINUX_POSIX_TYPES_H */
493# ifndef _LINUX_BYTEORDER_GENERIC_H
494# define _LINUX_BYTEORDER_GENERIC_H
495# endif /* _LINUX_BYTEORDER_GENERIC_H */
496/* conflicts with <sys/mount.h> in 2.1 kernels */
497# ifdef _SYS_MOUNT_H
498# ifdef BLOCK_SIZE
499# undef BLOCK_SIZE
500# endif /* BLOCK_SIZE */
501# endif /* _SYS_MOUNT_H */
502# include <linux/fs.h>
503#endif /* HAVE_LINUX_FS_H */
504
505#ifdef HAVE_CDFS_CDFS_MOUNT_H
506# include <cdfs/cdfs_mount.h>
507#endif /* HAVE_CDFS_CDFS_MOUNT_H */
508
509#ifdef HAVE_CDFS_CDFSMOUNT_H
510# include <cdfs/cdfsmount.h>
511#endif /* HAVE_CDFS_CDFSMOUNT_H */
512
513/*
514 * Actions to take if <linux/auto_fs.h> exists.
515 */
516#ifdef HAVE_LINUX_AUTO_FS_H
517# include <linux/auto_fs.h>
518#endif /* HAVE_LINUX_AUTO_FS_H */
519
520/*
521 * Actions to take if <sys/fs/autofs.h> exists.
522 */
523#ifdef HAVE_SYS_FS_AUTOFS_H
524# include <sys/fs/autofs.h>
525#endif /* HAVE_SYS_FS_AUTOFS_H */
526
527/*
528 * Actions to take if <sys/fs/autofs_prot.h> exists.
529 */
530#ifdef HAVE_SYS_FS_AUTOFS_PROT_H
531# include <sys/fs/autofs_prot.h>
532#endif /* HAVE_SYS_FS_AUTOFS_PROT_H */
533
534/*
535 * NFS PROTOCOL HEADER FILES:
536 */
537
538/*
539 * Actions to take if <nfs/export.h> exists.
540 */
541#ifdef HAVE_NFS_EXPORT_H
542# include <nfs/export.h>
543#endif /* HAVE_NFS_EXPORT_H */
544
545/****************************************************************************
546 ** IMPORTANT!!! **
547 ** We always include am-util's amu_nfs_prot.h. **
548 ** That is actually defined in "conf/nfs_prot/nfs_prot_${host_os_name}.h" **
549 ****************************************************************************/
550#include <amu_nfs_prot.h>
551
552/*
553 * DO NOT INCLUDE THESE FILES:
554 * They conflicts with other NFS headers and are generally not needed.
555 */
556#ifdef DO_NOT_INCLUDE
557# ifdef HAVE_NFS_NFS_CLNT_H
558# include <nfs/nfs_clnt.h>
559# endif /* HAVE_NFS_NFS_CLNT_H */
560# ifdef HAVE_LINUX_NFS_H
561# include <linux/nfs.h>
562# endif /* HAVE_LINUX_NFS_H */
563#endif /* DO NOT INCLUDE */
564
565/*
566 * Actions to take if one of the nfs headers exists.
567 */
568#ifdef HAVE_NFS_NFS_GFS_H
569# include <nfs/nfs_gfs.h>
570#endif /* HAVE_NFS_NFS_GFS_H */
571#ifdef HAVE_NFS_MOUNT_H
572# include <nfs/mount.h>
573#endif /* HAVE_NFS_MOUNT_H */
574#ifdef HAVE_NFS_NFS_MOUNT_H_off
575/* broken on netxtep3 (includes non-existing headers) */
576# include <nfs/nfs_mount.h>
577#endif /* HAVE_NFS_NFS_MOUNT_H */
578#ifdef HAVE_NFS_PATHCONF_H
579# include <nfs/pathconf.h>
580#endif /* HAVE_NFS_PATHCONF_H */
581#ifdef HAVE_SYS_FS_NFS_MOUNT_H
582# include <sys/fs/nfs/mount.h>
583#endif /* HAVE_SYS_FS_NFS_MOUNT_H */
584#ifdef HAVE_SYS_FS_NFS_NFS_CLNT_H
585# include <sys/fs/nfs/nfs_clnt.h>
586#endif /* HAVE_SYS_FS_NFS_NFS_CLNT_H */
587#ifdef HAVE_SYS_FS_NFS_CLNT_H
588# include <sys/fs/nfs_clnt.h>
589#endif /* HAVE_SYS_FS_NFS_CLNT_H */
590#ifdef HAVE_LINUX_NFS_MOUNT_H
591# include <linux/nfs_mount.h>
592#endif /* HAVE_LINUX_NFS_MOUNT_H */
593
594/*
595 * Actions to take if <pwd.h> exists.
596 */
597#ifdef HAVE_PWD_H
598# include <pwd.h>
599#endif /* HAVE_PWD_H */
600
601/*
602 * Actions to take if <hesiod.h> exists.
603 */
604#ifdef HAVE_HESIOD_H
605# include <hesiod.h>
606#endif /* HAVE_HESIOD_H */
607
608/*
609 * Actions to take if <lber.h> exists.
610 * This header file is required before <ldap.h> can be included.
611 */
612#ifdef HAVE_LBER_H
613# include <lber.h>
614#endif /* HAVE_LBER_H */
615
616/*
617 * Actions to take if <ldap.h> exists.
618 */
619#ifdef HAVE_LDAP_H
620# include <ldap.h>
621#endif /* HAVE_LDAP_H */
622
623/*
624 * Actions to take if <arpa/nameser.h> exists.
625 * Should be included before <resolv.h>.
626 */
627#ifdef HAVE_ARPA_NAMESER_H
628# ifdef NOERROR
629# undef NOERROR
630# endif /* NOERROR */
631/*
632 * Conflicts with <sys/tpicommon.h> which is included from <sys/tiuser.h>
633 * on Solaris 2.6 systems. So undefine it first.
634 */
635# ifdef T_UNSPEC
636# undef T_UNSPEC
637# endif /* T_UNSPEC */
638# include <arpa/nameser.h>
639#endif /* HAVE_ARPA_NAMESER_H */
640
641/*
642 * Actions to take if <arpa/inet.h> exists.
643 */
644#ifdef HAVE_ARPA_INET_H
408# include <rpcsvc/yp_prot.h>
409#endif /* HAVE_RPCSVC_YP_PROT_H */
410
411/*
412 * Actions to take if <rpcsvc/ypclnt.h> exists.
413 */
414#ifdef HAVE_RPCSVC_YPCLNT_H
415# include <rpcsvc/ypclnt.h>
416#endif /* HAVE_RPCSVC_YPCLNT_H */
417
418/*
419 * Actions to take if <sys/ucred.h> exists.
420 */
421#ifdef HAVE_SYS_UCRED_H
422# include <sys/ucred.h>
423#endif /* HAVE_SYS_UCRED_H */
424
425
426/*
427 * Actions to take if <sys/mount.h> exists.
428 */
429#ifdef HAVE_SYS_MOUNT_H
430/*
431 * Some operating systems must define these variables to get
432 * NFS and other definitions included.
433 */
434# ifndef NFSCLIENT
435# define NFSCLIENT
436# endif /* not NFSCLIENT */
437# ifndef NFS
438# define NFS
439# endif /* not NFS */
440# ifndef PCFS
441# define PCFS
442# endif /* not PCFS */
443# ifndef LOFS
444# define LOFS
445# endif /* not LOFS */
446# ifndef RFS
447# define RFS
448# endif /* not RFS */
449# ifndef MSDOSFS
450# define MSDOSFS
451# endif /* not MSDOSFS */
452# ifndef MFS
453# define MFS
454# endif /* not MFS */
455# ifndef CD9660
456# define CD9660
457# endif /* not CD9660 */
458# ifndef NFS
459# define NFS
460# endif /* not NFS */
461# include <sys/mount.h>
462#endif /* HAVE_SYS_MOUNT_H */
463
464#ifdef HAVE_SYS_VMOUNT_H
465# include <sys/vmount.h>
466#endif /* HAVE_SYS_VMOUNT_H */
467
468/*
469 * Actions to take if <linux/fs.h> exists.
470 */
471#ifdef HAVE_LINUX_FS_H
472/*
473 * There's a conflict of definitions on redhat alpha linux between
474 * <netinet/in.h> and <linux/fs.h>.
475 */
476# ifdef HAVE_SOCKETBITS_H
477/* conflicts with <socketbits.h> */
478# define _LINUX_SOCKET_H
479# undef BLKFLSBUF
480# undef BLKGETSIZE
481# undef BLKRAGET
482# undef BLKRASET
483# undef BLKROGET
484# undef BLKROSET
485# undef BLKRRPART
486# undef MS_MGC_VAL
487# undef MS_RMT_MASK
488/* conflicts with <waitflags.h> */
489# undef WNOHANG
490# undef WUNTRACED
491/* conflicts with <statfsbuf.h> */
492# define _SYS_STATFS_H
493# endif /* HAVE_SOCKETBITS_H */
494# ifdef HAVE_LINUX_POSIX_TYPES_H
495# include <linux/posix_types.h>
496# endif /* HAVE_LINUX_POSIX_TYPES_H */
497# ifndef _LINUX_BYTEORDER_GENERIC_H
498# define _LINUX_BYTEORDER_GENERIC_H
499# endif /* _LINUX_BYTEORDER_GENERIC_H */
500/* conflicts with <sys/mount.h> in 2.1 kernels */
501# ifdef _SYS_MOUNT_H
502# ifdef BLOCK_SIZE
503# undef BLOCK_SIZE
504# endif /* BLOCK_SIZE */
505# endif /* _SYS_MOUNT_H */
506# include <linux/fs.h>
507#endif /* HAVE_LINUX_FS_H */
508
509#ifdef HAVE_CDFS_CDFS_MOUNT_H
510# include <cdfs/cdfs_mount.h>
511#endif /* HAVE_CDFS_CDFS_MOUNT_H */
512
513#ifdef HAVE_CDFS_CDFSMOUNT_H
514# include <cdfs/cdfsmount.h>
515#endif /* HAVE_CDFS_CDFSMOUNT_H */
516
517/*
518 * Actions to take if <linux/auto_fs.h> exists.
519 */
520#ifdef HAVE_LINUX_AUTO_FS_H
521# include <linux/auto_fs.h>
522#endif /* HAVE_LINUX_AUTO_FS_H */
523
524/*
525 * Actions to take if <sys/fs/autofs.h> exists.
526 */
527#ifdef HAVE_SYS_FS_AUTOFS_H
528# include <sys/fs/autofs.h>
529#endif /* HAVE_SYS_FS_AUTOFS_H */
530
531/*
532 * Actions to take if <sys/fs/autofs_prot.h> exists.
533 */
534#ifdef HAVE_SYS_FS_AUTOFS_PROT_H
535# include <sys/fs/autofs_prot.h>
536#endif /* HAVE_SYS_FS_AUTOFS_PROT_H */
537
538/*
539 * NFS PROTOCOL HEADER FILES:
540 */
541
542/*
543 * Actions to take if <nfs/export.h> exists.
544 */
545#ifdef HAVE_NFS_EXPORT_H
546# include <nfs/export.h>
547#endif /* HAVE_NFS_EXPORT_H */
548
549/****************************************************************************
550 ** IMPORTANT!!! **
551 ** We always include am-util's amu_nfs_prot.h. **
552 ** That is actually defined in "conf/nfs_prot/nfs_prot_${host_os_name}.h" **
553 ****************************************************************************/
554#include <amu_nfs_prot.h>
555
556/*
557 * DO NOT INCLUDE THESE FILES:
558 * They conflicts with other NFS headers and are generally not needed.
559 */
560#ifdef DO_NOT_INCLUDE
561# ifdef HAVE_NFS_NFS_CLNT_H
562# include <nfs/nfs_clnt.h>
563# endif /* HAVE_NFS_NFS_CLNT_H */
564# ifdef HAVE_LINUX_NFS_H
565# include <linux/nfs.h>
566# endif /* HAVE_LINUX_NFS_H */
567#endif /* DO NOT INCLUDE */
568
569/*
570 * Actions to take if one of the nfs headers exists.
571 */
572#ifdef HAVE_NFS_NFS_GFS_H
573# include <nfs/nfs_gfs.h>
574#endif /* HAVE_NFS_NFS_GFS_H */
575#ifdef HAVE_NFS_MOUNT_H
576# include <nfs/mount.h>
577#endif /* HAVE_NFS_MOUNT_H */
578#ifdef HAVE_NFS_NFS_MOUNT_H_off
579/* broken on netxtep3 (includes non-existing headers) */
580# include <nfs/nfs_mount.h>
581#endif /* HAVE_NFS_NFS_MOUNT_H */
582#ifdef HAVE_NFS_PATHCONF_H
583# include <nfs/pathconf.h>
584#endif /* HAVE_NFS_PATHCONF_H */
585#ifdef HAVE_SYS_FS_NFS_MOUNT_H
586# include <sys/fs/nfs/mount.h>
587#endif /* HAVE_SYS_FS_NFS_MOUNT_H */
588#ifdef HAVE_SYS_FS_NFS_NFS_CLNT_H
589# include <sys/fs/nfs/nfs_clnt.h>
590#endif /* HAVE_SYS_FS_NFS_NFS_CLNT_H */
591#ifdef HAVE_SYS_FS_NFS_CLNT_H
592# include <sys/fs/nfs_clnt.h>
593#endif /* HAVE_SYS_FS_NFS_CLNT_H */
594#ifdef HAVE_LINUX_NFS_MOUNT_H
595# include <linux/nfs_mount.h>
596#endif /* HAVE_LINUX_NFS_MOUNT_H */
597
598/*
599 * Actions to take if <pwd.h> exists.
600 */
601#ifdef HAVE_PWD_H
602# include <pwd.h>
603#endif /* HAVE_PWD_H */
604
605/*
606 * Actions to take if <hesiod.h> exists.
607 */
608#ifdef HAVE_HESIOD_H
609# include <hesiod.h>
610#endif /* HAVE_HESIOD_H */
611
612/*
613 * Actions to take if <lber.h> exists.
614 * This header file is required before <ldap.h> can be included.
615 */
616#ifdef HAVE_LBER_H
617# include <lber.h>
618#endif /* HAVE_LBER_H */
619
620/*
621 * Actions to take if <ldap.h> exists.
622 */
623#ifdef HAVE_LDAP_H
624# include <ldap.h>
625#endif /* HAVE_LDAP_H */
626
627/*
628 * Actions to take if <arpa/nameser.h> exists.
629 * Should be included before <resolv.h>.
630 */
631#ifdef HAVE_ARPA_NAMESER_H
632# ifdef NOERROR
633# undef NOERROR
634# endif /* NOERROR */
635/*
636 * Conflicts with <sys/tpicommon.h> which is included from <sys/tiuser.h>
637 * on Solaris 2.6 systems. So undefine it first.
638 */
639# ifdef T_UNSPEC
640# undef T_UNSPEC
641# endif /* T_UNSPEC */
642# include <arpa/nameser.h>
643#endif /* HAVE_ARPA_NAMESER_H */
644
645/*
646 * Actions to take if <arpa/inet.h> exists.
647 */
648#ifdef HAVE_ARPA_INET_H
649# ifdef HAVE_BAD_HEADERS
650/* aix 4.3: avoid including <net/if_dl.h> */
651struct sockaddr_dl;
652# endif /* HAVE_BAD_HEADERS */
645# include <arpa/inet.h>
646#endif /* HAVE_ARPA_INET_H */
647
648/*
649 * Actions to take if <resolv.h> exists.
650 */
651#ifdef HAVE_RESOLV_H
652# include <resolv.h>
653#endif /* HAVE_RESOLV_H */
654
655/*
656 * Actions to take if <sys/uio.h> exists.
657 */
658#ifdef HAVE_SYS_UIO_H
659# include <sys/uio.h>
660#endif /* HAVE_SYS_UIO_H */
661
662/*
663 * Actions to take if <sys/fs/cachefs_fs.h> exists.
664 */
665#ifdef HAVE_SYS_FS_CACHEFS_FS_H
666# include <sys/fs/cachefs_fs.h>
667#endif /* HAVE_SYS_FS_CACHEFS_FS_H */
668
669/*
670 * Actions to take if <sys/fs/pc_fs.h> exists.
671 */
672#ifdef HAVE_SYS_FS_PC_FS_H
673# include <sys/fs/pc_fs.h>
674#endif /* HAVE_SYS_FS_PC_FS_H */
675
676/*
677 * Actions to take if <msdosfs/msdosfsmount.h> exists.
678 */
679#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H
680# include <msdosfs/msdosfsmount.h>
681#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */
682
683/*
684 * Actions to take if <sys/fs/tmp.h> exists.
685 */
686#ifdef HAVE_SYS_FS_TMP_H
687# include <sys/fs/tmp.h>
688#endif /* HAVE_SYS_FS_TMP_H */
689
690/*
691 * Actions to take if <sys/fs/ufs_mount.h> exists.
692 */
693#ifdef HAVE_SYS_FS_UFS_MOUNT_H
694# include <sys/fs/ufs_mount.h>
695#endif /* HAVE_SYS_FS_UFS_MOUNT_H */
696
697/*
698 * Actions to take if <sys/fs/efs_clnt.h> exists.
699 */
700#ifdef HAVE_SYS_FS_EFS_CLNT_H
701# include <sys/fs/efs_clnt.h>
702#endif /* HAVE_SYS_FS_EFS_CLNT_H */
703
704/*
705 * Actions to take if <sys/fs/xfs_clnt.h> exists.
706 */
707#ifdef HAVE_SYS_FS_XFS_CLNT_H
708# include <sys/fs/xfs_clnt.h>
709#endif /* HAVE_SYS_FS_XFS_CLNT_H */
710
711/*
712 * Actions to take if <assert.h> exists.
713 */
714#ifdef HAVE_ASSERT_H
715# include <assert.h>
716#endif /* HAVE_ASSERT_H */
717
718/*
719 * Actions to take if <cfs.h> exists.
720 */
721#ifdef HAVE_CFS_H
722# include <cfs.h>
723#endif /* HAVE_CFS_H */
724
725/*
726 * Actions to take if <cluster.h> exists.
727 */
728#ifdef HAVE_CLUSTER_H
729# include <cluster.h>
730#endif /* HAVE_CLUSTER_H */
731
732/*
733 * Actions to take if <ctype.h> exists.
734 */
735#ifdef HAVE_CTYPE_H
736# include <ctype.h>
737#endif /* HAVE_CTYPE_H */
738
739/*
740 * Actions to take if <errno.h> exists.
741 */
742#ifdef HAVE_ERRNO_H
743# include <errno.h>
744#endif /* HAVE_ERRNO_H */
745
746/*
747 * Actions to take if <grp.h> exists.
748 */
749#ifdef HAVE_GRP_H
750# include <grp.h>
751#endif /* HAVE_GRP_H */
752
753/*
754 * Actions to take if <hsfs/hsfs.h> exists.
755 */
756#ifdef HAVE_HSFS_HSFS_H
757# include <hsfs/hsfs.h>
758#endif /* HAVE_HSFS_HSFS_H */
759
760/*
761 * Actions to take if <cdfs/cdfsmount.h> exists.
762 */
763#ifdef HAVE_CDFS_CDFSMOUNT_H
764# include <cdfs/cdfsmount.h>
765#endif /* HAVE_CDFS_CDFSMOUNT_H */
766
767/*
768 * Actions to take if <isofs/cd9660/cd9660_mount.h> exists.
769 */
770#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H
771# include <isofs/cd9660/cd9660_mount.h>
772#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
773
774/*
775 * Actions to take if <mount.h> exists.
776 */
777#ifdef HAVE_MOUNT_H
778# include <mount.h>
779#endif /* HAVE_MOUNT_H */
780
781/*
782 * Actions to take if <nsswitch.h> exists.
783 */
784#ifdef HAVE_NSSWITCH_H
785# include <nsswitch.h>
786#endif /* HAVE_NSSWITCH_H */
787
788/*
789 * Actions to take if <rpc/auth_des.h> exists.
790 */
791#ifdef HAVE_RPC_AUTH_DES_H
792# include <rpc/auth_des.h>
793#endif /* HAVE_RPC_AUTH_DES_H */
794
795/*
796 * Actions to take if <rpc/pmap_clnt.h> exists.
797 */
798#ifdef HAVE_RPC_PMAP_CLNT_H
799# include <rpc/pmap_clnt.h>
800#endif /* HAVE_RPC_PMAP_CLNT_H */
801
802/*
803 * Actions to take if <rpc/pmap_prot.h> exists.
804 */
805#ifdef HAVE_RPC_PMAP_PROT_H
806# include <rpc/pmap_prot.h>
807#endif /* HAVE_RPC_PMAP_PROT_H */
808
809
810/*
811 * Actions to take if <rpcsvc/mount.h> exists.
812 * AIX does not protect against this file doubly included,
813 * so I have to do my own protection here.
814 */
815#ifdef COMMENT_OUT
816#ifdef HAVE_RPCSVC_MOUNT_H
817# ifndef _RPCSVC_MOUNT_H
818# include <rpcsvc/mount.h>
819# endif /* not _RPCSVC_MOUNT_H */
820#endif /* HAVE_RPCSVC_MOUNT_H */
821#endif
822# include "mount.h"
823
824/*
825 * Actions to take if <rpcsvc/nis.h> exists.
826 */
827#ifdef HAVE_RPCSVC_NIS_H
828# include <rpcsvc/nis.h>
829#endif /* HAVE_RPCSVC_NIS_H */
830
831/*
832 * Actions to take if <setjmp.h> exists.
833 */
834#ifdef HAVE_SETJMP_H
835# include <setjmp.h>
836#endif /* HAVE_SETJMP_H */
837
838/*
839 * Actions to take if <signal.h> exists.
840 */
841#ifdef HAVE_SIGNAL_H
842# include <signal.h>
843#endif /* HAVE_SIGNAL_H */
844
845/*
846 * Actions to take if <string.h> exists.
847 */
848#ifdef HAVE_STRING_H
849# include <string.h>
850#endif /* HAVE_STRING_H */
851
852/*
853 * Actions to take if <strings.h> exists.
854 */
855#ifdef HAVE_STRINGS_H
856# include <strings.h>
857#endif /* HAVE_STRINGS_H */
858
859/*
860 * Actions to take if <sys/config.h> exists.
861 */
862#ifdef HAVE_SYS_CONFIG_H
863# include <sys/config.h>
864#endif /* HAVE_SYS_CONFIG_H */
865
866/*
867 * Actions to take if <sys/dg_mount.h> exists.
868 */
869#ifdef HAVE_SYS_DG_MOUNT_H
870# include <sys/dg_mount.h>
871#endif /* HAVE_SYS_DG_MOUNT_H */
872
873/*
874 * Actions to take if <sys/fs_types.h> exists.
875 */
876#ifdef HAVE_SYS_FS_TYPES_H
877/*
878 * Define KERNEL here to avoid multiple definitions of gt_names[] on
879 * Ultrix 4.3.
880 */
881# define KERNEL
882# include <sys/fs_types.h>
883# undef KERNEL
884#endif /* HAVE_SYS_FS_TYPES_H */
885
886/*
887 * Actions to take if <sys/fstyp.h> exists.
888 */
889#ifdef HAVE_SYS_FSTYP_H
890# include <sys/fstyp.h>
891#endif /* HAVE_SYS_FSTYP_H */
892
893/*
894 * Actions to take if <sys/lock.h> exists.
895 */
896#ifdef HAVE_SYS_LOCK_H
897# include <sys/lock.h>
898#endif /* HAVE_SYS_LOCK_H */
899
900/*
901 * Actions to take if <sys/machine.h> exists.
902 */
903#ifdef HAVE_SYS_MACHINE_H
904# include <sys/machine.h>
905#endif /* HAVE_SYS_MACHINE_H */
906
907/*
908 * Actions to take if <sys/mntctl.h> exists.
909 */
910#ifdef HAVE_SYS_MNTCTL_H
911# include <sys/mntctl.h>
912#endif /* HAVE_SYS_MNTCTL_H */
913
914/*
915 * Actions to take if <sys/mnttab.h> exists.
916 */
917#ifdef HAVE_SYS_MNTTAB_H
918# include <sys/mnttab.h>
919#endif /* HAVE_SYS_MNTTAB_H */
920
921/*
922 * Actions to take if <mnttab.h> exists.
923 * Do not include it if MNTTAB is already defined because it probably
924 * came from <sys/mnttab.h> and we do not want conflicting definitions.
925 */
926#if defined(HAVE_MNTTAB_H) && !defined(MNTTAB)
927# include <mnttab.h>
928#endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */
929
930/*
931 * Actions to take if <netconfig.h> exists.
932 */
933#ifdef HAVE_NETCONFIG_H
934# include <netconfig.h>
935/* Some systems (Solaris 2.5.1) don't declare this external */
936extern char *nc_sperror(void);
937#endif /* HAVE_NETCONFIG_H */
938
939/*
940 * Actions to take if <sys/netconfig.h> exists.
941 */
942#ifdef HAVE_SYS_NETCONFIG_H
943# include <sys/netconfig.h>
944#endif /* HAVE_SYS_NETCONFIG_H */
945
946/*
947 * Actions to take if <sys/pathconf.h> exists.
948 */
949#ifdef HAVE_SYS_PATHCONF_H
950# include <sys/pathconf.h>
951#endif /* HAVE_SYS_PATHCONF_H */
952
953/*
954 * Actions to take if <sys/resource.h> exists.
955 */
956#ifdef HAVE_SYS_RESOURCE_H
957# include <sys/resource.h>
958#endif /* HAVE_SYS_RESOURCE_H */
959
960/*
961 * Actions to take if <sys/sema.h> exists.
962 */
963#ifdef HAVE_SYS_SEMA_H
964# include <sys/sema.h>
965#endif /* HAVE_SYS_SEMA_H */
966
967/*
968 * Actions to take if <sys/signal.h> exists.
969 */
970#ifdef HAVE_SYS_SIGNAL_H
971# include <sys/signal.h>
972#endif /* HAVE_SYS_SIGNAL_H */
973
974/*
975 * Actions to take if <sys/sockio.h> exists.
976 */
977#ifdef HAVE_SYS_SOCKIO_H
978# include <sys/sockio.h>
979#endif /* HAVE_SYS_SOCKIO_H */
980
981/*
982 * Actions to take if <sys/syscall.h> exists.
983 */
984#ifdef HAVE_SYS_SYSCALL_H
985# include <sys/syscall.h>
986#endif /* HAVE_SYS_SYSCALL_H */
987
988/*
989 * Actions to take if <sys/syslimits.h> exists.
990 */
991#ifdef HAVE_SYS_SYSLIMITS_H
992# include <sys/syslimits.h>
993#endif /* HAVE_SYS_SYSLIMITS_H */
994
995/*
996 * Actions to take if <tiuser.h> exists.
997 */
998#ifdef HAVE_TIUSER_H
999/*
653# include <arpa/inet.h>
654#endif /* HAVE_ARPA_INET_H */
655
656/*
657 * Actions to take if <resolv.h> exists.
658 */
659#ifdef HAVE_RESOLV_H
660# include <resolv.h>
661#endif /* HAVE_RESOLV_H */
662
663/*
664 * Actions to take if <sys/uio.h> exists.
665 */
666#ifdef HAVE_SYS_UIO_H
667# include <sys/uio.h>
668#endif /* HAVE_SYS_UIO_H */
669
670/*
671 * Actions to take if <sys/fs/cachefs_fs.h> exists.
672 */
673#ifdef HAVE_SYS_FS_CACHEFS_FS_H
674# include <sys/fs/cachefs_fs.h>
675#endif /* HAVE_SYS_FS_CACHEFS_FS_H */
676
677/*
678 * Actions to take if <sys/fs/pc_fs.h> exists.
679 */
680#ifdef HAVE_SYS_FS_PC_FS_H
681# include <sys/fs/pc_fs.h>
682#endif /* HAVE_SYS_FS_PC_FS_H */
683
684/*
685 * Actions to take if <msdosfs/msdosfsmount.h> exists.
686 */
687#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H
688# include <msdosfs/msdosfsmount.h>
689#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */
690
691/*
692 * Actions to take if <sys/fs/tmp.h> exists.
693 */
694#ifdef HAVE_SYS_FS_TMP_H
695# include <sys/fs/tmp.h>
696#endif /* HAVE_SYS_FS_TMP_H */
697
698/*
699 * Actions to take if <sys/fs/ufs_mount.h> exists.
700 */
701#ifdef HAVE_SYS_FS_UFS_MOUNT_H
702# include <sys/fs/ufs_mount.h>
703#endif /* HAVE_SYS_FS_UFS_MOUNT_H */
704
705/*
706 * Actions to take if <sys/fs/efs_clnt.h> exists.
707 */
708#ifdef HAVE_SYS_FS_EFS_CLNT_H
709# include <sys/fs/efs_clnt.h>
710#endif /* HAVE_SYS_FS_EFS_CLNT_H */
711
712/*
713 * Actions to take if <sys/fs/xfs_clnt.h> exists.
714 */
715#ifdef HAVE_SYS_FS_XFS_CLNT_H
716# include <sys/fs/xfs_clnt.h>
717#endif /* HAVE_SYS_FS_XFS_CLNT_H */
718
719/*
720 * Actions to take if <assert.h> exists.
721 */
722#ifdef HAVE_ASSERT_H
723# include <assert.h>
724#endif /* HAVE_ASSERT_H */
725
726/*
727 * Actions to take if <cfs.h> exists.
728 */
729#ifdef HAVE_CFS_H
730# include <cfs.h>
731#endif /* HAVE_CFS_H */
732
733/*
734 * Actions to take if <cluster.h> exists.
735 */
736#ifdef HAVE_CLUSTER_H
737# include <cluster.h>
738#endif /* HAVE_CLUSTER_H */
739
740/*
741 * Actions to take if <ctype.h> exists.
742 */
743#ifdef HAVE_CTYPE_H
744# include <ctype.h>
745#endif /* HAVE_CTYPE_H */
746
747/*
748 * Actions to take if <errno.h> exists.
749 */
750#ifdef HAVE_ERRNO_H
751# include <errno.h>
752#endif /* HAVE_ERRNO_H */
753
754/*
755 * Actions to take if <grp.h> exists.
756 */
757#ifdef HAVE_GRP_H
758# include <grp.h>
759#endif /* HAVE_GRP_H */
760
761/*
762 * Actions to take if <hsfs/hsfs.h> exists.
763 */
764#ifdef HAVE_HSFS_HSFS_H
765# include <hsfs/hsfs.h>
766#endif /* HAVE_HSFS_HSFS_H */
767
768/*
769 * Actions to take if <cdfs/cdfsmount.h> exists.
770 */
771#ifdef HAVE_CDFS_CDFSMOUNT_H
772# include <cdfs/cdfsmount.h>
773#endif /* HAVE_CDFS_CDFSMOUNT_H */
774
775/*
776 * Actions to take if <isofs/cd9660/cd9660_mount.h> exists.
777 */
778#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H
779# include <isofs/cd9660/cd9660_mount.h>
780#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
781
782/*
783 * Actions to take if <mount.h> exists.
784 */
785#ifdef HAVE_MOUNT_H
786# include <mount.h>
787#endif /* HAVE_MOUNT_H */
788
789/*
790 * Actions to take if <nsswitch.h> exists.
791 */
792#ifdef HAVE_NSSWITCH_H
793# include <nsswitch.h>
794#endif /* HAVE_NSSWITCH_H */
795
796/*
797 * Actions to take if <rpc/auth_des.h> exists.
798 */
799#ifdef HAVE_RPC_AUTH_DES_H
800# include <rpc/auth_des.h>
801#endif /* HAVE_RPC_AUTH_DES_H */
802
803/*
804 * Actions to take if <rpc/pmap_clnt.h> exists.
805 */
806#ifdef HAVE_RPC_PMAP_CLNT_H
807# include <rpc/pmap_clnt.h>
808#endif /* HAVE_RPC_PMAP_CLNT_H */
809
810/*
811 * Actions to take if <rpc/pmap_prot.h> exists.
812 */
813#ifdef HAVE_RPC_PMAP_PROT_H
814# include <rpc/pmap_prot.h>
815#endif /* HAVE_RPC_PMAP_PROT_H */
816
817
818/*
819 * Actions to take if <rpcsvc/mount.h> exists.
820 * AIX does not protect against this file doubly included,
821 * so I have to do my own protection here.
822 */
823#ifdef COMMENT_OUT
824#ifdef HAVE_RPCSVC_MOUNT_H
825# ifndef _RPCSVC_MOUNT_H
826# include <rpcsvc/mount.h>
827# endif /* not _RPCSVC_MOUNT_H */
828#endif /* HAVE_RPCSVC_MOUNT_H */
829#endif
830# include "mount.h"
831
832/*
833 * Actions to take if <rpcsvc/nis.h> exists.
834 */
835#ifdef HAVE_RPCSVC_NIS_H
836# include <rpcsvc/nis.h>
837#endif /* HAVE_RPCSVC_NIS_H */
838
839/*
840 * Actions to take if <setjmp.h> exists.
841 */
842#ifdef HAVE_SETJMP_H
843# include <setjmp.h>
844#endif /* HAVE_SETJMP_H */
845
846/*
847 * Actions to take if <signal.h> exists.
848 */
849#ifdef HAVE_SIGNAL_H
850# include <signal.h>
851#endif /* HAVE_SIGNAL_H */
852
853/*
854 * Actions to take if <string.h> exists.
855 */
856#ifdef HAVE_STRING_H
857# include <string.h>
858#endif /* HAVE_STRING_H */
859
860/*
861 * Actions to take if <strings.h> exists.
862 */
863#ifdef HAVE_STRINGS_H
864# include <strings.h>
865#endif /* HAVE_STRINGS_H */
866
867/*
868 * Actions to take if <sys/config.h> exists.
869 */
870#ifdef HAVE_SYS_CONFIG_H
871# include <sys/config.h>
872#endif /* HAVE_SYS_CONFIG_H */
873
874/*
875 * Actions to take if <sys/dg_mount.h> exists.
876 */
877#ifdef HAVE_SYS_DG_MOUNT_H
878# include <sys/dg_mount.h>
879#endif /* HAVE_SYS_DG_MOUNT_H */
880
881/*
882 * Actions to take if <sys/fs_types.h> exists.
883 */
884#ifdef HAVE_SYS_FS_TYPES_H
885/*
886 * Define KERNEL here to avoid multiple definitions of gt_names[] on
887 * Ultrix 4.3.
888 */
889# define KERNEL
890# include <sys/fs_types.h>
891# undef KERNEL
892#endif /* HAVE_SYS_FS_TYPES_H */
893
894/*
895 * Actions to take if <sys/fstyp.h> exists.
896 */
897#ifdef HAVE_SYS_FSTYP_H
898# include <sys/fstyp.h>
899#endif /* HAVE_SYS_FSTYP_H */
900
901/*
902 * Actions to take if <sys/lock.h> exists.
903 */
904#ifdef HAVE_SYS_LOCK_H
905# include <sys/lock.h>
906#endif /* HAVE_SYS_LOCK_H */
907
908/*
909 * Actions to take if <sys/machine.h> exists.
910 */
911#ifdef HAVE_SYS_MACHINE_H
912# include <sys/machine.h>
913#endif /* HAVE_SYS_MACHINE_H */
914
915/*
916 * Actions to take if <sys/mntctl.h> exists.
917 */
918#ifdef HAVE_SYS_MNTCTL_H
919# include <sys/mntctl.h>
920#endif /* HAVE_SYS_MNTCTL_H */
921
922/*
923 * Actions to take if <sys/mnttab.h> exists.
924 */
925#ifdef HAVE_SYS_MNTTAB_H
926# include <sys/mnttab.h>
927#endif /* HAVE_SYS_MNTTAB_H */
928
929/*
930 * Actions to take if <mnttab.h> exists.
931 * Do not include it if MNTTAB is already defined because it probably
932 * came from <sys/mnttab.h> and we do not want conflicting definitions.
933 */
934#if defined(HAVE_MNTTAB_H) && !defined(MNTTAB)
935# include <mnttab.h>
936#endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */
937
938/*
939 * Actions to take if <netconfig.h> exists.
940 */
941#ifdef HAVE_NETCONFIG_H
942# include <netconfig.h>
943/* Some systems (Solaris 2.5.1) don't declare this external */
944extern char *nc_sperror(void);
945#endif /* HAVE_NETCONFIG_H */
946
947/*
948 * Actions to take if <sys/netconfig.h> exists.
949 */
950#ifdef HAVE_SYS_NETCONFIG_H
951# include <sys/netconfig.h>
952#endif /* HAVE_SYS_NETCONFIG_H */
953
954/*
955 * Actions to take if <sys/pathconf.h> exists.
956 */
957#ifdef HAVE_SYS_PATHCONF_H
958# include <sys/pathconf.h>
959#endif /* HAVE_SYS_PATHCONF_H */
960
961/*
962 * Actions to take if <sys/resource.h> exists.
963 */
964#ifdef HAVE_SYS_RESOURCE_H
965# include <sys/resource.h>
966#endif /* HAVE_SYS_RESOURCE_H */
967
968/*
969 * Actions to take if <sys/sema.h> exists.
970 */
971#ifdef HAVE_SYS_SEMA_H
972# include <sys/sema.h>
973#endif /* HAVE_SYS_SEMA_H */
974
975/*
976 * Actions to take if <sys/signal.h> exists.
977 */
978#ifdef HAVE_SYS_SIGNAL_H
979# include <sys/signal.h>
980#endif /* HAVE_SYS_SIGNAL_H */
981
982/*
983 * Actions to take if <sys/sockio.h> exists.
984 */
985#ifdef HAVE_SYS_SOCKIO_H
986# include <sys/sockio.h>
987#endif /* HAVE_SYS_SOCKIO_H */
988
989/*
990 * Actions to take if <sys/syscall.h> exists.
991 */
992#ifdef HAVE_SYS_SYSCALL_H
993# include <sys/syscall.h>
994#endif /* HAVE_SYS_SYSCALL_H */
995
996/*
997 * Actions to take if <sys/syslimits.h> exists.
998 */
999#ifdef HAVE_SYS_SYSLIMITS_H
1000# include <sys/syslimits.h>
1001#endif /* HAVE_SYS_SYSLIMITS_H */
1002
1003/*
1004 * Actions to take if <tiuser.h> exists.
1005 */
1006#ifdef HAVE_TIUSER_H
1007/*
1000 * Some systems like AIX have multiple definitions for T_NULL and othersd
1008 * Some systems like AIX have multiple definitions for T_NULL and others
1001 * that are defined first in <arpa/nameser.h>.
1002 */
1003# ifdef HAVE_ARPA_NAMESER_H
1004# ifdef T_NULL
1005# undef T_NULL
1006# endif /* T_NULL */
1007# ifdef T_UNSPEC
1008# undef T_UNSPEC
1009# endif /* T_UNSPEC */
1010# ifdef T_IDLE
1011# undef T_IDLE
1012# endif /* T_IDLE */
1013# endif /* HAVE_ARPA_NAMESER_H */
1014# include <tiuser.h>
1015#endif /* HAVE_TIUSER_H */
1016
1017/*
1018 * Actions to take if <sys/tiuser.h> exists.
1019 */
1020#ifdef HAVE_SYS_TIUSER_H
1021# include <sys/tiuser.h>
1022#endif /* HAVE_SYS_TIUSER_H */
1023
1024/*
1025 * Actions to take if <sys/statfs.h> exists.
1026 */
1027#ifdef HAVE_SYS_STATFS_H
1028# include <sys/statfs.h>
1029#endif /* HAVE_SYS_STATFS_H */
1030
1031/*
1032 * Actions to take if <sys/vfs.h> exists.
1033 */
1034#ifdef HAVE_SYS_VFS_H
1035# include <sys/vfs.h>
1036#endif /* HAVE_SYS_VFS_H */
1037
1038/*
1039 * Actions to take if <sys/vmount.h> exists.
1040 */
1041#ifdef HAVE_SYS_VMOUNT_H
1042# include <sys/vmount.h>
1043#endif /* HAVE_SYS_VMOUNT_H */
1044
1045/*
1046 * Actions to take if <ufs/ufs_mount.h> exists.
1047 */
1048#ifdef HAVE_UFS_UFS_MOUNT_H
1049# include <ufs/ufs_mount.h>
1050#endif /* HAVE_UFS_UFS_MOUNT_H */
1051
1052/*
1053 * Are S_ISDIR, S_ISREG, et al broken? If not, include <sys/stat.h>.
1054 * Turned off the not using sys/stat.h based on if the macros are
1055 * "broken", because they incorrectly get reported as broken on
1056 * ncr2.
1057 */
1058#ifndef STAT_MACROS_BROKEN_notused
1059/*
1060 * RedHat Linux 4.2 (alpha) has a problem in the headers that causes
1009 * that are defined first in <arpa/nameser.h>.
1010 */
1011# ifdef HAVE_ARPA_NAMESER_H
1012# ifdef T_NULL
1013# undef T_NULL
1014# endif /* T_NULL */
1015# ifdef T_UNSPEC
1016# undef T_UNSPEC
1017# endif /* T_UNSPEC */
1018# ifdef T_IDLE
1019# undef T_IDLE
1020# endif /* T_IDLE */
1021# endif /* HAVE_ARPA_NAMESER_H */
1022# include <tiuser.h>
1023#endif /* HAVE_TIUSER_H */
1024
1025/*
1026 * Actions to take if <sys/tiuser.h> exists.
1027 */
1028#ifdef HAVE_SYS_TIUSER_H
1029# include <sys/tiuser.h>
1030#endif /* HAVE_SYS_TIUSER_H */
1031
1032/*
1033 * Actions to take if <sys/statfs.h> exists.
1034 */
1035#ifdef HAVE_SYS_STATFS_H
1036# include <sys/statfs.h>
1037#endif /* HAVE_SYS_STATFS_H */
1038
1039/*
1040 * Actions to take if <sys/vfs.h> exists.
1041 */
1042#ifdef HAVE_SYS_VFS_H
1043# include <sys/vfs.h>
1044#endif /* HAVE_SYS_VFS_H */
1045
1046/*
1047 * Actions to take if <sys/vmount.h> exists.
1048 */
1049#ifdef HAVE_SYS_VMOUNT_H
1050# include <sys/vmount.h>
1051#endif /* HAVE_SYS_VMOUNT_H */
1052
1053/*
1054 * Actions to take if <ufs/ufs_mount.h> exists.
1055 */
1056#ifdef HAVE_UFS_UFS_MOUNT_H
1057# include <ufs/ufs_mount.h>
1058#endif /* HAVE_UFS_UFS_MOUNT_H */
1059
1060/*
1061 * Are S_ISDIR, S_ISREG, et al broken? If not, include <sys/stat.h>.
1062 * Turned off the not using sys/stat.h based on if the macros are
1063 * "broken", because they incorrectly get reported as broken on
1064 * ncr2.
1065 */
1066#ifndef STAT_MACROS_BROKEN_notused
1067/*
1068 * RedHat Linux 4.2 (alpha) has a problem in the headers that causes
1061 * dupicate definitions, and also some other nasty bugs. Upgrade to Redhat
1069 * duplicate definitions, and also some other nasty bugs. Upgrade to Redhat
1062 * 5.0!
1063 */
1064# ifdef HAVE_SYS_STAT_H
1065/* avoid duplicates or conflicts with <linux/stat.h> (RedHat alpha linux) */
1066# if defined(S_IFREG) && defined(HAVE_STATBUF_H)
1067# include <statbuf.h>
1068# undef S_IFBLK
1069# undef S_IFCHR
1070# undef S_IFDIR
1071# undef S_IFIFO
1072# undef S_IFLNK
1073# undef S_IFMT
1074# undef S_IFREG
1075# undef S_IFSOCK
1076# undef S_IRGRP
1077# undef S_IROTH
1078# undef S_IRUSR
1079# undef S_IRWXG
1080# undef S_IRWXO
1081# undef S_IRWXU
1082# undef S_ISBLK
1083# undef S_ISCHR
1084# undef S_ISDIR
1085# undef S_ISFIFO
1086# undef S_ISGID
1087# undef S_ISLNK
1088# undef S_ISREG
1089# undef S_ISSOCK
1090# undef S_ISUID
1091# undef S_ISVTX
1092# undef S_IWGRP
1093# undef S_IWOTH
1094# undef S_IWUSR
1095# undef S_IXGRP
1096# undef S_IXOTH
1097# undef S_IXUSR
1098# endif /* defined(S_IFREG) && defined(HAVE_STATBUF_H) */
1099# include <sys/stat.h>
1100# endif /* HAVE_SYS_STAT_H */
1101#endif /* not STAT_MACROS_BROKEN_notused */
1102
1103/*
1104 * Actions to take if <stdio.h> exists.
1105 */
1106#ifdef HAVE_STDIO_H
1107# include <stdio.h>
1108#endif /* HAVE_STDIO_H */
1109
1110/*
1111 * Actions to take if <stdlib.h> exists.
1112 */
1113#ifdef HAVE_STDLIB_H
1114# include <stdlib.h>
1115#endif /* HAVE_STDLIB_H */
1116
1117/*
1118 * Actions to take if <regex.h> exists.
1119 */
1120#ifdef HAVE_REGEX_H
1121# include <regex.h>
1122#endif /* HAVE_REGEX_H */
1123
1124
1125/****************************************************************************/
1126/*
1127 * Specific macros we're looking for.
1128 */
1129#ifndef HAVE_MEMSET
1130# ifdef HAVE_BZERO
1131# define memset(ptr, val, len) bzero((ptr), (len))
1132# else /* not HAVE_BZERO */
1133# error Cannot find either memset or bzero!
1134# endif /* not HAVE_BZERO */
1135#endif /* not HAVE_MEMSET */
1136
1137#ifndef HAVE_MEMMOVE
1138# ifdef HAVE_BCOPY
1139# define memmove(to, from, len) bcopy((from), (to), (len))
1140# else /* not HAVE_BCOPY */
1141# error Cannot find either memmove or bcopy!
1142# endif /* not HAVE_BCOPY */
1143#endif /* not HAVE_MEMMOVE */
1144
1145/*
1146 * memcmp() is more problematic:
1147 * Systems that don't have it, but have bcmp(), will use bcmp() instead.
1148 * Those that have it, but it is bad (SunOS 4 doesn't handle
1149 * 8 bit comparisons correctly), will get to use am_memcmp().
1150 * Otherwise if you have memcmp() and it is good, use it.
1151 */
1152#ifdef HAVE_MEMCMP
1153# ifdef HAVE_BAD_MEMCMP
1154# define memcmp am_memcmp
1155extern int am_memcmp(const voidp s1, const voidp s2, size_t len);
1156# endif /* HAVE_BAD_MEMCMP */
1157#else /* not HAVE_MEMCMP */
1158# ifdef HAVE_BCMP
1159# define memcmp(a, b, len) bcmp((a), (b), (len))
1160# endif /* HAVE_BCMP */
1161#endif /* not HAVE_MEMCMP */
1162
1163#ifndef HAVE_SETEUID
1164# ifdef HAVE_SETRESUID
1165# define seteuid(x) setresuid(-1,(x),-1)
1166# else /* not HAVE_SETRESUID */
1167# error Cannot find either seteuid or setresuid!
1168# endif /* not HAVE_SETRESUID */
1169#endif /* not HAVE_SETEUID */
1170
1171/*
1172 * Define type of mntent_t.
1173 * Defaults to struct mntent, else struct mnttab. If neither is found, and
1174 * the operating system does keep not mount tables in the kernel, then flag
1175 * it as an error. If neither is found and the OS keeps mount tables in the
1176 * kernel, then define our own version of mntent; it will be needed for amd
1177 * to keep its own internal version of the mount tables.
1178 */
1179#ifdef HAVE_STRUCT_MNTENT
1180typedef struct mntent mntent_t;
1181#else /* not HAVE_STRUCT_MNTENT */
1182# ifdef HAVE_STRUCT_MNTTAB
1183typedef struct mnttab mntent_t;
1184/* map struct mnttab field names to struct mntent field names */
1185# define mnt_fsname mnt_special
1186# define mnt_dir mnt_mountp
1187# define mnt_opts mnt_mntopts
1188# define mnt_type mnt_fstype
1189# else /* not HAVE_STRUCT_MNTTAB */
1190# ifdef MOUNT_TABLE_ON_FILE
1191# error Could not find definition for struct mntent or struct mnttab!
1192# else /* not MOUNT_TABLE_ON_FILE */
1193typedef struct _am_mntent {
1194 char *mnt_fsname; /* name of mounted file system */
1195 char *mnt_dir; /* file system path prefix */
1196 char *mnt_type; /* MNTTAB_TYPE_* */
1197 char *mnt_opts; /* MNTTAB_OPT_* */
1198 int mnt_freq; /* dump frequency, in days */
1199 int mnt_passno; /* pass number on parallel fsck */
1200} mntent_t;
1201# endif /* not MOUNT_TABLE_ON_FILE */
1202# endif /* not HAVE_STRUCT_MNTTAB */
1203#endif /* not HAVE_STRUCT_MNTENT */
1204
1205
1206/*
1207 * Complete external definitions missing from some systems.
1208 */
1209
1210#ifndef HAVE_EXTERN_SYS_ERRLIST
1211extern const char * const sys_errlist[];
1212#endif /* not HAVE_EXTERN_SYS_ERRLIST */
1213
1214#ifndef HAVE_EXTERN_OPTARG
1215extern char *optarg;
1216extern int optind;
1217#endif /* not HAVE_EXTERN_OPTARG */
1218
1219#if defined(HAVE_CLNT_SPERRNO) && !defined(HAVE_EXTERN_CLNT_SPERRNO)
1220extern char *clnt_sperrno(const enum clnt_stat num);
1221#endif /* defined(HAVE_CLNT_SPERRNO) && !defined(HAVE_EXTERN_CLNT_SPERRNO) */
1222
1223#ifndef HAVE_EXTERN_FREE
1224extern void free(voidp);
1225#endif /* not HAVE_EXTERN_FREE */
1226
1227#if defined(HAVE_GET_MYADDRESS) && !defined(HAVE_EXTERN_GET_MYADDRESS)
1228extern void get_myaddress(struct sockaddr_in *addr);
1229#endif /* defined(HAVE_GET_MYADDRESS) && !defined(HAVE_EXTERN_GET_MYADDRESS) */
1230
1231#if defined(HAVE_GETDOMAINNAME) && !defined(HAVE_EXTERN_GETDOMAINNAME)
1232# if defined(HAVE_MAP_NIS) || defined(HAVE_MAP_NISPLUS)
1233extern int getdomainname(char *name, int namelen);
1234# endif /* defined(HAVE_MAP_NIS) || defined(HAVE_MAP_NISPLUS) */
1235#endif /* defined(HAVE_GETDOMAINNAME) && !defined(HAVE_EXTERN_GETDOMAINNAME) */
1236
1237#if defined(HAVE_GETDTABLESIZE) && !defined(HAVE_EXTERN_GETDTABLESIZE)
1238extern int getdtablesize(void);
1239#endif /* defined(HAVE_GETDTABLESIZE) && !defined(HAVE_EXTERN_GETDTABLESIZE) */
1240
1241#if defined(HAVE_GETHOSTNAME) && !defined(HAVE_EXTERN_GETHOSTNAME)
1242extern int gethostname(char *name, int namelen);
1243#endif /* defined(HAVE_GETHOSTNAME) && !defined(HAVE_EXTERN_GETHOSTNAME) */
1244
1070 * 5.0!
1071 */
1072# ifdef HAVE_SYS_STAT_H
1073/* avoid duplicates or conflicts with <linux/stat.h> (RedHat alpha linux) */
1074# if defined(S_IFREG) && defined(HAVE_STATBUF_H)
1075# include <statbuf.h>
1076# undef S_IFBLK
1077# undef S_IFCHR
1078# undef S_IFDIR
1079# undef S_IFIFO
1080# undef S_IFLNK
1081# undef S_IFMT
1082# undef S_IFREG
1083# undef S_IFSOCK
1084# undef S_IRGRP
1085# undef S_IROTH
1086# undef S_IRUSR
1087# undef S_IRWXG
1088# undef S_IRWXO
1089# undef S_IRWXU
1090# undef S_ISBLK
1091# undef S_ISCHR
1092# undef S_ISDIR
1093# undef S_ISFIFO
1094# undef S_ISGID
1095# undef S_ISLNK
1096# undef S_ISREG
1097# undef S_ISSOCK
1098# undef S_ISUID
1099# undef S_ISVTX
1100# undef S_IWGRP
1101# undef S_IWOTH
1102# undef S_IWUSR
1103# undef S_IXGRP
1104# undef S_IXOTH
1105# undef S_IXUSR
1106# endif /* defined(S_IFREG) && defined(HAVE_STATBUF_H) */
1107# include <sys/stat.h>
1108# endif /* HAVE_SYS_STAT_H */
1109#endif /* not STAT_MACROS_BROKEN_notused */
1110
1111/*
1112 * Actions to take if <stdio.h> exists.
1113 */
1114#ifdef HAVE_STDIO_H
1115# include <stdio.h>
1116#endif /* HAVE_STDIO_H */
1117
1118/*
1119 * Actions to take if <stdlib.h> exists.
1120 */
1121#ifdef HAVE_STDLIB_H
1122# include <stdlib.h>
1123#endif /* HAVE_STDLIB_H */
1124
1125/*
1126 * Actions to take if <regex.h> exists.
1127 */
1128#ifdef HAVE_REGEX_H
1129# include <regex.h>
1130#endif /* HAVE_REGEX_H */
1131
1132
1133/****************************************************************************/
1134/*
1135 * Specific macros we're looking for.
1136 */
1137#ifndef HAVE_MEMSET
1138# ifdef HAVE_BZERO
1139# define memset(ptr, val, len) bzero((ptr), (len))
1140# else /* not HAVE_BZERO */
1141# error Cannot find either memset or bzero!
1142# endif /* not HAVE_BZERO */
1143#endif /* not HAVE_MEMSET */
1144
1145#ifndef HAVE_MEMMOVE
1146# ifdef HAVE_BCOPY
1147# define memmove(to, from, len) bcopy((from), (to), (len))
1148# else /* not HAVE_BCOPY */
1149# error Cannot find either memmove or bcopy!
1150# endif /* not HAVE_BCOPY */
1151#endif /* not HAVE_MEMMOVE */
1152
1153/*
1154 * memcmp() is more problematic:
1155 * Systems that don't have it, but have bcmp(), will use bcmp() instead.
1156 * Those that have it, but it is bad (SunOS 4 doesn't handle
1157 * 8 bit comparisons correctly), will get to use am_memcmp().
1158 * Otherwise if you have memcmp() and it is good, use it.
1159 */
1160#ifdef HAVE_MEMCMP
1161# ifdef HAVE_BAD_MEMCMP
1162# define memcmp am_memcmp
1163extern int am_memcmp(const voidp s1, const voidp s2, size_t len);
1164# endif /* HAVE_BAD_MEMCMP */
1165#else /* not HAVE_MEMCMP */
1166# ifdef HAVE_BCMP
1167# define memcmp(a, b, len) bcmp((a), (b), (len))
1168# endif /* HAVE_BCMP */
1169#endif /* not HAVE_MEMCMP */
1170
1171#ifndef HAVE_SETEUID
1172# ifdef HAVE_SETRESUID
1173# define seteuid(x) setresuid(-1,(x),-1)
1174# else /* not HAVE_SETRESUID */
1175# error Cannot find either seteuid or setresuid!
1176# endif /* not HAVE_SETRESUID */
1177#endif /* not HAVE_SETEUID */
1178
1179/*
1180 * Define type of mntent_t.
1181 * Defaults to struct mntent, else struct mnttab. If neither is found, and
1182 * the operating system does keep not mount tables in the kernel, then flag
1183 * it as an error. If neither is found and the OS keeps mount tables in the
1184 * kernel, then define our own version of mntent; it will be needed for amd
1185 * to keep its own internal version of the mount tables.
1186 */
1187#ifdef HAVE_STRUCT_MNTENT
1188typedef struct mntent mntent_t;
1189#else /* not HAVE_STRUCT_MNTENT */
1190# ifdef HAVE_STRUCT_MNTTAB
1191typedef struct mnttab mntent_t;
1192/* map struct mnttab field names to struct mntent field names */
1193# define mnt_fsname mnt_special
1194# define mnt_dir mnt_mountp
1195# define mnt_opts mnt_mntopts
1196# define mnt_type mnt_fstype
1197# else /* not HAVE_STRUCT_MNTTAB */
1198# ifdef MOUNT_TABLE_ON_FILE
1199# error Could not find definition for struct mntent or struct mnttab!
1200# else /* not MOUNT_TABLE_ON_FILE */
1201typedef struct _am_mntent {
1202 char *mnt_fsname; /* name of mounted file system */
1203 char *mnt_dir; /* file system path prefix */
1204 char *mnt_type; /* MNTTAB_TYPE_* */
1205 char *mnt_opts; /* MNTTAB_OPT_* */
1206 int mnt_freq; /* dump frequency, in days */
1207 int mnt_passno; /* pass number on parallel fsck */
1208} mntent_t;
1209# endif /* not MOUNT_TABLE_ON_FILE */
1210# endif /* not HAVE_STRUCT_MNTTAB */
1211#endif /* not HAVE_STRUCT_MNTENT */
1212
1213
1214/*
1215 * Complete external definitions missing from some systems.
1216 */
1217
1218#ifndef HAVE_EXTERN_SYS_ERRLIST
1219extern const char * const sys_errlist[];
1220#endif /* not HAVE_EXTERN_SYS_ERRLIST */
1221
1222#ifndef HAVE_EXTERN_OPTARG
1223extern char *optarg;
1224extern int optind;
1225#endif /* not HAVE_EXTERN_OPTARG */
1226
1227#if defined(HAVE_CLNT_SPERRNO) && !defined(HAVE_EXTERN_CLNT_SPERRNO)
1228extern char *clnt_sperrno(const enum clnt_stat num);
1229#endif /* defined(HAVE_CLNT_SPERRNO) && !defined(HAVE_EXTERN_CLNT_SPERRNO) */
1230
1231#ifndef HAVE_EXTERN_FREE
1232extern void free(voidp);
1233#endif /* not HAVE_EXTERN_FREE */
1234
1235#if defined(HAVE_GET_MYADDRESS) && !defined(HAVE_EXTERN_GET_MYADDRESS)
1236extern void get_myaddress(struct sockaddr_in *addr);
1237#endif /* defined(HAVE_GET_MYADDRESS) && !defined(HAVE_EXTERN_GET_MYADDRESS) */
1238
1239#if defined(HAVE_GETDOMAINNAME) && !defined(HAVE_EXTERN_GETDOMAINNAME)
1240# if defined(HAVE_MAP_NIS) || defined(HAVE_MAP_NISPLUS)
1241extern int getdomainname(char *name, int namelen);
1242# endif /* defined(HAVE_MAP_NIS) || defined(HAVE_MAP_NISPLUS) */
1243#endif /* defined(HAVE_GETDOMAINNAME) && !defined(HAVE_EXTERN_GETDOMAINNAME) */
1244
1245#if defined(HAVE_GETDTABLESIZE) && !defined(HAVE_EXTERN_GETDTABLESIZE)
1246extern int getdtablesize(void);
1247#endif /* defined(HAVE_GETDTABLESIZE) && !defined(HAVE_EXTERN_GETDTABLESIZE) */
1248
1249#if defined(HAVE_GETHOSTNAME) && !defined(HAVE_EXTERN_GETHOSTNAME)
1250extern int gethostname(char *name, int namelen);
1251#endif /* defined(HAVE_GETHOSTNAME) && !defined(HAVE_EXTERN_GETHOSTNAME) */
1252
1253#ifndef HAVE_EXTERN_GETLOGIN
1254extern char *getlogin(void);
1255#endif /* not HAVE_EXTERN_GETLOGIN */
1256
1245#if defined(HAVE_GETPAGESIZE) && !defined(HAVE_EXTERN_GETPAGESIZE)
1246extern int getpagesize(void);
1247#endif /* defined(HAVE_GETPAGESIZE) && !defined(HAVE_EXTERN_GETPAGESIZE) */
1248
1249#ifndef HAVE_EXTERN_GETWD
1250extern char *getwd(char *s);
1251#endif /* not HAVE_EXTERN_GETWD */
1252
1253#ifndef HAVE_EXTERN_INNETGR
1254extern int innetgr(char *, char *, char *, char *);
1255#endif /* not HAVE_EXTERN_INNETGR */
1256
1257#if defined(HAVE_MKSTEMP) && !defined(HAVE_EXTERN_MKSTEMP)
1258extern int mkstemp(char *);
1259#endif /* defined(HAVE_MKSTEMP) && !defined(HAVE_EXTERN_MKSTEMP) */
1260
1261#ifndef HAVE_EXTERN_SBRK
1262extern caddr_t sbrk(int incr);
1263#endif /* not HAVE_EXTERN_SBRK */
1264
1257#if defined(HAVE_GETPAGESIZE) && !defined(HAVE_EXTERN_GETPAGESIZE)
1258extern int getpagesize(void);
1259#endif /* defined(HAVE_GETPAGESIZE) && !defined(HAVE_EXTERN_GETPAGESIZE) */
1260
1261#ifndef HAVE_EXTERN_GETWD
1262extern char *getwd(char *s);
1263#endif /* not HAVE_EXTERN_GETWD */
1264
1265#ifndef HAVE_EXTERN_INNETGR
1266extern int innetgr(char *, char *, char *, char *);
1267#endif /* not HAVE_EXTERN_INNETGR */
1268
1269#if defined(HAVE_MKSTEMP) && !defined(HAVE_EXTERN_MKSTEMP)
1270extern int mkstemp(char *);
1271#endif /* defined(HAVE_MKSTEMP) && !defined(HAVE_EXTERN_MKSTEMP) */
1272
1273#ifndef HAVE_EXTERN_SBRK
1274extern caddr_t sbrk(int incr);
1275#endif /* not HAVE_EXTERN_SBRK */
1276
1277#if defined(HAVE_SETEUID) && !defined(HAVE_EXTERN_SETEUID)
1278extern int seteuid(uid_t euid);
1279#endif /* not defined(HAVE_SETEUID) && !defined(HAVE_EXTERN_SETEUID) */
1280
1265#ifndef HAVE_EXTERN_STRCASECMP
1266/*
1267 * define this extern even if function does not exist, for it will
1268 * be filled in by libamu/strcasecmp.c
1269 */
1270extern int strcasecmp(const char *s1, const char *s2);
1271#endif /* not HAVE_EXTERN_STRCASECMP */
1272
1273#ifndef HAVE_EXTERN_STRDUP
1274/*
1275 * define this extern even if function does not exist, for it will
1276 * be filled in by libamu/strdup.c
1277 */
1278extern char *strdup(const char *s);
1279#endif /* not HAVE_EXTERN_STRDUP */
1280
1281#if defined(HAVE_STRSTR) && !defined(HAVE_EXTERN_STRSTR)
1282extern char *strstr(const char *s1, const char *s2);
1283#endif /* defined(HAVE_STRSTR) && !defined(HAVE_EXTERN_STRSTR) */
1284
1285#if defined(HAVE_USLEEP) && !defined(HAVE_EXTERN_USLEEP)
1286extern int usleep(u_int useconds);
1287#endif /* defined(HAVE_USLEEP) && !defined(HAVE_EXTERN_USLEEP) */
1288
1289#ifndef HAVE_EXTERN_UALARM
1290extern u_int ualarm(u_int usecs, u_int interval);
1291#endif /* not HAVE_EXTERN_UALARM */
1292
1293#if defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3)
1294extern int wait3(int *statusp, int options, struct rusage *rusage);
1295#endif /* defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3) */
1296
1297#ifndef HAVE_EXTERN_XDR_OPAQUE_AUTH
1281#ifndef HAVE_EXTERN_STRCASECMP
1282/*
1283 * define this extern even if function does not exist, for it will
1284 * be filled in by libamu/strcasecmp.c
1285 */
1286extern int strcasecmp(const char *s1, const char *s2);
1287#endif /* not HAVE_EXTERN_STRCASECMP */
1288
1289#ifndef HAVE_EXTERN_STRDUP
1290/*
1291 * define this extern even if function does not exist, for it will
1292 * be filled in by libamu/strdup.c
1293 */
1294extern char *strdup(const char *s);
1295#endif /* not HAVE_EXTERN_STRDUP */
1296
1297#if defined(HAVE_STRSTR) && !defined(HAVE_EXTERN_STRSTR)
1298extern char *strstr(const char *s1, const char *s2);
1299#endif /* defined(HAVE_STRSTR) && !defined(HAVE_EXTERN_STRSTR) */
1300
1301#if defined(HAVE_USLEEP) && !defined(HAVE_EXTERN_USLEEP)
1302extern int usleep(u_int useconds);
1303#endif /* defined(HAVE_USLEEP) && !defined(HAVE_EXTERN_USLEEP) */
1304
1305#ifndef HAVE_EXTERN_UALARM
1306extern u_int ualarm(u_int usecs, u_int interval);
1307#endif /* not HAVE_EXTERN_UALARM */
1308
1309#if defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3)
1310extern int wait3(int *statusp, int options, struct rusage *rusage);
1311#endif /* defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3) */
1312
1313#ifndef HAVE_EXTERN_XDR_OPAQUE_AUTH
1298extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
1314extern bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *auth);
1299#endif /* not HAVE_EXTERN_XDR_OPAQUE_AUTH */
1300
1315#endif /* not HAVE_EXTERN_XDR_OPAQUE_AUTH */
1316
1301#ifndef HAVE_EXTERN_GETLOGIN
1302extern char *getlogin(void);
1303#endif /* not HAVE_EXTERN_GETLOGIN */
1304
1305/****************************************************************************/
1306/*
1307 * amd-specific header files.
1308 */
1309#ifdef THIS_HEADER_FILE_IS_INCLUDED_ABOVE
1310# include <amu_nfs_prot.h>
1311#endif /* THIS_HEADER_FILE_IS_INCLUDED_ABOVE */
1312#include <am_utils.h>
1313#include <amq_defs.h>
1314#include <aux_conf.h>
1317
1318/****************************************************************************/
1319/*
1320 * amd-specific header files.
1321 */
1322#ifdef THIS_HEADER_FILE_IS_INCLUDED_ABOVE
1323# include <amu_nfs_prot.h>
1324#endif /* THIS_HEADER_FILE_IS_INCLUDED_ABOVE */
1325#include <am_utils.h>
1326#include <amq_defs.h>
1327#include <aux_conf.h>
1315/* compatibilty with old amd, while autoconfistating it */
1328/* compatibility with old amd, while autoconfiscating it */
1316#include <am_compat.h>
1317
1318
1319/****************************************************************************/
1320/*
1329#include <am_compat.h>
1330
1331
1332/****************************************************************************/
1333/*
1321 * External defintions that depend on other macros available (or not)
1334 * External definitions that depend on other macros available (or not)
1322 * and those are probably declared in any of the above headers.
1323 */
1324
1325#ifndef HAVE_HASMNTOPT
1326extern char *hasmntopt(mntent_t *mnt, char *opt);
1327#endif /* not HAVE_HASMNTOPT */
1328
1329/*
1330 * include definitions of all possible xdr functions that are otherwise
1331 * not defined elsewhere.
1332 */
1333#include <am_xdr_func.h>
1334
1335#endif /* not _AM_DEFS_H */
1335 * and those are probably declared in any of the above headers.
1336 */
1337
1338#ifndef HAVE_HASMNTOPT
1339extern char *hasmntopt(mntent_t *mnt, char *opt);
1340#endif /* not HAVE_HASMNTOPT */
1341
1342/*
1343 * include definitions of all possible xdr functions that are otherwise
1344 * not defined elsewhere.
1345 */
1346#include <am_xdr_func.h>
1347
1348#endif /* not _AM_DEFS_H */