1*4da6d876Schristos /* $NetBSD: am_compat.h,v 1.4 2015/01/17 17:46:31 christos Exp $ */ 2a53f50b9Schristos 3a53f50b9Schristos /* 4*4da6d876Schristos * Copyright (c) 1997-2014 Erez Zadok 5a53f50b9Schristos * Copyright (c) 1990 Jan-Simon Pendry 6a53f50b9Schristos * Copyright (c) 1990 Imperial College of Science, Technology & Medicine 7a53f50b9Schristos * Copyright (c) 1990 The Regents of the University of California. 8a53f50b9Schristos * All rights reserved. 9a53f50b9Schristos * 10a53f50b9Schristos * This code is derived from software contributed to Berkeley by 11a53f50b9Schristos * Jan-Simon Pendry at Imperial College, London. 12a53f50b9Schristos * 13a53f50b9Schristos * Redistribution and use in source and binary forms, with or without 14a53f50b9Schristos * modification, are permitted provided that the following conditions 15a53f50b9Schristos * are met: 16a53f50b9Schristos * 1. Redistributions of source code must retain the above copyright 17a53f50b9Schristos * notice, this list of conditions and the following disclaimer. 18a53f50b9Schristos * 2. Redistributions in binary form must reproduce the above copyright 19a53f50b9Schristos * notice, this list of conditions and the following disclaimer in the 20a53f50b9Schristos * documentation and/or other materials provided with the distribution. 21*4da6d876Schristos * 3. Neither the name of the University nor the names of its contributors 22a53f50b9Schristos * may be used to endorse or promote products derived from this software 23a53f50b9Schristos * without specific prior written permission. 24a53f50b9Schristos * 25a53f50b9Schristos * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 26a53f50b9Schristos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27a53f50b9Schristos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28a53f50b9Schristos * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 29a53f50b9Schristos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30a53f50b9Schristos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31a53f50b9Schristos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32a53f50b9Schristos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33a53f50b9Schristos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34a53f50b9Schristos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35a53f50b9Schristos * SUCH DAMAGE. 36a53f50b9Schristos * 37a53f50b9Schristos * 38a53f50b9Schristos * File: am-utils/include/am_compat.h 39a53f50b9Schristos * 40a53f50b9Schristos */ 41a53f50b9Schristos 42a53f50b9Schristos /* 43a53f50b9Schristos * 44a53f50b9Schristos * This file contains compatibility functions and macros, all of which 45a53f50b9Schristos * should be auto-discovered, but for one reason or another (mostly 46a53f50b9Schristos * brain-damage on the part of system designers and header files) they cannot. 47a53f50b9Schristos * 48a53f50b9Schristos * Each compatibility macro/function must include instructions on how/when 49a53f50b9Schristos * it can be removed the am-utils code. 50a53f50b9Schristos * 51a53f50b9Schristos */ 52a53f50b9Schristos 53a53f50b9Schristos #ifndef _AM_COMPAT_H 54a53f50b9Schristos # define _AM_COMPAT_H 55a53f50b9Schristos 56a53f50b9Schristos /* 57a53f50b9Schristos * incomplete mount options definitions (sunos4, irix6, linux, etc.) 58a53f50b9Schristos */ 59a53f50b9Schristos 60a53f50b9Schristos 61a53f50b9Schristos /* 62a53f50b9Schristos * Complete MNTTAB_OPT_* options based on MNT2_NFS_OPT_* mount options. 63a53f50b9Schristos */ 64a53f50b9Schristos #if defined(MNT2_NFS_OPT_ACDIRMAX) && !defined(MNTTAB_OPT_ACDIRMAX) 65a53f50b9Schristos # define MNTTAB_OPT_ACDIRMAX "acdirmax" 66a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_ACDIRMAX) && !defined(MNTTAB_OPT_ACDIRMAX) */ 67a53f50b9Schristos 68a53f50b9Schristos #if defined(MNT2_NFS_OPT_ACDIRMIN) && !defined(MNTTAB_OPT_ACDIRMIN) 69a53f50b9Schristos # define MNTTAB_OPT_ACDIRMIN "acdirmin" 70a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_ACDIRMIN) && !defined(MNTTAB_OPT_ACDIRMIN) */ 71a53f50b9Schristos 72a53f50b9Schristos #if defined(MNT2_NFS_OPT_ACREGMAX) && !defined(MNTTAB_OPT_ACREGMAX) 73a53f50b9Schristos # define MNTTAB_OPT_ACREGMAX "acregmax" 74a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_ACREGMAX) && !defined(MNTTAB_OPT_ACREGMAX) */ 75a53f50b9Schristos 76a53f50b9Schristos #if defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNTTAB_OPT_ACREGMIN) 77a53f50b9Schristos # define MNTTAB_OPT_ACREGMIN "acregmin" 78a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNTTAB_OPT_ACREGMIN) */ 79a53f50b9Schristos 80a53f50b9Schristos #if !defined(MNTTAB_OPT_IGNORE) 81a53f50b9Schristos /* SunOS 4.1.x and others define "noauto" option, but not "auto" */ 82a53f50b9Schristos # if defined(MNTTAB_OPT_NOAUTO) && !defined(MNTTAB_OPT_AUTO) 83a53f50b9Schristos # define MNTTAB_OPT_AUTO "auto" 84a53f50b9Schristos # endif /* defined(MNTTAB_OPT_NOAUTO) && !defined(MNTTAB_OPT_AUTO) */ 85a53f50b9Schristos #endif /* !defined(MNTTAB_OPT_IGNORE) */ 86a53f50b9Schristos 87a53f50b9Schristos #if defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC) 88a53f50b9Schristos # define MNTTAB_OPT_NOAC "noac" 89a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC) */ 90a53f50b9Schristos 91*4da6d876Schristos #if defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL) 92*4da6d876Schristos # define MNTTAB_OPT_NOACL "noacl" 93*4da6d876Schristos #endif /* defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL) */ 94*4da6d876Schristos 95a53f50b9Schristos #if defined(MNT2_NFS_OPT_NOCONN) && !defined(MNTTAB_OPT_NOCONN) 96a53f50b9Schristos # define MNTTAB_OPT_NOCONN "noconn" 97a53f50b9Schristos # ifndef MNTTAB_OPT_CONN 98a53f50b9Schristos # define MNTTAB_OPT_CONN "conn" 99a53f50b9Schristos # endif /* MNTTAB_OPT_CONN */ 100a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_NOCONN) && !defined(MNTTAB_OPT_NOCONN) */ 101a53f50b9Schristos 102a53f50b9Schristos #if defined(MNT2_NFS_OPT_PGTHRESH) && !defined(MNTTAB_OPT_PGTHRESH) 103a53f50b9Schristos # define MNTTAB_OPT_PGTHRESH "pgthresh" 104a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_PGTHRESH) && !defined(MNTTAB_OPT_PGTHRESH) */ 105a53f50b9Schristos 106a53f50b9Schristos #if defined(MNT2_NFS_OPT_PRIVATE) && !defined(MNTTAB_OPT_PRIVATE) 107a53f50b9Schristos # define MNTTAB_OPT_PRIVATE "private" 108a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_PRIVATE) && !defined(MNTTAB_OPT_PRIVATE) */ 109a53f50b9Schristos 110a53f50b9Schristos #if defined(MNT2_NFS_OPT_RETRANS) && !defined(MNTTAB_OPT_RETRANS) 111a53f50b9Schristos # define MNTTAB_OPT_RETRANS "retrans" 112a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_RETRANS) && !defined(MNTTAB_OPT_RETRANS) */ 113a53f50b9Schristos 114a53f50b9Schristos #if defined(MNT2_NFS_OPT_RSIZE) && !defined(MNTTAB_OPT_RSIZE) 115a53f50b9Schristos # define MNTTAB_OPT_RSIZE "rsize" 116a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_RSIZE) && !defined(MNTTAB_OPT_RSIZE) */ 117a53f50b9Schristos 118a53f50b9Schristos #if defined(MNT2_NFS_OPT_SOFT) && !defined(MNTTAB_OPT_SOFT) 119a53f50b9Schristos # define MNTTAB_OPT_SOFT "soft" 120a53f50b9Schristos # ifndef MNTTAB_OPT_HARD 121a53f50b9Schristos # define MNTTAB_OPT_HARD "hard" 122a53f50b9Schristos # endif /* not MNTTAB_OPT_HARD */ 123a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_SOFT) && !defined(MNTTAB_OPT_SOFT) */ 124a53f50b9Schristos 125a53f50b9Schristos #if defined(MNT2_NFS_OPT_TIMEO) && !defined(MNTTAB_OPT_TIMEO) 126a53f50b9Schristos # define MNTTAB_OPT_TIMEO "timeo" 127a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_TIMEO) && !defined(MNTTAB_OPT_TIMEO) */ 128a53f50b9Schristos 129a53f50b9Schristos #if defined(MNT2_NFS_OPT_WSIZE) && !defined(MNTTAB_OPT_WSIZE) 130a53f50b9Schristos # define MNTTAB_OPT_WSIZE "wsize" 131a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_WSIZE) && !defined(MNTTAB_OPT_WSIZE) */ 132a53f50b9Schristos 133a53f50b9Schristos #if defined(MNT2_NFS_OPT_MAXGRPS) && !defined(MNTTAB_OPT_MAXGROUPS) 134a53f50b9Schristos # define MNTTAB_OPT_MAXGROUPS "maxgroups" 135a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_MAXGRPS) && !defined(MNTTAB_OPT_MAXGROUPS) */ 136a53f50b9Schristos 137a53f50b9Schristos #if defined(MNT2_NFS_OPT_PROPLIST) && !defined(MNTTAB_OPT_PROPLIST) 138a53f50b9Schristos # define MNTTAB_OPT_PROPLIST "proplist" 139a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_PROPLIST) && !defined(MNTTAB_OPT_PROPLIST) */ 140a53f50b9Schristos 141a53f50b9Schristos #if defined(MNT2_NFS_OPT_NONLM) && !defined(MNTTAB_OPT_NOLOCK) 142a53f50b9Schristos # define MNTTAB_OPT_NOLOCK "nolock" 143a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_NONLM) && !defined(MNTTAB_OPT_NOLOCK) */ 144a53f50b9Schristos 145a53f50b9Schristos #if defined(MNT2_NFS_OPT_XLATECOOKIE) && !defined(MNTTAB_OPT_XLATECOOKIE) 146a53f50b9Schristos # define MNTTAB_OPT_XLATECOOKIE "xlatecookie" 147a53f50b9Schristos #endif /* defined(MNT2_NFS_OPT_XLATECOOKIE) && !defined(MNTTAB_OPT_XLATECOOKIE) */ 148a53f50b9Schristos 149a53f50b9Schristos /* 150a53f50b9Schristos * Complete MNTTAB_OPT_* options based on MNT2_CDFS_OPT_* mount options. 151a53f50b9Schristos */ 152a53f50b9Schristos #if defined(MNT2_CDFS_OPT_DEFPERM) && !defined(MNTTAB_OPT_DEFPERM) 153a53f50b9Schristos # define MNTTAB_OPT_DEFPERM "defperm" 154a53f50b9Schristos #endif /* defined(MNT2_CDFS_OPT_DEFPERM) && !defined(MNTTAB_OPT_DEFPERM) */ 155a53f50b9Schristos 156a53f50b9Schristos #if defined(MNT2_CDFS_OPT_NODEFPERM) && !defined(MNTTAB_OPT_NODEFPERM) 157a53f50b9Schristos # define MNTTAB_OPT_NODEFPERM "nodefperm" 158a53f50b9Schristos /* 159a53f50b9Schristos * DEC OSF/1 V3.x/Digital UNIX V4.0 have M_NODEFPERM only, but 160a53f50b9Schristos * both mnttab ops. 161a53f50b9Schristos */ 162a53f50b9Schristos # ifndef MNTTAB_OPT_DEFPERM 163a53f50b9Schristos # define MNTTAB_OPT_DEFPERM "defperm" 164a53f50b9Schristos # endif /* not MNTTAB_OPT_DEFPERM */ 165a53f50b9Schristos #endif /* defined(MNT2_CDFS_OPT_NODEFPERM) && !defined(MNTTAB_OPT_NODEFPERM) */ 166a53f50b9Schristos 167a53f50b9Schristos #if defined(MNT2_CDFS_OPT_NOVERSION) && !defined(MNTTAB_OPT_NOVERSION) 168a53f50b9Schristos # define MNTTAB_OPT_NOVERSION "noversion" 169a53f50b9Schristos #endif /* defined(MNT2_CDFS_OPT_NOVERSION) && !defined(MNTTAB_OPT_NOVERSION) */ 170a53f50b9Schristos 171a53f50b9Schristos #if defined(MNT2_CDFS_OPT_RRIP) && !defined(MNTTAB_OPT_RRIP) 172a53f50b9Schristos # define MNTTAB_OPT_RRIP "rrip" 173a53f50b9Schristos #endif /* defined(MNT2_CDFS_OPT_RRIP) && !defined(MNTTAB_OPT_RRIP) */ 174a53f50b9Schristos #if defined(MNT2_CDFS_OPT_NORRIP) && !defined(MNTTAB_OPT_NORRIP) 175a53f50b9Schristos # define MNTTAB_OPT_NORRIP "norrip" 176a53f50b9Schristos #endif /* defined(MNT2_CDFS_OPT_NORRIP) && !defined(MNTTAB_OPT_NORRIP) */ 177a53f50b9Schristos 178a53f50b9Schristos #if defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) 179a53f50b9Schristos # define MNTTAB_OPT_GENS "gens" 180a53f50b9Schristos #endif /* defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) */ 181544d676eSchristos 182a53f50b9Schristos #if defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) 183a53f50b9Schristos # define MNTTAB_OPT_EXTATT "extatt" 184a53f50b9Schristos #endif /* defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) */ 185a53f50b9Schristos 186544d676eSchristos #if defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET) 187544d676eSchristos # define MNTTAB_OPT_NOJOLIET "nojoliet" 188544d676eSchristos #endif /* defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET) */ 189544d676eSchristos 190544d676eSchristos #if defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS) 191544d676eSchristos # define MNTTAB_OPT_NOCASETRANS "nocasetrans" 192544d676eSchristos #endif /* defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS) */ 193544d676eSchristos 194544d676eSchristos #if defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS) 195544d676eSchristos # define MNTTAB_OPT_RRCASEINS "rrcaseins" 196544d676eSchristos #endif /* defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS) */ 197544d676eSchristos 19814003705Schristos /* 19914003705Schristos * Complete MNTTAB_OPT_* options based on MNT2_UDF_OPT_* mount options. 20014003705Schristos */ 20114003705Schristos #if defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION) 20214003705Schristos # define MNTTAB_OPT_CLOSESESSION "closesession" 20314003705Schristos #endif /* defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION) */ 204544d676eSchristos 205a53f50b9Schristos /* 206a53f50b9Schristos * Complete MNTTAB_OPT_* options based on MNT2_PCFS_OPT_* mount options. 207a53f50b9Schristos */ 208a53f50b9Schristos #if defined(MNT2_PCFS_OPT_LONGNAME) && !defined(MNTTAB_OPT_LONGNAME) 209a53f50b9Schristos # define MNTTAB_OPT_LONGNAME "longnames" 210a53f50b9Schristos #endif /* defined(MNT2_PCFS_OPT_LONGNAME) && !defined(MNTTAB_OPT_LONGNAME) */ 211a53f50b9Schristos #if defined(MNT2_PCFS_OPT_NOWIN95) && !defined(MNTTAB_OPT_NOWIN95) 212a53f50b9Schristos # define MNTTAB_OPT_NOWIN95 "nowin95" 213a53f50b9Schristos #endif /* defined(MNT2_PCFS_OPT_NOWIN95) && !defined(MNTTAB_OPT_NOWIN95) */ 214a53f50b9Schristos #if defined(MNT2_PCFS_OPT_SHORTNAME) && !defined(MNTTAB_OPT_SHORTNAME) 215a53f50b9Schristos # define MNTTAB_OPT_SHORTNAME "shortnames" 216a53f50b9Schristos #endif /* defined(MNT2_PCFS_OPT_SHORTNAME) && !defined(MNTTAB_OPT_SHORTNAME) */ 217a53f50b9Schristos 218a53f50b9Schristos /* 219a53f50b9Schristos * Complete MNTTAB_OPT_* options based on MNT2_GEN_OPT_* mount options. 220a53f50b9Schristos */ 221a53f50b9Schristos #if defined(MNT2_GEN_OPT_GRPID) && !defined(MNTTAB_OPT_GRPID) 222a53f50b9Schristos # define MNTTAB_OPT_GRPID "grpid" 223a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_GRPID) && !defined(MNTTAB_OPT_GRPID) */ 224a53f50b9Schristos 225a53f50b9Schristos #if defined(MNT2_GEN_OPT_NOCACHE) && !defined(MNTTAB_OPT_NOCACHE) 226a53f50b9Schristos # define MNTTAB_OPT_NOCACHE "nocache" 227a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_NOCACHE) && !defined(MNTTAB_OPT_NOCACHE) */ 228a53f50b9Schristos 229a53f50b9Schristos #if defined(MNT2_GEN_OPT_NOSUID) && !defined(MNTTAB_OPT_NOSUID) 230a53f50b9Schristos # define MNTTAB_OPT_NOSUID "nosuid" 231a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_NOSUID) && !defined(MNTTAB_OPT_NOSUID) */ 232a53f50b9Schristos 233a53f50b9Schristos #if defined(MNT2_GEN_OPT_OVERLAY) && !defined(MNTTAB_OPT_OVERLAY) 234a53f50b9Schristos # define MNTTAB_OPT_OVERLAY "overlay" 235a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_OVERLAY) && !defined(MNTTAB_OPT_OVERLAY) */ 236a53f50b9Schristos 237a53f50b9Schristos /* 238a53f50b9Schristos * Complete MNTTAB_OPT_* options and their inverse based on MNT2_GEN_OPT_* 239a53f50b9Schristos * options. 240a53f50b9Schristos */ 241a53f50b9Schristos #if defined(MNT2_GEN_OPT_NODEV) && !defined(MNTTAB_OPT_NODEV) 242a53f50b9Schristos # define MNTTAB_OPT_NODEV "nodev" 243a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_NODEV) && !defined(MNTTAB_OPT_NODEV) */ 244a53f50b9Schristos 245a53f50b9Schristos #if defined(MNT2_GEN_OPT_NOEXEC) && !defined(MNTTAB_OPT_NOEXEC) 246a53f50b9Schristos # define MNTTAB_OPT_NOEXEC "noexec" 247a53f50b9Schristos /* this is missing under some versions of Linux */ 248a53f50b9Schristos # ifndef MNTTAB_OPT_EXEC 249a53f50b9Schristos # define MNTTAB_OPT_EXEC "exec" 250a53f50b9Schristos # endif /* not MNTTAB_OPT_EXEC */ 251a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_NOEXEC) && !defined(MNTTAB_OPT_NOEXEC) */ 252a53f50b9Schristos 253a53f50b9Schristos #if defined(MNT2_GEN_OPT_QUOTA) && !defined(MNTTAB_OPT_QUOTA) 254a53f50b9Schristos # define MNTTAB_OPT_QUOTA "quota" 255a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_QUOTA) && !defined(MNTTAB_OPT_QUOTA) */ 256a53f50b9Schristos 257a53f50b9Schristos #if defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC) 258a53f50b9Schristos # define MNTTAB_OPT_SYNC "sync" 259a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC) */ 260a53f50b9Schristos 261a53f50b9Schristos #if defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG) 262a53f50b9Schristos # define MNTTAB_OPT_LOG "log" 263a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG) */ 264a53f50b9Schristos 265a53f50b9Schristos #if defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME) 266*4da6d876Schristos # define MNTTAB_OPT_NOATIME "noatime" 267a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME) */ 268a53f50b9Schristos 269a53f50b9Schristos #if defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME) 270*4da6d876Schristos # define MNTTAB_OPT_NODEVMTIME "nodevmtime" 271a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME) */ 272a53f50b9Schristos 273a53f50b9Schristos #if defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP) 274*4da6d876Schristos # define MNTTAB_OPT_SOFTDEP "softdep" 275a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP) */ 276a53f50b9Schristos 277a53f50b9Schristos #if defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM) 278*4da6d876Schristos # define MNTTAB_OPT_SYMPERM "symperm" 279a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM) */ 280a53f50b9Schristos 281a53f50b9Schristos #if defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION) 282*4da6d876Schristos # define MNTTAB_OPT_UNION "union" 283a53f50b9Schristos #endif /* defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION) */ 284a53f50b9Schristos 285a53f50b9Schristos /* 286a53f50b9Schristos * Add missing MNTTAB_OPT_* options. 287a53f50b9Schristos */ 288a53f50b9Schristos #ifndef MNTTAB_OPT_ACTIMEO 289a53f50b9Schristos # define MNTTAB_OPT_ACTIMEO "actimeo" 290a53f50b9Schristos #endif /* not MNTTAB_OPT_ACTIMEO */ 291a53f50b9Schristos 292a53f50b9Schristos #ifndef MNTTAB_OPT_INTR 293a53f50b9Schristos # define MNTTAB_OPT_INTR "intr" 294a53f50b9Schristos #endif /* not MNTTAB_OPT_INTR */ 295a53f50b9Schristos 296a53f50b9Schristos #ifndef MNTTAB_OPT_PORT 297a53f50b9Schristos # define MNTTAB_OPT_PORT "port" 298a53f50b9Schristos #endif /* not MNTTAB_OPT_PORT */ 299a53f50b9Schristos 300a53f50b9Schristos #ifndef MNTTAB_OPT_PUBLIC 301a53f50b9Schristos # define MNTTAB_OPT_PUBLIC "public" 302a53f50b9Schristos #endif /* not MNTTAB_OPT_PUBLIC */ 303a53f50b9Schristos 304a53f50b9Schristos #ifndef MNTTAB_OPT_RETRANS 305a53f50b9Schristos # define MNTTAB_OPT_RETRANS "retrans" 306a53f50b9Schristos #endif /* not MNTTAB_OPT_RETRANS */ 307a53f50b9Schristos 308a53f50b9Schristos #ifndef MNTTAB_OPT_RETRY 309a53f50b9Schristos # define MNTTAB_OPT_RETRY "retry" 310a53f50b9Schristos #endif /* not MNTTAB_OPT_RETRY */ 311a53f50b9Schristos 312a53f50b9Schristos #ifndef MNTTAB_OPT_RO 313a53f50b9Schristos # define MNTTAB_OPT_RO "ro" 314a53f50b9Schristos #endif /* not MNTTAB_OPT_RO */ 315a53f50b9Schristos 316a53f50b9Schristos #ifndef MNTTAB_OPT_RSIZE 317a53f50b9Schristos # define MNTTAB_OPT_RSIZE "rsize" 318a53f50b9Schristos #endif /* not MNTTAB_OPT_RSIZE */ 319a53f50b9Schristos 320a53f50b9Schristos #ifndef MNTTAB_OPT_RW 321a53f50b9Schristos # define MNTTAB_OPT_RW "rw" 322a53f50b9Schristos #endif /* not MNTTAB_OPT_RW */ 323a53f50b9Schristos 324a53f50b9Schristos #ifndef MNTTAB_OPT_TIMEO 325a53f50b9Schristos # define MNTTAB_OPT_TIMEO "timeo" 326a53f50b9Schristos #endif /* not MNTTAB_OPT_TIMEO */ 327a53f50b9Schristos 328a53f50b9Schristos #ifndef MNTTAB_OPT_WSIZE 329a53f50b9Schristos # define MNTTAB_OPT_WSIZE "wsize" 330a53f50b9Schristos #endif /* not MNTTAB_OPT_WSIZE */ 331a53f50b9Schristos 332a53f50b9Schristos /* next four are useful for pcfs mounts */ 333a53f50b9Schristos #ifndef MNTTAB_OPT_USER 334a53f50b9Schristos # define MNTTAB_OPT_USER "user" 335a53f50b9Schristos #endif /* not MNTTAB_OPT_USER */ 336a53f50b9Schristos #ifndef MNTTAB_OPT_GROUP 337a53f50b9Schristos # define MNTTAB_OPT_GROUP "group" 338a53f50b9Schristos #endif /* not MNTTAB_OPT_GROUP */ 339a53f50b9Schristos #ifndef MNTTAB_OPT_MASK 340a53f50b9Schristos # define MNTTAB_OPT_MASK "mask" 341a53f50b9Schristos #endif /* not MNTTAB_OPT_MASK */ 342a53f50b9Schristos #ifndef MNTTAB_OPT_DIRMASK 343a53f50b9Schristos # define MNTTAB_OPT_DIRMASK "dirmask" 344a53f50b9Schristos #endif /* not MNTTAB_OPT_DIRMASK */ 345a53f50b9Schristos 34614003705Schristos /* useful for udf mounts */ 34714003705Schristos #ifndef MNTTAB_OPT_USER 34814003705Schristos # define MNTTAB_OPT_USER "user" 34914003705Schristos #endif /* not MNTTAB_OPT_USER */ 35014003705Schristos #ifndef MNTTAB_OPT_GROUP 35114003705Schristos # define MNTTAB_OPT_GROUP "group" 35214003705Schristos #endif /* not MNTTAB_OPT_GROUP */ 35314003705Schristos #ifndef MNTTAB_OPT_GMTOFF 35414003705Schristos # define MNTTAB_OPT_GMTOFF "gmtoff" 35514003705Schristos #endif /* not MNTTAB_OPT_GMTOFF */ 35614003705Schristos #ifndef MNTTAB_OPT_SESSIONNR 35714003705Schristos # define MNTTAB_OPT_SESSIONNR "sessionnr" 35814003705Schristos #endif /* not MNTTAB_OPT_SESSIONNR */ 35914003705Schristos 360a53f50b9Schristos /* 361a53f50b9Schristos * Incomplete filesystem definitions (sunos4, irix6, solaris2) 362a53f50b9Schristos */ 363a53f50b9Schristos #if defined(HAVE_FS_CDFS) && defined(MOUNT_TYPE_CDFS) && !defined(MNTTYPE_CDFS) 364a53f50b9Schristos # define MNTTYPE_CDFS "hsfs" 365a53f50b9Schristos #endif /* defined(HAVE_FS_CDFS) && defined(MOUNT_TYPE_CDFS) && !defined(MNTTYPE_CDFS) */ 366a53f50b9Schristos 367a53f50b9Schristos #ifndef cdfs_args_t 368a53f50b9Schristos /* 369a53f50b9Schristos * Solaris has an HSFS filesystem, but does not define hsfs_args. 370a53f50b9Schristos * XXX: the definition here for solaris is wrong, since under solaris, 371a53f50b9Schristos * hsfs_args should be a single integer used as a bit-field for options. 372a53f50b9Schristos * so this code has to be fixed later. -Erez. 373a53f50b9Schristos */ 374a53f50b9Schristos struct hsfs_args { 375a53f50b9Schristos char *fspec; /* name of filesystem to mount */ 376a53f50b9Schristos int norrip; 377a53f50b9Schristos }; 378a53f50b9Schristos # define cdfs_args_t struct hsfs_args 379a53f50b9Schristos # define HAVE_CDFS_ARGS_T_NORRIP 380a53f50b9Schristos #endif /* not cdfs_args_t */ 381a53f50b9Schristos 382a53f50b9Schristos /* 383a53f50b9Schristos * if does not define struct pc_args, assume integer bit-field (irix6) 384a53f50b9Schristos */ 385a53f50b9Schristos #if defined(HAVE_FS_PCFS) && !defined(pcfs_args_t) 386a53f50b9Schristos # define pcfs_args_t u_int 387a53f50b9Schristos #endif /* defined(HAVE_FS_PCFS) && !defined(pcfs_args_t) */ 388a53f50b9Schristos 389a53f50b9Schristos /* 390a53f50b9Schristos * if does not define struct ufs_args, assume integer bit-field (linux) 391a53f50b9Schristos */ 392a53f50b9Schristos #if defined(HAVE_FS_UFS) && !defined(ufs_args_t) 393a53f50b9Schristos # define ufs_args_t u_int 394a53f50b9Schristos #endif /* defined(HAVE_FS_UFS) && !defined(ufs_args_t) */ 395a53f50b9Schristos 396a53f50b9Schristos /* 39714003705Schristos * if does not define struct udf_args, assume integer bit-field (linux) 39814003705Schristos */ 39914003705Schristos #if defined(HAVE_FS_UDF) && !defined(udf_args_t) 40014003705Schristos # define udf_args_t u_int 40114003705Schristos #endif /* defined(HAVE_FS_UDF) && !defined(udf_args_t) */ 40214003705Schristos 40314003705Schristos /* 404a53f50b9Schristos * if does not define struct efs_args, assume integer bit-field (linux) 405a53f50b9Schristos */ 406a53f50b9Schristos #if defined(HAVE_FS_EFS) && !defined(efs_args_t) 407a53f50b9Schristos # define efs_args_t u_int 408a53f50b9Schristos #endif /* defined(HAVE_FS_EFS) && !defined(efs_args_t) */ 409a53f50b9Schristos 410a53f50b9Schristos #if defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t) 411a53f50b9Schristos # define tmpfs_args_t u_int 412a53f50b9Schristos #endif /* defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t) */ 413a53f50b9Schristos 414a53f50b9Schristos /* 415a53f50b9Schristos * if does not define struct xfs_args, assume integer bit-field (linux) 416a53f50b9Schristos */ 417a53f50b9Schristos #if defined(HAVE_FS_XFS) && !defined(xfs_args_t) 418a53f50b9Schristos # define xfs_args_t u_int 419a53f50b9Schristos #endif /* defined(HAVE_FS_XFS) && !defined(xfs_args_t) */ 420*4da6d876Schristos #if defined(HAVE_FS_EXT) && !defined(ext_args_t) 421*4da6d876Schristos # define ext_args_t u_int 422*4da6d876Schristos #endif /* defined(HAVE_FS_EXT) && !defined(ext_args_t) */ 423a53f50b9Schristos 424a53f50b9Schristos #if defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS) 425a53f50b9Schristos # define MNTTYPE_AUTOFS "autofs" 426a53f50b9Schristos #endif /* defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS) */ 427a53f50b9Schristos 428a53f50b9Schristos /* 429a53f50b9Schristos * If NFS3, then make sure that "proto" and "vers" mnttab options 430a53f50b9Schristos * are available. 431a53f50b9Schristos */ 432a53f50b9Schristos #ifdef HAVE_FS_NFS3 433a53f50b9Schristos # ifndef MNTTAB_OPT_VERS 434a53f50b9Schristos # define MNTTAB_OPT_VERS "vers" 435a53f50b9Schristos # endif /* not MNTTAB_OPT_VERS */ 436a53f50b9Schristos # ifndef MNTTAB_OPT_PROTO 437a53f50b9Schristos # define MNTTAB_OPT_PROTO "proto" 438a53f50b9Schristos # endif /* not MNTTAB_OPT_PROTO */ 439a53f50b9Schristos #endif /* not HAVE_FS_NFS3 */ 440a53f50b9Schristos 441a53f50b9Schristos /* 442*4da6d876Schristos * If NFS4, then make sure that the "sec" mnttab option is available. 443*4da6d876Schristos */ 444*4da6d876Schristos #ifdef HAVE_FS_NFS4 445*4da6d876Schristos # ifndef MNTTAB_OPT_SEC 446*4da6d876Schristos # define MNTTAB_OPT_SEC "sec" 447*4da6d876Schristos # endif /* not MNTTAB_OPT_SEC */ 448*4da6d876Schristos #endif /* not HAVE_FS_NFS4 */ 449*4da6d876Schristos /* 450a53f50b9Schristos * If loop device (header file) exists, define mount table option 451a53f50b9Schristos */ 452a53f50b9Schristos #if defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP) 453a53f50b9Schristos # define MNTTAB_OPT_LOOP "loop" 454a53f50b9Schristos #endif /* defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP) */ 455a53f50b9Schristos 456a53f50b9Schristos /* 457a53f50b9Schristos * Define a dummy struct netconfig for non-TLI systems 458a53f50b9Schristos */ 459a53f50b9Schristos #if !defined(HAVE_NETCONFIG_H) && !defined(HAVE_SYS_NETCONFIG_H) 460a53f50b9Schristos struct netconfig { 461a53f50b9Schristos int dummy; 462a53f50b9Schristos }; 463a53f50b9Schristos #endif /* not HAVE_NETCONFIG_H and not HAVE_SYS_NETCONFIG_H */ 464a53f50b9Schristos 465a53f50b9Schristos /* some OSs don't define INADDR_NONE and assume it's unsigned -1 */ 466a53f50b9Schristos #ifndef INADDR_NONE 467a53f50b9Schristos # define INADDR_NONE 0xffffffffU 468a53f50b9Schristos #endif /* INADDR_NONE */ 469a53f50b9Schristos /* some OSs don't define INADDR_LOOPBACK */ 470a53f50b9Schristos #ifndef INADDR_LOOPBACK 471a53f50b9Schristos # define INADDR_LOOPBACK 0x7f000001 472a53f50b9Schristos #endif /* not INADDR_LOOPBACK */ 473a53f50b9Schristos 474a53f50b9Schristos #endif /* not _AM_COMPAT_H */ 475