2 * Copyright (c) 1997-2014 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. Neither the name of the University nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * File: am-utils/include/mount_headers1.h
41 #ifdef HAVE_SYS_TYPES_H
42 # include <sys/types.h>
43 #endif /* HAVE_SYS_TYPES_H */
44 #ifdef HAVE_SYS_ERRNO_H
45 # include <sys/errno.h>
46 #endif /* HAVE_SYS_ERRNO_H */
47 #ifdef HAVE_SYS_PARAM_H
48 # include <sys/param.h>
49 #endif /* HAVE_SYS_PARAM_H */
50 #ifdef HAVE_SYS_TIME_H
51 # include <sys/time.h>
52 #endif /* HAVE_SYS_TIME_H */
53 #ifdef HAVE_SYS_UCRED_H
54 # include <sys/ucred.h>
55 #endif /* HAVE_SYS_UCRED_H */
56 #ifdef HAVE_SYS_SOCKET_H
57 # include <sys/socket.h>
58 #endif /* HAVE_SYS_SOCKET_H */
59 #ifdef HAVE_NETINET_IN_H
60 # include <netinet/in.h>
61 #endif /* HAVE_NETINET_IN_H */
64 #endif /* HAVE_NET_IF_H */
67 #endif /* HAVE_STDIO_H */
70 # define KERNEL_off_for_now_breaks_FreeBSD
71 #endif /* not KERNEL */
73 #ifdef HAVE_SYS_MNTENT_H
74 # include <sys/mntent.h>
75 #endif /* HAVE_SYS_MNTENT_H */
78 #endif /* HAVE_MNTENT_H */
79 #ifdef HAVE_SYS_MNTTAB_H
80 # include <sys/mnttab.h>
81 #endif /* HAVE_SYS_MNTTAB_H */
82 #if defined(HAVE_MNTTAB_H) && !defined(MNTTAB)
84 * Do not include it if MNTTAB is already defined because it probably
85 * came from <sys/mnttab.h> and we do not want conflicting definitions.
88 #endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */
90 #ifdef HAVE_SYS_MOUNT_H
93 # endif /* not NFSCLIENT */
96 # endif /* not PCFS */
99 # endif /* not LOFS */
102 # endif /* not RFS */
105 # endif /* not MSDOSFS */
108 # endif /* not MFS */
111 # endif /* not CD9660 */
114 # endif /* not NFS */
115 # include <sys/mount.h>
116 #endif /* HAVE_SYS_MOUNT_H */
118 #ifdef HAVE_SYS_VMOUNT_H
119 # include <sys/vmount.h>
120 #endif /* HAVE_SYS_VMOUNT_H */
123 # if !defined(__GLIBC__) || __GLIBC__ < 2
125 * There's a conflict of definitions on redhat alpha linux between
126 * <netinet/in.h> and <linux/fs.h>.
127 * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64
128 * between <netinet/in.h> and <linux/byteorder/generic.h> (2.1 kernels).
130 # ifdef HAVE_SOCKETBITS_H
131 # define _LINUX_SOCKET_H
141 # endif /* HAVE_SOCKETBITS_H */
142 # ifdef HAVE_LINUX_POSIX_TYPES_H
143 # include <linux/posix_types.h>
144 # endif /* HAVE_LINUX_POSIX_TYPES_H */
145 # ifndef _LINUX_BYTEORDER_GENERIC_H
146 # define _LINUX_BYTEORDER_GENERIC_H
147 # endif /* _LINUX_BYTEORDER_GENERIC_H */
148 # ifndef _LINUX_STRING_H_
149 # define _LINUX_STRING_H_
150 # endif /* not _LINUX_STRING_H_ */
151 # ifdef HAVE_LINUX_KDEV_T_H
153 # include <linux/kdev_t.h>
155 # endif /* HAVE_LINUX_KDEV_T_H */
156 # ifdef HAVE_LINUX_LIST_H
158 # include <linux/list.h>
160 # endif /* HAVE_LINUX_LIST_H */
161 # include <linux/fs.h>
163 # include <linux/fs.h>
164 # endif/* (!__GLIBC__ || __GLIBC__ < 2) */
165 #endif /* HAVE_LINUX_FS_H */
167 #ifdef HAVE_SYS_FS_TYPES_H
168 # include <sys/fs_types.h>
169 #endif /* HAVE_SYS_FS_TYPES_H */
171 #ifdef HAVE_UFS_UFS_MOUNT_H
172 # include <ufs/ufs_mount.h>
173 #endif /* HAVE_UFS_UFS_MOUNT_H */
174 #ifdef HAVE_UFS_UFS_UFSMOUNT_H_off
175 # error do not include this file here because on *bsd it
176 # error causes errors with other header files. Instead, add it to the
177 # error specific conf/nfs_prot_*.h file.
178 # include <ufs/ufs/ufsmount.h>
179 #endif /* HAVE_UFS_UFS_UFSMOUNT_H_off */
181 #ifdef HAVE_CDFS_CDFS_MOUNT_H
182 # include <cdfs/cdfs_mount.h>
183 #endif /* HAVE_CDFS_CDFS_MOUNT_H */
184 #ifdef HAVE_CDFS_CDFSMOUNT_H
185 # include <cdfs/cdfsmount.h>
186 #endif /* HAVE_CDFS_CDFSMOUNT_H */
187 #ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H
188 # include <isofs/cd9660/cd9660_mount.h>
189 #endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
191 #ifdef HAVE_FS_UDF_UDF_MOUNT_H
192 # include <fs/udf/udf_mount.h>
193 #endif /* HAVE_FS_UDF_UDF_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_FS_TMPFS_TMPFS_ARGS_H
206 # include <fs/tmpfs/tmpfs_args.h>
207 #endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */
209 #ifdef HAVE_FS_EFS_EFS_MOUNT_H
210 # include <fs/efs/efs_mount.h>
211 #endif /* HAVE_FS_EFS_EFS_MOUNT_H */
213 #ifdef HAVE_RPC_RPC_H
214 # include <rpc/rpc.h>
215 #endif /* HAVE_RPC_RPC_H */
216 #ifdef HAVE_RPC_TYPES_H
217 # include <rpc/types.h>
218 #endif /* HAVE_RPC_TYPES_H */
219 /* Prevent multiple inclusion on Ultrix 4 */
220 #if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
221 # include <rpc/xdr.h>
222 #endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
224 /* ALWAYS INCLUDE AM-UTILS' SPECIFIC NFS PROTOCOL HEADER NEXT! */