head 1.14; access; symbols pkgsrc-2026Q1:1.14.0.138 pkgsrc-2026Q1-base:1.14 pkgsrc-2025Q4:1.14.0.136 pkgsrc-2025Q4-base:1.14 pkgsrc-2025Q3:1.14.0.134 pkgsrc-2025Q3-base:1.14 pkgsrc-2025Q2:1.14.0.132 pkgsrc-2025Q2-base:1.14 pkgsrc-2025Q1:1.14.0.130 pkgsrc-2025Q1-base:1.14 pkgsrc-2024Q4:1.14.0.128 pkgsrc-2024Q4-base:1.14 pkgsrc-2024Q3:1.14.0.126 pkgsrc-2024Q3-base:1.14 pkgsrc-2024Q2:1.14.0.124 pkgsrc-2024Q2-base:1.14 pkgsrc-2024Q1:1.14.0.122 pkgsrc-2024Q1-base:1.14 pkgsrc-2023Q4:1.14.0.120 pkgsrc-2023Q4-base:1.14 pkgsrc-2023Q3:1.14.0.118 pkgsrc-2023Q3-base:1.14 pkgsrc-2023Q2:1.14.0.116 pkgsrc-2023Q2-base:1.14 pkgsrc-2023Q1:1.14.0.114 pkgsrc-2023Q1-base:1.14 pkgsrc-2022Q4:1.14.0.112 pkgsrc-2022Q4-base:1.14 pkgsrc-2022Q3:1.14.0.110 pkgsrc-2022Q3-base:1.14 pkgsrc-2022Q2:1.14.0.108 pkgsrc-2022Q2-base:1.14 pkgsrc-2022Q1:1.14.0.106 pkgsrc-2022Q1-base:1.14 pkgsrc-2021Q4:1.14.0.104 pkgsrc-2021Q4-base:1.14 pkgsrc-2021Q3:1.14.0.102 pkgsrc-2021Q3-base:1.14 pkgsrc-2021Q2:1.14.0.100 pkgsrc-2021Q2-base:1.14 pkgsrc-2021Q1:1.14.0.98 pkgsrc-2021Q1-base:1.14 pkgsrc-2020Q4:1.14.0.96 pkgsrc-2020Q4-base:1.14 pkgsrc-2020Q3:1.14.0.94 pkgsrc-2020Q3-base:1.14 pkgsrc-2020Q2:1.14.0.90 pkgsrc-2020Q2-base:1.14 pkgsrc-2020Q1:1.14.0.70 pkgsrc-2020Q1-base:1.14 pkgsrc-2019Q4:1.14.0.92 pkgsrc-2019Q4-base:1.14 pkgsrc-2019Q3:1.14.0.88 pkgsrc-2019Q3-base:1.14 pkgsrc-2019Q2:1.14.0.86 pkgsrc-2019Q2-base:1.14 pkgsrc-2019Q1:1.14.0.84 pkgsrc-2019Q1-base:1.14 pkgsrc-2018Q4:1.14.0.82 pkgsrc-2018Q4-base:1.14 pkgsrc-2018Q3:1.14.0.80 pkgsrc-2018Q3-base:1.14 pkgsrc-2018Q2:1.14.0.78 pkgsrc-2018Q2-base:1.14 pkgsrc-2018Q1:1.14.0.76 pkgsrc-2018Q1-base:1.14 pkgsrc-2017Q4:1.14.0.74 pkgsrc-2017Q4-base:1.14 pkgsrc-2017Q3:1.14.0.72 pkgsrc-2017Q3-base:1.14 pkgsrc-2017Q2:1.14.0.68 pkgsrc-2017Q2-base:1.14 pkgsrc-2017Q1:1.14.0.66 pkgsrc-2017Q1-base:1.14 pkgsrc-2016Q4:1.14.0.64 pkgsrc-2016Q4-base:1.14 pkgsrc-2016Q3:1.14.0.62 pkgsrc-2016Q3-base:1.14 pkgsrc-2016Q2:1.14.0.60 pkgsrc-2016Q2-base:1.14 pkgsrc-2016Q1:1.14.0.58 pkgsrc-2016Q1-base:1.14 pkgsrc-2015Q4:1.14.0.56 pkgsrc-2015Q4-base:1.14 pkgsrc-2015Q3:1.14.0.54 pkgsrc-2015Q3-base:1.14 pkgsrc-2015Q2:1.14.0.52 pkgsrc-2015Q2-base:1.14 pkgsrc-2015Q1:1.14.0.50 pkgsrc-2015Q1-base:1.14 pkgsrc-2014Q4:1.14.0.48 pkgsrc-2014Q4-base:1.14 pkgsrc-2014Q3:1.14.0.46 pkgsrc-2014Q3-base:1.14 pkgsrc-2014Q2:1.14.0.44 pkgsrc-2014Q2-base:1.14 pkgsrc-2014Q1:1.14.0.42 pkgsrc-2014Q1-base:1.14 pkgsrc-2013Q4:1.14.0.40 pkgsrc-2013Q4-base:1.14 pkgsrc-2013Q3:1.14.0.38 pkgsrc-2013Q3-base:1.14 pkgsrc-2013Q2:1.14.0.36 pkgsrc-2013Q2-base:1.14 pkgsrc-2013Q1:1.14.0.34 pkgsrc-2013Q1-base:1.14 pkgsrc-2012Q4:1.14.0.32 pkgsrc-2012Q4-base:1.14 pkgsrc-2012Q3:1.14.0.30 pkgsrc-2012Q3-base:1.14 pkgsrc-2012Q2:1.14.0.28 pkgsrc-2012Q2-base:1.14 pkgsrc-2012Q1:1.14.0.26 pkgsrc-2012Q1-base:1.14 pkgsrc-2011Q4:1.14.0.24 pkgsrc-2011Q4-base:1.14 pkgsrc-2011Q3:1.14.0.22 pkgsrc-2011Q3-base:1.14 pkgsrc-2011Q2:1.14.0.20 pkgsrc-2011Q2-base:1.14 pkgsrc-2011Q1:1.14.0.18 pkgsrc-2011Q1-base:1.14 pkgsrc-2010Q4:1.14.0.16 pkgsrc-2010Q4-base:1.14 pkgsrc-2010Q3:1.14.0.14 pkgsrc-2010Q3-base:1.14 pkgsrc-2010Q2:1.14.0.12 pkgsrc-2010Q2-base:1.14 pkgsrc-2010Q1:1.14.0.10 pkgsrc-2010Q1-base:1.14 pkgsrc-2009Q4:1.14.0.8 pkgsrc-2009Q4-base:1.14 pkgsrc-2009Q3:1.14.0.6 pkgsrc-2009Q3-base:1.14 pkgsrc-2009Q2:1.14.0.4 pkgsrc-2009Q2-base:1.14 pkgsrc-2009Q1:1.14.0.2 pkgsrc-2009Q1-base:1.14 pkgsrc-2008Q4:1.13.0.2 pkgsrc-2008Q4-base:1.13 pkgsrc-2008Q3:1.12.0.14 pkgsrc-2008Q3-base:1.12 cube-native-xorg:1.12.0.12 cube-native-xorg-base:1.12 pkgsrc-2008Q2:1.12.0.10 pkgsrc-2008Q2-base:1.12 cwrapper:1.12.0.8 pkgsrc-2008Q1:1.12.0.6 pkgsrc-2008Q1-base:1.12 pkgsrc-2007Q4:1.12.0.4 pkgsrc-2007Q4-base:1.12 pkgsrc-2007Q3:1.12.0.2 pkgsrc-2007Q3-base:1.12 pkgsrc-2007Q2:1.11.0.8 pkgsrc-2007Q2-base:1.11 pkgsrc-2007Q1:1.11.0.6 pkgsrc-2007Q1-base:1.11 pkgsrc-2006Q4:1.11.0.4 pkgsrc-2006Q4-base:1.11 pkgsrc-2006Q3:1.11.0.2 pkgsrc-2006Q3-base:1.11 pkgsrc-2006Q2:1.10.0.6 pkgsrc-2006Q2-base:1.10 pkgsrc-2006Q1:1.10.0.4 pkgsrc-2006Q1-base:1.10 pkgsrc-2005Q4:1.10.0.2 pkgsrc-2005Q4-base:1.10 pkgsrc-2005Q3:1.9.0.4 pkgsrc-2005Q3-base:1.9 pkgsrc-2005Q2:1.9.0.2 pkgsrc-2005Q2-base:1.9 pkgsrc-2005Q1:1.8.0.4 pkgsrc-2005Q1-base:1.8 pkgsrc-2004Q4:1.8.0.2 pkgsrc-2004Q4-base:1.8 pkgsrc-2004Q3:1.6.0.4 pkgsrc-2004Q3-base:1.6 pkgsrc-2004Q2:1.6.0.2 pkgsrc-2004Q2-base:1.6 pkgsrc-2004Q1:1.2.0.6 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.4 pkgsrc-2003Q4-base:1.2 netbsd-1-6-1:1.2.0.2 netbsd-1-6-1-base:1.2 netbsd-1-6:1.1.1.1.0.4 netbsd-1-6-RELEASE-base:1.1 pkgviews:1.1.1.1.0.6 pkgviews-base:1.1 buildlink2-base:1.1 buildlink2:1.1.1.1.0.2 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.14 date 2009.01.03.16.32.59; author schwarz; state Exp; branches; next 1.13; 1.13 date 2008.11.09.14.32.28; author schwarz; state Exp; branches; next 1.12; 1.12 date 2007.07.08.22.22.29; author minskim; state Exp; branches; next 1.11; 1.11 date 2006.08.26.15.30.57; author joerg; state Exp; branches; next 1.10; 1.10 date 2005.10.10.22.06.51; author joerg; state Exp; branches; next 1.9; 1.9 date 2005.05.07.08.31.16; author recht; state Exp; branches; next 1.8; 1.8 date 2004.11.19.12.35.22; author sketch; state Exp; branches; next 1.7; 1.7 date 2004.10.16.14.40.23; author jmmv; state Exp; branches; next 1.6; 1.6 date 2004.05.07.12.06.47; author cjep; state Exp; branches; next 1.5; 1.5 date 2004.05.04.08.23.38; author mrg; state Exp; branches; next 1.4; 1.4 date 2004.04.14.20.53.08; author adam; state Exp; branches; next 1.3; 1.3 date 2004.03.28.22.00.05; author minskim; state Exp; branches; next 1.2; 1.2 date 2002.08.25.19.23.22; author jlam; state Exp; branches; next 1.1; 1.1 date 2002.05.12.10.25.48; author rh; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2002.05.12.10.25.48; author rh; state Exp; branches 1.1.1.1.2.1; next ; 1.1.1.1.2.1 date 2002.05.12.10.25.48; author jlam; state dead; branches; next 1.1.1.1.2.2; 1.1.1.1.2.2 date 2002.06.23.19.00.05; author jlam; state Exp; branches; next ; desc @@ 1.14 log @ensure that fam compiles on systems that do not define MNT_NODEV such as FreeBSD 7.1 @ text @$NetBSD$ --- src/mntent_compat.c++.orig 2009-01-01 23:13:49.000000000 +0100 +++ src/mntent_compat.c++ 2009-01-01 23:16:01.000000000 +0100 @@@@ -0,0 +1,195 @@@@ +/* + * Copyright (c) 1980, 1989, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 2001 + * David Rufino + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* most of this was ripped from the mount(3) source */ + +#include "config.h" +#include "fam-mntent.h" +#if !defined(HAVE_MNTENT_H) && !defined(HAVE_SYS_MNTTAB_H) +#include +#include +#include +#include +#include +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) +# include +#endif + +static int pos = -1; +static int mntsize = -1; +static struct mntent _mntent; + +char * +hasmntopt (const struct mntent *mnt, const char *option) +{ + int found; + char *opt, *optbuf; + + optbuf = strdup(mnt->mnt_opts); + found = 0; + for (opt = optbuf; (opt = strtok(opt, " ")) != NULL; opt = NULL) { + if (!strcasecmp(opt, option)) { + opt = opt - optbuf + mnt->mnt_opts; + free (optbuf); + return (opt); + } + } + free (optbuf); + return (NULL); +} + +static char * +catopt (char *s0, const char *s1) +{ + size_t i; + char *cp; + + if (s1 == NULL || *s1 == '\0') + return s0; + if (s0 && *s0) { + i = strlen(s0) + strlen(s1) + 1 + 1; + if ((cp = (char *)malloc(i)) == NULL) + return (NULL); + (void)snprintf(cp, i, "%s %s", s0, s1); + } else + cp = strdup(s1); + + if (s0) + free(s0); + return (cp); +} + + +static char * +flags2opts (int flags) +{ + char *res; + res = NULL; + res = catopt(res, (flags & MNT_RDONLY) ? "ro" : "rw"); + if (flags & MNT_SYNCHRONOUS) res = catopt(res, "sync"); + if (flags & MNT_NOEXEC) res = catopt(res, "noexec"); + if (flags & MNT_NOSUID) res = catopt(res, "nosuid"); +#ifdef MNT_NODEV + if (flags & MNT_NODEV) res = catopt(res, "nodev"); +#endif +#ifdef MNT_UNION + if (flags & MNT_UNION) res = catopt(res, "union"); +#endif + if (flags & MNT_ASYNC) res = catopt(res, "async"); +#ifdef MNT_NOATIME + if (flags & MNT_NOATIME) res = catopt(res, "noatime"); +#endif +#ifdef MNT_NOCLUSTERR + if (flags & MNT_NOCLUSTERR) res = catopt(res, "noclusterr"); +#endif +#ifdef MNT_NOCLUSTERW + if (flags & MNT_NOCLUSTERW) res = catopt(res, "noclusterw"); +#endif +#ifdef MNT_NOSYMFOLLOW + if (flags & MNT_NOSYMFOLLOW) res = catopt(res, "nosymfollow"); +#endif +#ifdef MNT_SUIDDIR + if (flags & MNT_SUIDDIR) res = catopt(res, "suiddir"); +#endif +#ifdef MNT_NOCOREDUMP + if (flags & MNT_NOCOREDUMP) res = catopt(res, "nocoredump"); +#endif +#ifdef MNT_IGNORE + if (flags & MNT_IGNORE) res = catopt(res, "hidden"); +#endif +#ifdef MNT_SYMPERM + if (flags & MNT_SYMPERM) res = catopt(res, "symperm"); +#endif +#ifdef MNT_NODEVMTIME + if (flags & MNT_NODEVMTIME) res = catopt(res, "nodevmtime"); +#endif +#ifdef MNT_SOFTDEP + if (flags & MNT_SOFTDEP) res = catopt(res, "softdep"); +#endif + + return res; +} + +static struct mntent * +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) +statfs_to_mntent (struct statvfs *mntbuf) +#else +statfs_to_mntent (struct statfs *mntbuf) +#endif +{ + static char opts_buf[40], *tmp; + + _mntent.mnt_fsname = mntbuf->f_mntfromname; + _mntent.mnt_dir = mntbuf->f_mntonname; + _mntent.mnt_type = mntbuf->f_fstypename; +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) + tmp = flags2opts (mntbuf->f_flag); +#else + tmp = flags2opts (mntbuf->f_flags); +#endif + if (tmp) { + opts_buf[sizeof(opts_buf)-1] = '\0'; + strncpy (opts_buf, tmp, sizeof(opts_buf)-1); + free (tmp); + } else { + *opts_buf = '\0'; + } + _mntent.mnt_opts = opts_buf; + _mntent.mnt_freq = _mntent.mnt_passno = 0; + return (&_mntent); +} + +struct mntent * +getmntent (FILE *fp) +{ +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) + static struct statvfs *mntbuf; +#else + static struct statfs *mntbuf; +#endif + + if (pos == -1 || mntsize == -1) + mntsize = getmntinfo (&mntbuf, MNT_NOWAIT); + + ++pos; + if (pos == mntsize) { + pos = mntsize = -1; + return (NULL); + } + + return (statfs_to_mntent (&mntbuf[pos])); +} + +#endif /* HAVE_MNTENT_H */ @ 1.13 log @modified patch to apply to OpenBSD, too. @ text @d1 1 a1 1 $NetBSD: patch-ap,v 1.12 2007/07/08 22:22:29 minskim Exp $ d3 3 a5 3 --- src/mntent_compat.c++.orig Sun Jul 8 08:16:38 2007 +++ src/mntent_compat.c++ @@@@ -0,0 +1,193 @@@@ d109 1 d111 1 @ 1.12 log @Make this package build on platforms that don't define MNT_UNION. @ text @d1 1 a1 1 $NetBSD$ d51 1 a51 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) && !defined(__FreeBSD__) d149 1 a149 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) && !defined(__FreeBSD__) d160 1 a160 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) && !defined(__FreeBSD__) d180 1 a180 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) && !defined(__FreeBSD__) @ 1.11 log @Use statfs instead of statfs on FreeBSD. Peter Schuller's bulk build indicates that it is needed. @ text @d1 1 a1 1 $NetBSD: patch-ap,v 1.10 2005/10/10 22:06:51 joerg Exp $ d3 1 a3 1 --- src/mntent_compat.c++.orig 2005-07-24 02:27:46.000000000 +0000 d5 1 a5 1 @@@@ -0,0 +1,191 @@@@ d110 1 d112 1 @ 1.10 log @Add support for DragonFly. While we have sys/statvfs.h, we don't have all the fields used by fam. It's easier to use the statfs interface for now. Don't explicitly link against libstdc++, it is the job of the C++ compiler to do that. @ text @d1 1 a1 1 $NetBSD$ d51 1 a51 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) d147 1 a147 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) d158 1 a158 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) d178 1 a178 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) && !defined(__DragonFly__) @ 1.9 log @Fix the build on MacOS X 10.4 which now has statvfs. @ text @d3 2 a4 2 --- src/mntent_compat.c++.orig 2005-05-07 10:22:00.000000000 +0200 +++ src/mntent_compat.c++ 2005-05-07 10:26:09.000000000 +0200 d51 1 a51 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) d147 1 a147 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) d158 1 a158 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) d178 1 a178 1 +#if defined(HAVE_SYS_STATVFS_H) && !defined(__APPLE__) @ 1.8 log @Various fixes/cleanups to get this package compiling on Solaris: + Use the mnttab(4) interface instead of mntent. + C++ syntax cleanups to appease the SunPro compiler. + Use MAXPATHLEN instead of NAME_MAX which can be unimplemented on strict POSIX systems. + Use POSIX inttypes.h if BSD types are not available. + RPC includes and C++ namespace fixes. + Use dirent(3) instead of older sys/dir.h interface. + Avoid `sun' namespace collision. Patch based on the work of Robert Lillack and others, described in http://mail-index.netbsd.org/tech-pkg/2004/08/20/0005.html and tested with SunPro and gcc. @ text @d1 1 a1 1 $NetBSD: patch-ap,v 1.7 2004/10/16 14:40:23 jmmv Exp $ d3 2 a4 2 --- src/mntent_compat.c++.orig 2004-04-30 14:24:58.000000000 +0200 +++ src/mntent_compat.c++ 2004-04-30 14:28:45.000000000 +0200 d51 1 a51 1 +#ifdef HAVE_SYS_STATVFS_H d147 1 a147 1 +#ifdef HAVE_SYS_STATVFS_H d158 1 a158 1 +#ifdef HAVE_SYS_STATVFS_H d178 1 a178 1 +#ifdef HAVE_SYS_STATVFS_H @ 1.7 log @Make the mntent compatibility layer work properly. It was storing the list of mounted filesystems in a local variable that was lost between calls to the emulated getmntinfo function. I'm not sure if this fixes any visible problem, but it probably should. The code was randomly reading from memory before (running with debugging enabled exposed the problem, for example). Bump PKGREVISION to 3. @ text @d1 1 a1 1 $NetBSD: patch-ap,v 1.6 2004/05/07 12:06:47 cjep Exp $ d45 1 a45 1 +#if !defined(HAVE_MNTENT_H) @ 1.6 log @Add RCS tags @ text @d1 2 a2 1 $NetBSD$ d179 1 a179 1 + struct statvfs *mntbuf; d181 1 a181 1 + struct statfs *mntbuf; @ 1.5 log @apply the patches from PR#25405: use statvfs if we find . now this builds with -current. @ text @d1 1 @ 1.4 log @Fixed build problems on Darwin @ text @d1 3 a3 5 $NetBSD$ --- src/mntent_compat.c++.orig Wed Apr 14 22:41:20 2004 +++ src/mntent_compat.c++ @@@@ -0,0 +1,176 @@@@ d49 3 d145 3 d149 1 d156 3 d160 1 d176 3 d180 1 @ 1.3 log @Update fam to 2.7.0. Fixes the following PR's: - PR pkg/23017 - PR pkg/23495 - PR pkg/23496 - PR pkg/24578 The patches for 23017 and 24578 were provided by reed@@. Although rh@@ suspended PR 23017 saying that pkgsrc does not support installation to /usr, this still needs to be fixed because the same problem occurs even when LOCALBASE != /usr. Changes since 2.6.10: Changed NOGROUP usage in src/Cred.c++ to -1 as NOGROUP is not defined in IRIX. (mraymond@@sgi.com) removed const modifier from Scheduler.h to fix GCC 3.x build. (wardle@@sgi.com) created new GNU autotools files: - test whether we have IMon rather than testing OS. - test whether we have sockaddr length members rather than testing OS. - install daemon in sbin rather than bin. - install manual pages in typical GNU/Linux sections. - rename daemon to famd. - rename fam source directory to src. - rename libfam source directory to lib. - remove editconf and util subdirectory. - remove rpm target and build subdirectory. - remove support target and subdirectory. [wardle@@sgi.com] (wardle@@sgi.com) fixed warnings about typenames in BTree.h. (wardle@@sgi.com) @ text @d1 1 a1 1 $NetBSD: patch-ap,v 1.2 2002/08/25 19:23:22 jlam Exp $ d3 1 a3 1 --- src/mntent_compat.c++.orig Sun May 12 19:37:49 2002 d5 1 a5 1 @@@@ -0,0 +1,174 @@@@ d109 1 d111 1 @ 1.2 log @Merge changes in packages from the buildlink2 branch that have buildlink2.mk files back into the main trunk. @ text @d1 1 a1 1 $NetBSD: patch-ap,v 1.1.2.1 2002/06/23 19:00:05 jlam Exp $ d3 2 a4 2 --- fam/mntent_compat.c++.orig Sun May 12 19:37:49 2002 +++ fam/mntent_compat.c++ d44 1 a44 1 +#include "mntent.h" @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ @ 1.1.1.1 log @Initial import of fam-2.6.7, a file alteration monitor. @ text @@ 1.1.1.1.2.1 log @file patch-ap was added on branch buildlink2 on 2002-06-23 19:00:05 +0000 @ text @d1 179 @ 1.1.1.1.2.2 log @Merge from pkgsrc-current to buildlink2 branch. @ text @a0 179 $NetBSD: patch-ap,v 1.1.1.1.2.1 2002/06/23 19:00:05 jlam Exp $ --- fam/mntent_compat.c++.orig Sun May 12 19:37:49 2002 +++ fam/mntent_compat.c++ @@@@ -0,0 +1,174 @@@@ +/* + * Copyright (c) 1980, 1989, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 2001 + * David Rufino + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* most of this was ripped from the mount(3) source */ + +#include "config.h" +#include "mntent.h" +#if !defined(HAVE_MNTENT_H) +#include +#include +#include +#include +#include + +static int pos = -1; +static int mntsize = -1; +static struct mntent _mntent; + +char * +hasmntopt (const struct mntent *mnt, const char *option) +{ + int found; + char *opt, *optbuf; + + optbuf = strdup(mnt->mnt_opts); + found = 0; + for (opt = optbuf; (opt = strtok(opt, " ")) != NULL; opt = NULL) { + if (!strcasecmp(opt, option)) { + opt = opt - optbuf + mnt->mnt_opts; + free (optbuf); + return (opt); + } + } + free (optbuf); + return (NULL); +} + +static char * +catopt (char *s0, const char *s1) +{ + size_t i; + char *cp; + + if (s1 == NULL || *s1 == '\0') + return s0; + if (s0 && *s0) { + i = strlen(s0) + strlen(s1) + 1 + 1; + if ((cp = (char *)malloc(i)) == NULL) + return (NULL); + (void)snprintf(cp, i, "%s %s", s0, s1); + } else + cp = strdup(s1); + + if (s0) + free(s0); + return (cp); +} + + +static char * +flags2opts (int flags) +{ + char *res; + res = NULL; + res = catopt(res, (flags & MNT_RDONLY) ? "ro" : "rw"); + if (flags & MNT_SYNCHRONOUS) res = catopt(res, "sync"); + if (flags & MNT_NOEXEC) res = catopt(res, "noexec"); + if (flags & MNT_NOSUID) res = catopt(res, "nosuid"); + if (flags & MNT_NODEV) res = catopt(res, "nodev"); + if (flags & MNT_UNION) res = catopt(res, "union"); + if (flags & MNT_ASYNC) res = catopt(res, "async"); + if (flags & MNT_NOATIME) res = catopt(res, "noatime"); +#ifdef MNT_NOCLUSTERR + if (flags & MNT_NOCLUSTERR) res = catopt(res, "noclusterr"); +#endif +#ifdef MNT_NOCLUSTERW + if (flags & MNT_NOCLUSTERW) res = catopt(res, "noclusterw"); +#endif +#ifdef MNT_NOSYMFOLLOW + if (flags & MNT_NOSYMFOLLOW) res = catopt(res, "nosymfollow"); +#endif +#ifdef MNT_SUIDDIR + if (flags & MNT_SUIDDIR) res = catopt(res, "suiddir"); +#endif +#ifdef MNT_NOCOREDUMP + if (flags & MNT_NOCOREDUMP) res = catopt(res, "nocoredump"); +#endif +#ifdef MNT_IGNORE + if (flags & MNT_IGNORE) res = catopt(res, "hidden"); +#endif +#ifdef MNT_SYMPERM + if (flags & MNT_SYMPERM) res = catopt(res, "symperm"); +#endif +#ifdef MNT_NODEVMTIME + if (flags & MNT_NODEVMTIME) res = catopt(res, "nodevmtime"); +#endif +#ifdef MNT_SOFTDEP + if (flags & MNT_SOFTDEP) res = catopt(res, "softdep"); +#endif + + return res; +} + +static struct mntent * +statfs_to_mntent (struct statfs *mntbuf) +{ + static char opts_buf[40], *tmp; + + _mntent.mnt_fsname = mntbuf->f_mntfromname; + _mntent.mnt_dir = mntbuf->f_mntonname; + _mntent.mnt_type = mntbuf->f_fstypename; + tmp = flags2opts (mntbuf->f_flags); + if (tmp) { + opts_buf[sizeof(opts_buf)-1] = '\0'; + strncpy (opts_buf, tmp, sizeof(opts_buf)-1); + free (tmp); + } else { + *opts_buf = '\0'; + } + _mntent.mnt_opts = opts_buf; + _mntent.mnt_freq = _mntent.mnt_passno = 0; + return (&_mntent); +} + +struct mntent * +getmntent (FILE *fp) +{ + struct statfs *mntbuf; + + if (pos == -1 || mntsize == -1) + mntsize = getmntinfo (&mntbuf, MNT_NOWAIT); + + ++pos; + if (pos == mntsize) { + pos = mntsize = -1; + return (NULL); + } + + return (statfs_to_mntent (&mntbuf[pos])); +} + +#endif /* HAVE_MNTENT_H */ @