1 /*	$NetBSD: mount_headers1.h,v 1.1.1.2 2009/03/20 20:26:55 christos Exp $	*/
2 
3 /*
4  * Copyright (c) 1997-2009 Erez Zadok
5  * Copyright (c) 1990 Jan-Simon Pendry
6  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
7  * Copyright (c) 1990 The Regents of the University of California.
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. All advertising materials mentioning features or use of this software
22  *    must display the following acknowledgment:
23  *      This product includes software developed by the University of
24  *      California, Berkeley and its contributors.
25  * 4. Neither the name of the University nor the names of its contributors
26  *    may be used to endorse or promote products derived from this software
27  *    without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39  * SUCH DAMAGE.
40  *
41  *
42  * File: am-utils/include/mount_headers1.h
43  *
44  */
45 
46 
47 #ifdef HAVE_SYS_TYPES_H
48 # include <sys/types.h>
49 #endif /* HAVE_SYS_TYPES_H */
50 #ifdef HAVE_SYS_ERRNO_H
51 # include <sys/errno.h>
52 #endif /* HAVE_SYS_ERRNO_H */
53 #ifdef HAVE_SYS_PARAM_H
54 # include <sys/param.h>
55 #endif /* HAVE_SYS_PARAM_H */
56 #ifdef HAVE_SYS_TIME_H
57 # include <sys/time.h>
58 #endif /* HAVE_SYS_TIME_H */
59 #ifdef HAVE_SYS_UCRED_H
60 # include <sys/ucred.h>
61 #endif /* HAVE_SYS_UCRED_H */
62 #ifdef HAVE_SYS_SOCKET_H
63 # include <sys/socket.h>
64 #endif /* HAVE_SYS_SOCKET_H */
65 #ifdef HAVE_NETINET_IN_H
66 # include <netinet/in.h>
67 #endif /* HAVE_NETINET_IN_H */
68 #ifdef HAVE_NET_IF_H
69 # include <net/if.h>
70 #endif /* HAVE_NET_IF_H */
71 #ifdef HAVE_STDIO_H
72 # include <stdio.h>
73 #endif /* HAVE_STDIO_H */
74 
75 #ifndef KERNEL
76 # define KERNEL_off_for_now_breaks_FreeBSD
77 #endif /* not KERNEL */
78 
79 #ifdef HAVE_SYS_MNTENT_H
80 # include <sys/mntent.h>
81 #endif /* HAVE_SYS_MNTENT_H */
82 #ifdef HAVE_MNTENT_H
83 # include <mntent.h>
84 #endif /* HAVE_MNTENT_H */
85 #ifdef HAVE_SYS_MNTTAB_H
86 # include <sys/mnttab.h>
87 #endif /* HAVE_SYS_MNTTAB_H */
88 #if defined(HAVE_MNTTAB_H) && !defined(MNTTAB)
89 /*
90  * Do not include it if MNTTAB is already defined because it probably
91  * came from <sys/mnttab.h> and we do not want conflicting definitions.
92  */
93 # include <mnttab.h>
94 #endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */
95 
96 #ifdef HAVE_SYS_MOUNT_H
97 # ifndef NFSCLIENT
98 #  define NFSCLIENT
99 # endif /* not NFSCLIENT */
100 # ifndef PCFS
101 #  define PCFS
102 # endif /* not PCFS */
103 # ifndef LOFS
104 #  define LOFS
105 # endif /* not LOFS */
106 # ifndef RFS
107 #  define RFS
108 # endif /* not RFS */
109 # ifndef MSDOSFS
110 #  define MSDOSFS
111 # endif /* not MSDOSFS */
112 # ifndef MFS
113 #  define MFS 1
114 # endif /* not MFS */
115 # ifndef CD9660
116 #  define CD9660
117 # endif /* not CD9660 */
118 # ifndef NFS
119 #  define NFS
120 # endif /* not NFS */
121 # include <sys/mount.h>
122 #endif /* HAVE_SYS_MOUNT_H */
123 
124 #ifdef HAVE_SYS_VMOUNT_H
125 # include <sys/vmount.h>
126 #endif /* HAVE_SYS_VMOUNT_H */
127 
128 /*
129  * There is no point in including this on a glibc2 system
130  * we're only asking for trouble
131  */
132 #if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2)
133 /*
134  * There's a conflict of definitions on redhat alpha linux between
135  * <netinet/in.h> and <linux/fs.h>.
136  * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64
137  * between <netinet/in.h> and <linux/byteorder/generic.h> (2.1 kernels).
138  */
139 # ifdef HAVE_SOCKETBITS_H
140 #  define _LINUX_SOCKET_H
141 #  undef BLKFLSBUF
142 #  undef BLKGETSIZE
143 #  undef BLKRAGET
144 #  undef BLKRASET
145 #  undef BLKROGET
146 #  undef BLKROSET
147 #  undef BLKRRPART
148 #  undef MS_MGC_VAL
149 #  undef MS_RMT_MASK
150 # endif /* HAVE_SOCKETBITS_H */
151 # ifdef HAVE_LINUX_POSIX_TYPES_H
152 #  include <linux/posix_types.h>
153 # endif /* HAVE_LINUX_POSIX_TYPES_H */
154 # ifndef _LINUX_BYTEORDER_GENERIC_H
155 #  define _LINUX_BYTEORDER_GENERIC_H
156 # endif /* _LINUX_BYTEORDER_GENERIC_H */
157 # ifndef _LINUX_STRING_H_
158 #  define _LINUX_STRING_H_
159 # endif /* not _LINUX_STRING_H_ */
160 # ifdef HAVE_LINUX_KDEV_T_H
161 #  define __KERNEL__
162 #  include <linux/kdev_t.h>
163 #  undef __KERNEL__
164 # endif /* HAVE_LINUX_KDEV_T_H */
165 # ifdef HAVE_LINUX_LIST_H
166 #  define __KERNEL__
167 #  include <linux/list.h>
168 #  undef __KERNEL__
169 # endif /* HAVE_LINUX_LIST_H */
170 # include <linux/fs.h>
171 #endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */
172 
173 #ifdef HAVE_SYS_FS_TYPES_H
174 # include <sys/fs_types.h>
175 #endif /* HAVE_SYS_FS_TYPES_H */
176 
177 #ifdef HAVE_UFS_UFS_MOUNT_H
178 # include <ufs/ufs_mount.h>
179 #endif /* HAVE_UFS_UFS_MOUNT_H */
180 #ifdef	HAVE_UFS_UFS_UFSMOUNT_H_off
181 # error do not include this file here because on *bsd it
182 # error causes errors with other header files.  Instead, add it to the
183 # error specific conf/nfs_prot_*.h file.
184 # include <ufs/ufs/ufsmount.h>
185 #endif	/* HAVE_UFS_UFS_UFSMOUNT_H_off */
186 
187 #ifdef HAVE_CDFS_CDFS_MOUNT_H
188 # include <cdfs/cdfs_mount.h>
189 #endif /* HAVE_CDFS_CDFS_MOUNT_H */
190 #ifdef HAVE_CDFS_CDFSMOUNT_H
191 # include <cdfs/cdfsmount.h>
192 #endif /* HAVE_CDFS_CDFSMOUNT_H */
193 #ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H
194 # include <isofs/cd9660/cd9660_mount.h>
195 #endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
196 
197 #ifdef HAVE_FS_UDF_UDF_MOUNT_H
198 # include <fs/udf/udf_mount.h>
199 #endif /* HAVE_FS_UDF_UDF_MOUNT_H */
200 
201 #ifdef HAVE_SYS_FS_PC_FS_H
202 # include <sys/fs/pc_fs.h>
203 #endif /* HAVE_SYS_FS_PC_FS_H */
204 #ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H
205 # include <msdosfs/msdosfsmount.h>
206 #endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */
207 #ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H
208 # include <fs/msdosfs/msdosfsmount.h>
209 #endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */
210 
211 #ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H
212 # include <fs/tmpfs/tmpfs_args.h>
213 #endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */
214 
215 #ifdef HAVE_FS_EFS_EFS_MOUNT_H
216 # include <fs/efs/efs_mount.h>
217 #endif /* HAVE_FS_EFS_EFS_MOUNT_H */
218 
219 #ifdef HAVE_RPC_RPC_H
220 # include <rpc/rpc.h>
221 #endif /* HAVE_RPC_RPC_H */
222 #ifdef HAVE_RPC_TYPES_H
223 # include <rpc/types.h>
224 #endif /* HAVE_RPC_TYPES_H */
225 /* Prevent multiple inclusion on Ultrix 4 */
226 #if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
227 # include <rpc/xdr.h>
228 #endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
229 
230 /* ALWAYS INCLUDE AM-UTILS' SPECIFIC NFS PROTOCOL HEADER NEXT! */
231