1174294Sobrien/*
2174294Sobrien * Copyright (c) 1997-2006 Erez Zadok
3174294Sobrien * Copyright (c) 1990 Jan-Simon Pendry
4174294Sobrien * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5174294Sobrien * Copyright (c) 1990 The Regents of the University of California.
6174294Sobrien * All rights reserved.
7174294Sobrien *
8174294Sobrien * This code is derived from software contributed to Berkeley by
9174294Sobrien * Jan-Simon Pendry at Imperial College, London.
10174294Sobrien *
11174294Sobrien * Redistribution and use in source and binary forms, with or without
12174294Sobrien * modification, are permitted provided that the following conditions
13174294Sobrien * are met:
14174294Sobrien * 1. Redistributions of source code must retain the above copyright
15174294Sobrien *    notice, this list of conditions and the following disclaimer.
16174294Sobrien * 2. Redistributions in binary form must reproduce the above copyright
17174294Sobrien *    notice, this list of conditions and the following disclaimer in the
18174294Sobrien *    documentation and/or other materials provided with the distribution.
19174294Sobrien * 3. All advertising materials mentioning features or use of this software
20174294Sobrien *    must display the following acknowledgment:
21174294Sobrien *      This product includes software developed by the University of
22174294Sobrien *      California, Berkeley and its contributors.
23174294Sobrien * 4. Neither the name of the University nor the names of its contributors
24174294Sobrien *    may be used to endorse or promote products derived from this software
25174294Sobrien *    without specific prior written permission.
26174294Sobrien *
27174294Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28174294Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29174294Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30174294Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31174294Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32174294Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33174294Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34174294Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35174294Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36174294Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37174294Sobrien * SUCH DAMAGE.
38174294Sobrien *
39174294Sobrien *
40174294Sobrien * File: am-utils/include/mount_headers1.h
41174294Sobrien *
42174294Sobrien */
43174294Sobrien
44174294Sobrien
4582794Sobrien#ifdef HAVE_SYS_TYPES_H
4682794Sobrien# include <sys/types.h>
4782794Sobrien#endif /* HAVE_SYS_TYPES_H */
4882794Sobrien#ifdef HAVE_SYS_ERRNO_H
4982794Sobrien# include <sys/errno.h>
5082794Sobrien#endif /* HAVE_SYS_ERRNO_H */
5182794Sobrien#ifdef HAVE_SYS_PARAM_H
5282794Sobrien# include <sys/param.h>
5382794Sobrien#endif /* HAVE_SYS_PARAM_H */
5482794Sobrien#ifdef HAVE_SYS_TIME_H
5582794Sobrien# include <sys/time.h>
5682794Sobrien#endif /* HAVE_SYS_TIME_H */
5782794Sobrien#ifdef HAVE_SYS_UCRED_H
5882794Sobrien# include <sys/ucred.h>
5982794Sobrien#endif /* HAVE_SYS_UCRED_H */
6082794Sobrien#ifdef HAVE_SYS_SOCKET_H
6182794Sobrien# include <sys/socket.h>
6282794Sobrien#endif /* HAVE_SYS_SOCKET_H */
6382794Sobrien#ifdef HAVE_NETINET_IN_H
6482794Sobrien# include <netinet/in.h>
6582794Sobrien#endif /* HAVE_NETINET_IN_H */
6682794Sobrien#ifdef HAVE_NET_IF_H
6782794Sobrien# include <net/if.h>
6882794Sobrien#endif /* HAVE_NET_IF_H */
6982794Sobrien#ifdef HAVE_STDIO_H
7082794Sobrien# include <stdio.h>
7182794Sobrien#endif /* HAVE_STDIO_H */
7282794Sobrien
7382794Sobrien#ifndef KERNEL
7482794Sobrien# define KERNEL_off_for_now_breaks_FreeBSD
7582794Sobrien#endif /* not KERNEL */
7682794Sobrien
7782794Sobrien#ifdef HAVE_SYS_MNTENT_H
7882794Sobrien# include <sys/mntent.h>
7982794Sobrien#endif /* HAVE_SYS_MNTENT_H */
8082794Sobrien#ifdef HAVE_MNTENT_H
8182794Sobrien# include <mntent.h>
8282794Sobrien#endif /* HAVE_MNTENT_H */
8382794Sobrien#ifdef HAVE_SYS_MNTTAB_H
8482794Sobrien# include <sys/mnttab.h>
8582794Sobrien#endif /* HAVE_SYS_MNTTAB_H */
8682794Sobrien#if defined(HAVE_MNTTAB_H) && !defined(MNTTAB)
8782794Sobrien/*
8882794Sobrien * Do not include it if MNTTAB is already defined because it probably
8982794Sobrien * came from <sys/mnttab.h> and we do not want conflicting definitions.
9082794Sobrien */
9182794Sobrien# include <mnttab.h>
9282794Sobrien#endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */
9382794Sobrien
9482794Sobrien#ifdef HAVE_SYS_MOUNT_H
9582794Sobrien# ifndef NFSCLIENT
9682794Sobrien#  define NFSCLIENT
9782794Sobrien# endif /* not NFSCLIENT */
9882794Sobrien# ifndef PCFS
9982794Sobrien#  define PCFS
10082794Sobrien# endif /* not PCFS */
10182794Sobrien# ifndef LOFS
10282794Sobrien#  define LOFS
10382794Sobrien# endif /* not LOFS */
10482794Sobrien# ifndef RFS
10582794Sobrien#  define RFS
10682794Sobrien# endif /* not RFS */
10782794Sobrien# ifndef MSDOSFS
10882794Sobrien#  define MSDOSFS
10982794Sobrien# endif /* not MSDOSFS */
11082794Sobrien# ifndef MFS
111119679Smbr#  define MFS 1
11282794Sobrien# endif /* not MFS */
11382794Sobrien# ifndef CD9660
11482794Sobrien#  define CD9660
11582794Sobrien# endif /* not CD9660 */
11682794Sobrien# ifndef NFS
11782794Sobrien#  define NFS
11882794Sobrien# endif /* not NFS */
11982794Sobrien# include <sys/mount.h>
12082794Sobrien#endif /* HAVE_SYS_MOUNT_H */
12182794Sobrien
12282794Sobrien#ifdef HAVE_SYS_VMOUNT_H
12382794Sobrien# include <sys/vmount.h>
12482794Sobrien#endif /* HAVE_SYS_VMOUNT_H */
12582794Sobrien
12682794Sobrien/*
12782794Sobrien * There is no point in including this on a glibc2 system
12882794Sobrien * we're only asking for trouble
12982794Sobrien */
13082794Sobrien#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2)
13182794Sobrien/*
13282794Sobrien * There's a conflict of definitions on redhat alpha linux between
13382794Sobrien * <netinet/in.h> and <linux/fs.h>.
13482794Sobrien * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64
13582794Sobrien * between <netinet/in.h> and <linux/byteorder/generic.h> (2.1 kernels).
13682794Sobrien */
13782794Sobrien# ifdef HAVE_SOCKETBITS_H
13882794Sobrien#  define _LINUX_SOCKET_H
13982794Sobrien#  undef BLKFLSBUF
14082794Sobrien#  undef BLKGETSIZE
14182794Sobrien#  undef BLKRAGET
14282794Sobrien#  undef BLKRASET
14382794Sobrien#  undef BLKROGET
14482794Sobrien#  undef BLKROSET
14582794Sobrien#  undef BLKRRPART
14682794Sobrien#  undef MS_MGC_VAL
14782794Sobrien#  undef MS_RMT_MASK
14882794Sobrien# endif /* HAVE_SOCKETBITS_H */
14982794Sobrien# ifdef HAVE_LINUX_POSIX_TYPES_H
15082794Sobrien#  include <linux/posix_types.h>
15182794Sobrien# endif /* HAVE_LINUX_POSIX_TYPES_H */
15282794Sobrien# ifndef _LINUX_BYTEORDER_GENERIC_H
15382794Sobrien#  define _LINUX_BYTEORDER_GENERIC_H
15482794Sobrien# endif /* _LINUX_BYTEORDER_GENERIC_H */
15582794Sobrien# ifndef _LINUX_STRING_H_
15682794Sobrien#  define _LINUX_STRING_H_
15782794Sobrien# endif /* not _LINUX_STRING_H_ */
15882794Sobrien# ifdef HAVE_LINUX_KDEV_T_H
15982794Sobrien#  define __KERNEL__
16082794Sobrien#  include <linux/kdev_t.h>
16182794Sobrien#  undef __KERNEL__
16282794Sobrien# endif /* HAVE_LINUX_KDEV_T_H */
16382794Sobrien# ifdef HAVE_LINUX_LIST_H
16482794Sobrien#  define __KERNEL__
16582794Sobrien#  include <linux/list.h>
16682794Sobrien#  undef __KERNEL__
16782794Sobrien# endif /* HAVE_LINUX_LIST_H */
16882794Sobrien# include <linux/fs.h>
16982794Sobrien#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */
17082794Sobrien
17182794Sobrien#ifdef HAVE_SYS_FS_TYPES_H
17282794Sobrien# include <sys/fs_types.h>
17382794Sobrien#endif /* HAVE_SYS_FS_TYPES_H */
17482794Sobrien
17582794Sobrien#ifdef HAVE_UFS_UFS_MOUNT_H
17682794Sobrien# include <ufs/ufs_mount.h>
17782794Sobrien#endif /* HAVE_UFS_UFS_MOUNT_H */
178174294Sobrien#ifdef	HAVE_UFS_UFS_UFSMOUNT_H_off
179174294Sobrien# error do not include this file here because on *bsd it
180174294Sobrien# error causes errors with other header files.  Instead, add it to the
181174294Sobrien# error specific conf/nfs_prot_*.h file.
182174294Sobrien# include <ufs/ufs/ufsmount.h>
183174294Sobrien#endif	/* HAVE_UFS_UFS_UFSMOUNT_H_off */
18482794Sobrien
18582794Sobrien#ifdef HAVE_CDFS_CDFS_MOUNT_H
18682794Sobrien# include <cdfs/cdfs_mount.h>
18782794Sobrien#endif /* HAVE_CDFS_CDFS_MOUNT_H */
18882794Sobrien#ifdef HAVE_CDFS_CDFSMOUNT_H
18982794Sobrien# include <cdfs/cdfsmount.h>
19082794Sobrien#endif /* HAVE_CDFS_CDFSMOUNT_H */
19182794Sobrien#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H
19282794Sobrien# include <isofs/cd9660/cd9660_mount.h>
19382794Sobrien#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
19482794Sobrien
195174294Sobrien#ifdef HAVE_SYS_FS_PC_FS_H
196174294Sobrien# include <sys/fs/pc_fs.h>
197174294Sobrien#endif /* HAVE_SYS_FS_PC_FS_H */
198174294Sobrien#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H
199174294Sobrien# include <msdosfs/msdosfsmount.h>
200174294Sobrien#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */
201174294Sobrien#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H
202174294Sobrien# include <fs/msdosfs/msdosfsmount.h>
203174294Sobrien#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */
204174294Sobrien
20582794Sobrien#ifdef HAVE_RPC_RPC_H
20682794Sobrien# include <rpc/rpc.h>
20782794Sobrien#endif /* HAVE_RPC_RPC_H */
20882794Sobrien#ifdef HAVE_RPC_TYPES_H
20982794Sobrien# include <rpc/types.h>
21082794Sobrien#endif /* HAVE_RPC_TYPES_H */
21182794Sobrien/* Prevent multiple inclusion on Ultrix 4 */
21282794Sobrien#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
21382794Sobrien# include <rpc/xdr.h>
21482794Sobrien#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
21582794Sobrien
21682794Sobrien/* ALWAYS INCLUDE AM-UTILS' SPECIFIC NFS PROTOCOL HEADER NEXT! */
217