2 * Copyright (c) 1997-2006 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.
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
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 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.
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
40 * File: am-utils/include/mount_headers1.h
45 #ifdef HAVE_SYS_TYPES_H
46 # include <sys/types.h>
47 #endif /* HAVE_SYS_TYPES_H */
48 #ifdef HAVE_SYS_ERRNO_H
49 # include <sys/errno.h>
50 #endif /* HAVE_SYS_ERRNO_H */
51 #ifdef HAVE_SYS_PARAM_H
52 # include <sys/param.h>
53 #endif /* HAVE_SYS_PARAM_H */
54 #ifdef HAVE_SYS_TIME_H
55 # include <sys/time.h>
56 #endif /* HAVE_SYS_TIME_H */
57 #ifdef HAVE_SYS_UCRED_H
58 # include <sys/ucred.h>
59 #endif /* HAVE_SYS_UCRED_H */
60 #ifdef HAVE_SYS_SOCKET_H
61 # include <sys/socket.h>
62 #endif /* HAVE_SYS_SOCKET_H */
63 #ifdef HAVE_NETINET_IN_H
64 # include <netinet/in.h>
65 #endif /* HAVE_NETINET_IN_H */
68 #endif /* HAVE_NET_IF_H */
71 #endif /* HAVE_STDIO_H */
74 # define KERNEL_off_for_now_breaks_FreeBSD
75 #endif /* not KERNEL */
77 #ifdef HAVE_SYS_MNTENT_H
78 # include <sys/mntent.h>
79 #endif /* HAVE_SYS_MNTENT_H */
82 #endif /* HAVE_MNTENT_H */
83 #ifdef HAVE_SYS_MNTTAB_H
84 # include <sys/mnttab.h>
85 #endif /* HAVE_SYS_MNTTAB_H */
86 #if defined(HAVE_MNTTAB_H) && !defined(MNTTAB)
88 * Do not include it if MNTTAB is already defined because it probably
89 * came from <sys/mnttab.h> and we do not want conflicting definitions.
92 #endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */
94 #ifdef HAVE_SYS_MOUNT_H
97 # endif /* not NFSCLIENT */
100 # endif /* not PCFS */
103 # endif /* not LOFS */
106 # endif /* not RFS */
109 # endif /* not MSDOSFS */
112 # endif /* not MFS */
115 # endif /* not CD9660 */
118 # endif /* not NFS */
119 # include <sys/mount.h>
120 #endif /* HAVE_SYS_MOUNT_H */
122 #ifdef HAVE_SYS_VMOUNT_H
123 # include <sys/vmount.h>
124 #endif /* HAVE_SYS_VMOUNT_H */
127 * There is no point in including this on a glibc2 system
128 * we're only asking for trouble
130 #if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2)
132 * There's a conflict of definitions on redhat alpha linux between
133 * <netinet/in.h> and <linux/fs.h>.
134 * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64
135 * between <netinet/in.h> and <linux/byteorder/generic.h> (2.1 kernels).
137 # ifdef HAVE_SOCKETBITS_H
138 # define _LINUX_SOCKET_H
148 # endif /* HAVE_SOCKETBITS_H */
149 # ifdef HAVE_LINUX_POSIX_TYPES_H
150 # include <linux/posix_types.h>
151 # endif /* HAVE_LINUX_POSIX_TYPES_H */
152 # ifndef _LINUX_BYTEORDER_GENERIC_H
153 # define _LINUX_BYTEORDER_GENERIC_H
154 # endif /* _LINUX_BYTEORDER_GENERIC_H */
155 # ifndef _LINUX_STRING_H_
156 # define _LINUX_STRING_H_
157 # endif /* not _LINUX_STRING_H_ */
158 # ifdef HAVE_LINUX_KDEV_T_H
160 # include <linux/kdev_t.h>
162 # endif /* HAVE_LINUX_KDEV_T_H */
163 # ifdef HAVE_LINUX_LIST_H
165 # include <linux/list.h>
167 # endif /* HAVE_LINUX_LIST_H */
168 # include <linux/fs.h>
169 #endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */
171 #ifdef HAVE_SYS_FS_TYPES_H
172 # include <sys/fs_types.h>
173 #endif /* HAVE_SYS_FS_TYPES_H */
175 #ifdef HAVE_UFS_UFS_MOUNT_H
176 # include <ufs/ufs_mount.h>
177 #endif /* HAVE_UFS_UFS_MOUNT_H */
178 #ifdef HAVE_UFS_UFS_UFSMOUNT_H_off
179 # error do not include this file here because on *bsd it
180 # error causes errors with other header files. Instead, add it to the
181 # error specific conf/nfs_prot_*.h file.
182 # include <ufs/ufs/ufsmount.h>
183 #endif /* HAVE_UFS_UFS_UFSMOUNT_H_off */
185 #ifdef HAVE_CDFS_CDFS_MOUNT_H
186 # include <cdfs/cdfs_mount.h>
187 #endif /* HAVE_CDFS_CDFS_MOUNT_H */
188 #ifdef HAVE_CDFS_CDFSMOUNT_H
189 # include <cdfs/cdfsmount.h>
190 #endif /* HAVE_CDFS_CDFSMOUNT_H */
191 #ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H
192 # include <isofs/cd9660/cd9660_mount.h>
193 #endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
195 #ifdef HAVE_SYS_FS_PC_FS_H
196 # include <sys/fs/pc_fs.h>
197 #endif /* HAVE_SYS_FS_PC_FS_H */
198 #ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H
199 # include <msdosfs/msdosfsmount.h>
200 #endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */
201 #ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H
202 # include <fs/msdosfs/msdosfsmount.h>
203 #endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */
205 #ifdef HAVE_RPC_RPC_H
206 # include <rpc/rpc.h>
207 #endif /* HAVE_RPC_RPC_H */
208 #ifdef HAVE_RPC_TYPES_H
209 # include <rpc/types.h>
210 #endif /* HAVE_RPC_TYPES_H */
211 /* Prevent multiple inclusion on Ultrix 4 */
212 #if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
213 # include <rpc/xdr.h>
214 #endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
216 /* ALWAYS INCLUDE AM-UTILS' SPECIFIC NFS PROTOCOL HEADER NEXT! */