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