From ishmael@home.com  Fri Nov 23 09:08:04 2001
Return-Path: <ishmael@home.com>
Received: from c418236-a.clmba1.mo.home.com (c418236-a.clmba1.mo.home.com [24.12.203.134])
	by hub.freebsd.org (Postfix) with ESMTP id 1111C37B416
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Nov 2001 09:07:58 -0800 (PST)
Received: from babylon.merseine.nu (babylon.domain.local [192.168.1.5])
	by c418236-a.clmba1.mo.home.com (8.11.6/8.11.6) with ESMTP id fANH7rM00383
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Nov 2001 11:07:53 -0600 (CST)
	(envelope-from ishmael@home.com)
Received: (from ishmael@localhost)
	by babylon.merseine.nu (8.11.6/8.11.6) id fANH7qp78962;
	Fri, 23 Nov 2001 11:07:52 -0600 (CST)
	(envelope-from ishmael)
Message-Id: <200111231707.fANH7qp78962@babylon.merseine.nu>
Date: Fri, 23 Nov 2001 11:07:52 -0600 (CST)
From: Jeremy Norris <ishmael27@home.com>
Reply-To: Jeremy Norris <ishmael27@home.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Update port devel/fam
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32231
>Category:       ports
>Synopsis:       Update port devel/fam
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ade
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 23 09:10:00 PST 2001
>Closed-Date:    Sat Apr 13 11:04:20 PDT 2002
>Last-Modified:  Sat Apr 13 11:04:20 PDT 2002
>Originator:     Jeremy Norris
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
none
>Environment:
System: FreeBSD babylon.merseine.nu 4.4-STABLE FreeBSD 4.4-STABLE #0: Thu Nov 22 15:56:11 CST 2001 ishmael@babylon.merseine.nu:/usr/obj/usr/src/sys/BABYLON i386

>Description:
Update fam to latest version, 2.6.6.

ports/devel/fam should be repo-copied to ports/sysutils/fam.
When originally creating this port, I mistakenly placed it in devel section
rather than sysutils, where it more properly belongs. Note that this would
require altering x11/kdelibs2 and devel/fampp LIB_DEPENDS.

This update also remove files/patch-freebsd, which touched multiple files, and
instead adds several individual patch files.

>How-To-Repeat:
This update should be checked by kde@FreeBSD.org, since it touches a kdelibs2
LIB_DEPENDS.

Don't forget to cvs rm files/patch-freebsd.

>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/fam/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	31 Mar 2001 02:45:55 -0000	1.1
+++ Makefile	23 Nov 2001 16:54:43 -0000
@@ -6,24 +6,55 @@
 #
 
 PORTNAME=	fam
-PORTVERSION=	2.6.4
-CATEGORIES=	devel
+PORTVERSION=	2.6.6
+CATEGORIES=	sysutils
 MASTER_SITES=	ftp://oss.sgi.com/projects/fam/download/
-DISTNAME=	${PORTNAME}-oss-${PORTVERSION}
 
 MAINTAINER=	ishmael27@home.com
 
 USE_AUTOMAKE=	yes
+AUTOMAKE_ARGS=	--add-missing --copy --foreign --include-deps
 USE_LIBTOOL=	yes
 USE_GMAKE=	yes
-PATCH_STRIP=	-p1
+EXTRACT_AFTER_ARGS=	| ${TAR} -xf - -C ${WRKSRC}
 INSTALLS_SHLIB=	yes
 
-MAN1=		fam.1m
-MAN3=		fam.3x
+MAN3=		fam.3
+MAN8=		fam.8
+
+do-extract:
+	@${RM} -rf ${WRKDIR}
+	@${MKDIR} ${WRKSRC}
+	@for file in ${EXTRACT_ONLY}; do \
+		if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
+		then \
+			exit 1; \
+		fi \
+	done
+.if !defined(EXTRACT_PRESERVE_OWNERSHIP)
+	@if [ `id -u` = 0 ]; then \
+		${CHMOD} -R ug-s ${WRKDIR}; \
+		${CHOWN} -R 0:0 ${WRKDIR}; \
+	fi
+.endif
+
+pre-configure:
+	@${MV} ${WRKSRC}/man/fam.1m.in ${WRKSRC}/man/fam.8.in
+	@${MV} ${WRKSRC}/man/fam.3x ${WRKSRC}/man/fam.3
+	@${RM} -f ${WRKSRC}/install-sh ${WRKSRC}/missing \
+		${WRKSRC}/mkinstalldirs
+	@cd ${WRKSRC} && ${LOCALBASE}/bin/libtoolize --force --copy && \
+		${ACLOCAL} && ${AUTOHEADER}
+
+post-configure:
+	@${FIND} ${WRKSRC} -name "Makefile" |xargs ${PERL} -pi -e  '\
+		s|^ACLOCAL =.*|ACLOCAL = ${ACLOCAL}| ; \
+		s|^AUTOCONF =.*|AUTOCONF = ${AUTOCONF}| ; \
+		s|^AUTOMAKE =.*|AUTOMAKE = ${AUTOMAKE}| ; \
+		s|^AUTOHEADER =.*|AUTOHEADER = ${AUTOHEADER}|'
 
 post-install:
-	@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/fam.sh.sample ${PREFIX}/etc/rc.d/fam.sh.sample
+	@${INSTALL_SCRIPT} ${FILESDIR}/fam.sh.sample ${PREFIX}/etc/rc.d/fam.sh.sample
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/devel/fam/distinfo,v
retrieving revision 1.1
diff -u -r1.1 distinfo
--- distinfo	31 Mar 2001 02:45:55 -0000	1.1
+++ distinfo	23 Nov 2001 14:53:49 -0000
@@ -1 +1 @@
-MD5 (fam-oss-2.6.4.tar.gz) = d060919b3d9ede61a8b68eae1ded53ce
+MD5 (fam-2.6.6.tar.gz) = c1ecf4136b673e49fd0ea7a2e50d9885
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/devel/fam/pkg-plist,v
retrieving revision 1.2
diff -u -r1.2 pkg-plist
--- pkg-plist	21 May 2001 07:13:05 -0000	1.2
+++ pkg-plist	23 Nov 2001 16:15:46 -0000
@@ -2,8 +2,6 @@
 etc/fam.conf
 etc/rc.d/fam.sh.sample
 include/fam.h
-lib/fam/editconf.perl
 lib/libfam.a
 lib/libfam.so
 lib/libfam.so.0
-@dirrm lib/fam
Index: files/patch-Makefile.am
===================================================================
RCS file: /home/ncvs/ports/devel/fam/files/patch-Makefile.am,v
retrieving revision 1.1
diff -u -r1.1 patch-Makefile.am
--- files/patch-Makefile.am	31 Mar 2001 02:45:55 -0000	1.1
+++ files/patch-Makefile.am	23 Nov 2001 16:23:51 -0000
@@ -1,6 +1,13 @@
---- Makefile.am.orig	Fri May 19 23:46:31 2000
-+++ Makefile.am	Mon Mar 19 11:51:05 2001
-@@ -7,30 +7,3 @@
+--- Makefile.am.orig	Mon Oct 22 01:33:09 2001
++++ Makefile.am	Fri Nov 23 10:23:03 2001
+@@ -1,36 +1,9 @@
+ include $(top_srcdir)/common.am
+ 
+-SUBDIRS = util include support libfam fam man test build
++SUBDIRS = include support libfam fam man
+ 
+ EXTRA_DIST = common.am INSTALL.rpm
+ 
  rpm: dist
  	@cd build && $(MAKE) $(AM_MAKEFLAGS) rpm
  
Index: files/patch-acconfig.h
===================================================================
RCS file: files/patch-acconfig.h
diff -N files/patch-acconfig.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-acconfig.h	23 Nov 2001 15:54:25 -0000
@@ -0,0 +1,11 @@
+--- acconfig.h.orig	Mon Oct 22 01:33:09 2001
++++ acconfig.h	Fri Nov 23 09:54:00 2001
+@@ -47,6 +47,8 @@
+ **  Otherwise, we'll use MNTTYPE_NFS.  */
+ #undef HAVE_FSID_NFS2
+ 
++#undef HAVE_MNTENT_H
++
+ /* Define if we have MNTTYPE_NFS2 */
+ #define HAVE_MNTTYPE_NFS2 0
+ 
Index: files/patch-common.am
===================================================================
RCS file: files/patch-common.am
diff -N files/patch-common.am
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-common.am	7 Oct 2001 21:40:51 -0000
@@ -0,0 +1,11 @@
+--- common.am.orig	Fri May 19 23:46:31 2000
++++ common.am	Sun Oct  7 16:40:38 2001
+@@ -1,7 +1,7 @@
+ #  Since we're not always using gcc, we don't want to use dependency
+ #  tracking.  (It croaks non-GNU compilers.)  Seems like this should be
+ #  configurable through autoconf!
+-AUTOMAKE_OPTIONS=no-dependencies
++#AUTOMAKE_OPTIONS=no-dependencies
+ 
+ #  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
+ INCLUDES = @FAMPROTOINC@ -DCONFIG_ETC_CONFIG_PATH=\"@FAM_CONF@\"
Index: files/patch-config.h.in
===================================================================
RCS file: files/patch-config.h.in
diff -N files/patch-config.h.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-config.h.in	7 Oct 2001 20:28:42 -0000
@@ -0,0 +1,11 @@
+--- config.h.in.orig	Fri May 19 23:50:17 2000
++++ config.h.in	Sun Oct  7 15:22:17 2001
+@@ -12,6 +12,8 @@
+ /*  Define if the system has imon and IMONIOC_ ioctl flags.  */
+ #undef HAVE_IMON
+ 
++#undef HAVE_MNTENT_H
++
+ /*  Define if the system has the struct revokdi and the IMONIOC_REVOKDI
+ **  ioctl flag.  (IRIX 5.3 doesn't.)
+ */
Index: files/patch-configure.in
===================================================================
RCS file: files/patch-configure.in
diff -N files/patch-configure.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-configure.in	23 Nov 2001 16:50:12 -0000
@@ -0,0 +1,67 @@
+--- configure.in.orig	Sun Nov  4 23:31:30 2001
++++ configure.in	Fri Nov 23 10:50:04 2001
+@@ -95,6 +95,8 @@
+ dnl AC_HEADER_SYS_WAIT
+ dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
+ 
++AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
++
+ dnl
+ dnl  See if imon is available; if so, is it IRIX or Linux?
+ dnl
+@@ -310,10 +312,10 @@
+ dnl If we don't have MNTTYPE_NFS , we croak.
+ dnl
+ 
+-FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
+-FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
+-FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
+-FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
++dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
+ 
+ dnl
+ dnl  Test for bindresvport() prototype.
+@@ -516,8 +518,8 @@
+ 
+ dnl
+ dnl  This grief is for replacing XXX_FAM_CONF with $FAM_CONF
+-dnl  in the fam(1M) man page.  (Simply putting @FAM_CONF@ in
+-dnl  fam.1m.in puts the string "$sysconfdir/fam.conf" in the
++dnl  in the fam(8) man page.  (Simply putting @FAM_CONF@ in
++dnl  fam.8.in puts the string "$sysconfdir/fam.conf" in the
+ dnl  man page, which isn't acceptable.  Isn't there a way to make
+ dnl  autoconf handle this??)
+ dnl
+@@ -529,7 +531,7 @@
+ [
+     TMPFILE=configure.tmp
+     for f in $CONFIG_FILES; do
+-        if test `basename $f` != 'fam.1m'; then
++        if test `basename $f` != 'fam.8'; then
+             continue
+         fi
+         echo "replacing XXX_FAM_CONF with $FAM_CONF and removing maintainer comments in $f"
+@@ -554,19 +556,14 @@
+ dnl
+ AC_OUTPUT(
+     Makefile 
+-    build/Makefile
+-    build/rpm/Makefile
+-    build/rpm/rpm.spec
+     fam/Makefile
+     fam/fam.conf
+     include/Makefile
+     libfam/Makefile
+     man/Makefile
+-    man/fam.1m
++    man/fam.8
+     support/Makefile
+     test/Makefile
+-    util/Makefile
+-    util/editconf/Makefile
+ )
+ 
+ dnl 
Index: files/patch-fam::Client.h
===================================================================
RCS file: files/patch-fam::Client.h
diff -N files/patch-fam::Client.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::Client.h	7 Oct 2001 20:22:45 -0000
@@ -0,0 +1,10 @@
+--- fam/Client.h.orig	Fri May 19 23:46:31 2000
++++ fam/Client.h	Sun Oct  7 15:22:17 2001
+@@ -23,6 +23,7 @@
+ #ifndef Client_included
+ #define Client_included
+ 
++#include <sys/types.h>
+ #include <netinet/in.h>  // for in_addr
+ 
+ #include "Activity.h"
Index: files/patch-fam::FileSystem.c++
===================================================================
RCS file: files/patch-fam::FileSystem.c++
diff -N files/patch-fam::FileSystem.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::FileSystem.c++	7 Oct 2001 20:23:29 -0000
@@ -0,0 +1,11 @@
+--- fam/FileSystem.c++.orig	Fri May 19 23:46:31 2000
++++ fam/FileSystem.c++	Sun Oct  7 15:22:17 2001
+@@ -22,7 +22,7 @@
+ 
+ #include "FileSystem.h"
+ 
+-#include <mntent.h>
++#include "mntent.h"
+ #include <string.h>
+ 
+ #include "Event.h"
Index: files/patch-fam::FileSystemTable.c++
===================================================================
RCS file: files/patch-fam::FileSystemTable.c++
diff -N files/patch-fam::FileSystemTable.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::FileSystemTable.c++	7 Oct 2001 20:24:05 -0000
@@ -0,0 +1,25 @@
+--- fam/FileSystemTable.c++.orig	Fri May 19 23:46:31 2000
++++ fam/FileSystemTable.c++	Sun Oct  7 15:22:17 2001
+@@ -21,9 +21,10 @@
+ //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ 
+ #include <stddef.h>
++#include <stdio.h>
+ #include "FileSystemTable.h"
+ 
+-#include <mntent.h>
++#include "mntent.h"
+ #include <stdlib.h>
+ #include <string.h>
+ 
+@@ -255,7 +256,10 @@
+     //  create_fs_by_name initializes our "root" member variable.
+     if (!fs_by_name)
+     {   create_fs_by_name();
++#if !defined(__FreeBSD__)
++	/* there is no mtab "file" in freebsd! */
+ 	mtab_watcher = new InternalClient(mtab_name, mtab_event_handler, NULL);
++#endif
+     }
+ 
+     cr.become_user();
Index: files/patch-fam::IMon.c++
===================================================================
RCS file: files/patch-fam::IMon.c++
diff -N files/patch-fam::IMon.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::IMon.c++	7 Oct 2001 20:24:25 -0000
@@ -0,0 +1,13 @@
+--- fam/IMon.c++.orig	Fri May 19 23:46:31 2000
++++ fam/IMon.c++	Sun Oct  7 15:22:17 2001
+@@ -34,7 +34,9 @@
+ #endif
+ #endif
+ 
+-#include <sys/sysmacros.h>
++#if !defined(__FreeBSD__)
++#  include <sys/sysmacros.h>
++#endif
+ #include <unistd.h>
+ 
+ #include "Interest.h"
Index: files/patch-fam::Interest.c++
===================================================================
RCS file: files/patch-fam::Interest.c++
diff -N files/patch-fam::Interest.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::Interest.c++	7 Oct 2001 20:24:54 -0000
@@ -0,0 +1,13 @@
+--- fam/Interest.c++.orig	Fri May 19 23:46:31 2000
++++ fam/Interest.c++	Sun Oct  7 15:22:17 2001
+@@ -25,7 +25,9 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <sys/param.h>
+-#include <sys/sysmacros.h>
++#if !defined(__FreeBSD__)
++#  include <sys/sysmacros.h>
++#endif
+ 
+ #ifdef HAVE_IRIX_XTAB_VERIFICATION
+ #include <stdio.h>
Index: files/patch-fam::InternalClient.c++
===================================================================
RCS file: files/patch-fam::InternalClient.c++
diff -N files/patch-fam::InternalClient.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::InternalClient.c++	7 Oct 2001 20:25:13 -0000
@@ -0,0 +1,12 @@
+--- fam/InternalClient.c++.orig	Fri May 19 23:46:31 2000
++++ fam/InternalClient.c++	Sun Oct  7 15:22:17 2001
+@@ -35,8 +35,8 @@
+ {
+     assert(filename);
+     assert(h);
+-    assert(filename[0] == '/');
+     Log::debug("%s watching %s", name(), filename);
++    assert(filename[0] == '/');
+     interest = new File(filename, this, Request(0), Cred::SuperUser);
+ }
+ 
Index: files/patch-fam::Listener.c++
===================================================================
RCS file: files/patch-fam::Listener.c++
diff -N files/patch-fam::Listener.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::Listener.c++	23 Nov 2001 15:53:02 -0000
@@ -0,0 +1,56 @@
+--- fam/Listener.c++.orig	Mon Oct 22 01:33:10 2001
++++ fam/Listener.c++	Fri Nov 23 09:52:14 2001
+@@ -22,6 +22,8 @@
+ 
+ #include "Listener.h"
+ 
++#include <stdio.h>
++#include <stdlib.h>
+ #include <assert.h>
+ #include <fcntl.h>
+ #include <sys/types.h>
+@@ -205,7 +207,11 @@
+     unsetenv("TMPDIR");
+ 
+     char *tmpfile = tempnam("/tmp", ".fam");
++#if defined(__FreeBSD__)
++    sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
++#else
+     sockaddr_un sun = { AF_UNIX, "" };
++#endif
+     if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1))
+     {
+         Log::error("tmpnam() too long for sun_path (%d >= %d)!",
+@@ -239,7 +245,7 @@
+         return;
+     }
+ 
+-    if (chown(sun.sun_path, uid, -1) != 0)
++    if (chown(sun.sun_path, uid, (gid_t)-1) != 0)
+     {   Log::perror("localclient chown");
+ 	close(client_sock);
+         return;
+@@ -275,7 +281,11 @@
+ 
+     // Get the new socket.
+ 
++#if defined(__FreeBSD__)
++    struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
++#else
+     struct sockaddr_un sun = { AF_UNIX, "" };
++#endif
+     CONFIG_SOCKLEN_T sunlen = sizeof(sun);
+     int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen);
+     if (client_fd < 0)
+@@ -337,7 +347,11 @@
+ void
+ Listener::dirty_ugly_hack()
+ {
++#if defined(__FreeBSD__)
++    static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" };
++#else
+     static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" };
++#endif
+ 
+     int sock = socket(PF_UNIX, SOCK_STREAM, 0);
+     if (sock < 0)
Index: files/patch-fam::Log.c++
===================================================================
RCS file: files/patch-fam::Log.c++
diff -N files/patch-fam::Log.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::Log.c++	7 Oct 2001 20:25:48 -0000
@@ -0,0 +1,11 @@
+--- fam/Log.c++.orig	Fri May 19 23:46:31 2000
++++ fam/Log.c++	Sun Oct  7 15:22:17 2001
+@@ -28,6 +28,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
++#include <sys/time.h>
++#include <sys/types.h>
+ #include <sys/resource.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
Index: files/patch-fam::Makefile.am
===================================================================
RCS file: files/patch-fam::Makefile.am
diff -N files/patch-fam::Makefile.am
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::Makefile.am	7 Oct 2001 21:27:24 -0000
@@ -0,0 +1,16 @@
+--- fam/Makefile.am.orig	Fri May 19 23:46:31 2000
++++ fam/Makefile.am	Sun Oct  7 16:27:01 2001
+@@ -72,11 +72,12 @@
+   main.c++ \
+   timeval.c++ \
+   timeval.h \
++  mntent_compat.c++ \
+   @IMON_FUNCS@.c++
+ 
+ EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
+ 
+ fam_LDADD = -lrpcsvc $(top_srcdir)/support/libsupport.a
+ 
+-CLEANFILES += @MKDEPFILE@ ii_files/*.ii
++CLEANFILES = @MKDEPFILE@ ii_files/*.ii
+ sinclude @MKDEPFILE@
Index: files/patch-fam::Scheduler.h
===================================================================
RCS file: files/patch-fam::Scheduler.h
diff -N files/patch-fam::Scheduler.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::Scheduler.h	7 Oct 2001 20:26:25 -0000
@@ -0,0 +1,10 @@
+--- fam/Scheduler.h.orig	Fri May 19 23:46:32 2000
++++ fam/Scheduler.h	Sun Oct  7 15:22:17 2001
+@@ -24,6 +24,7 @@
+ #define Scheduler_included
+ 
+ #include <sys/time.h>
++#include <string.h>
+ 
+ #include "Boolean.h"
+ 
Index: files/patch-fam::StringTable.h
===================================================================
RCS file: files/patch-fam::StringTable.h
diff -N files/patch-fam::StringTable.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::StringTable.h	7 Oct 2001 20:26:42 -0000
@@ -0,0 +1,10 @@
+--- fam/StringTable.h.orig	Fri May 19 23:46:32 2000
++++ fam/StringTable.h	Sun Oct  7 15:22:17 2001
+@@ -25,6 +25,7 @@
+ 
+ #include <assert.h>
+ #include <string.h>
++#include "mntent.h"
+ 
+ //  A StringTable maps C strings onto values.  It is a cheap O(n)
+ //  implementation, suitable only for small tables that are
Index: files/patch-fam::mntent.h
===================================================================
RCS file: files/patch-fam::mntent.h
diff -N files/patch-fam::mntent.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::mntent.h	7 Oct 2001 20:27:09 -0000
@@ -0,0 +1,59 @@
+--- fam/mntent.h.orig	Sun Oct  7 15:22:17 2001
++++ fam/mntent.h	Sun Oct  7 15:22:17 2001
+@@ -0,0 +1,56 @@
++/*
++ *  mntent
++ *  mntent.h - compatability header for FreeBSD
++ *
++ *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
++ *  All rights reserved.
++ *
++ * 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.
++ *
++ * 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.
++ */
++
++#if defined(HAVE_MNTENT_H)
++#include <mntent.h>
++#else
++#ifndef _MNTENT_H
++#define _MNTENT_H
++#include <stdio.h>
++
++#define MOUNTED "dummy"
++
++#define MNTTYPE_NFS "nfs"
++
++struct mntent {
++	char *mnt_fsname;
++	char *mnt_dir;
++	char *mnt_type;
++	char *mnt_opts;
++	int mnt_freq;
++	int mnt_passno;
++};
++
++#define setmntent(x,y) ((FILE *)0x1)
++struct mntent *getmntent __P ((FILE *fp));
++char *hasmntopt __P ((const struct mntent *mnt, const char *option));
++#define endmntent(x) ((int)1)
++
++#endif /* _MNTENT_H */
++#endif /* HAVE_MNTENT_H */
Index: files/patch-fam::mntent_compat.c++
===================================================================
RCS file: files/patch-fam::mntent_compat.c++
diff -N files/patch-fam::mntent_compat.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-fam::mntent_compat.c++	7 Oct 2001 20:27:32 -0000
@@ -0,0 +1,154 @@
+--- fam/mntent_compat.c++.orig	Sun Oct  7 15:22:17 2001
++++ fam/mntent_compat.c++	Sun Oct  7 15:22:17 2001
+@@ -0,0 +1,151 @@
++/*
++ * Copyright (c) 1980, 1989, 1993, 1994
++ *      The Regents of the University of California.  All rights reserved.
++ * Copyright (c) 2001
++ *      David Rufino <daverufino@btinternet.com>
++ *
++ * 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 <stdlib.h>
++#include <string.h>
++#include <sys/param.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++
++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");
++        if (flags & MNT_NOCLUSTERR)     res = catopt(res, "noclusterr");
++        if (flags & MNT_NOCLUSTERW)     res = catopt(res, "noclusterw");
++        if (flags & MNT_NOSYMFOLLOW)    res = catopt(res, "nosymfollow");
++        if (flags & MNT_SUIDDIR)        res = catopt(res, "suiddir");
++
++        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 */
Index: files/patch-freebsd
===================================================================
RCS file: files/patch-freebsd
diff -N files/patch-freebsd
--- files/patch-freebsd	31 Mar 2001 02:45:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,490 +0,0 @@
-diff -urN fam-oss-2.6.4/config.h.in fam-oss-2.6.4-freebsd/config.h.in
---- fam-oss-2.6.4/config.h.in	Sat May 20 05:50:17 2000
-+++ fam-oss-2.6.4-freebsd/config.h.in	Sun Mar 18 00:02:38 2001
-@@ -12,6 +12,8 @@
- /*  Define if the system has imon and IMONIOC_ ioctl flags.  */
- #undef HAVE_IMON
- 
-+#undef HAVE_MNTENT_H
-+
- /*  Define if the system has the struct revokdi and the IMONIOC_REVOKDI
- **  ioctl flag.  (IRIX 5.3 doesn't.)
- */
-diff -urN fam-oss-2.6.4/configure.in fam-oss-2.6.4-freebsd/configure.in
---- fam-oss-2.6.4/configure.in	Sat May 20 06:23:17 2000
-+++ fam-oss-2.6.4-freebsd/configure.in	Sun Mar 18 00:36:29 2001
-@@ -95,6 +95,8 @@
- dnl AC_HEADER_SYS_WAIT
- dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
- 
-+AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
-+
- dnl
- dnl  See if imon is available; if so, is it IRIX or Linux?
- dnl
-@@ -299,10 +301,10 @@
- dnl If we don't have MNTTYPE_NFS , we croak.
- dnl
- 
--FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
--FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
--FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
--FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
-+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
-+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
-+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
-+dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
- 
- dnl
- dnl  Test for bindresvport() prototype.
-diff -urN fam-oss-2.6.4/fam/Client.h fam-oss-2.6.4-freebsd/fam/Client.h
---- fam-oss-2.6.4/fam/Client.h	Sat May 20 05:46:31 2000
-+++ fam-oss-2.6.4-freebsd/fam/Client.h	Sat Mar 17 00:14:35 2001
-@@ -23,6 +23,7 @@
- #ifndef Client_included
- #define Client_included
- 
-+#include <sys/types.h>
- #include <netinet/in.h>  // for in_addr
- 
- #include "Activity.h"
-diff -urN fam-oss-2.6.4/fam/FileSystem.c++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++
---- fam-oss-2.6.4/fam/FileSystem.c++	Sat May 20 05:46:31 2000
-+++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++	Sat Mar 17 13:18:10 2001
-@@ -22,7 +22,7 @@
- 
- #include "FileSystem.h"
- 
--#include <mntent.h>
-+#include "mntent.h"
- #include <string.h>
- 
- #include "Event.h"
-diff -urN fam-oss-2.6.4/fam/FileSystemTable.c++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++
---- fam-oss-2.6.4/fam/FileSystemTable.c++	Sat May 20 05:46:31 2000
-+++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++	Sat Mar 17 23:44:17 2001
-@@ -21,9 +21,10 @@
- //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
- 
- #include <stddef.h>
-+#include <stdio.h>
- #include "FileSystemTable.h"
- 
--#include <mntent.h>
-+#include "mntent.h"
- #include <stdlib.h>
- #include <string.h>
- 
-@@ -255,7 +256,10 @@
-     //  create_fs_by_name initializes our "root" member variable.
-     if (!fs_by_name)
-     {   create_fs_by_name();
-+#if !defined(__FreeBSD__)
-+	/* there is no mtab "file" in freebsd! */
- 	mtab_watcher = new InternalClient(mtab_name, mtab_event_handler, NULL);
-+#endif
-     }
- 
-     cr.become_user();
-diff -urN fam-oss-2.6.4/fam/IMon.c++ fam-oss-2.6.4-freebsd/fam/IMon.c++
---- fam-oss-2.6.4/fam/IMon.c++	Sat May 20 05:46:31 2000
-+++ fam-oss-2.6.4-freebsd/fam/IMon.c++	Sat Mar 17 14:06:17 2001
-@@ -34,7 +34,9 @@
- #endif
- #endif
- 
--#include <sys/sysmacros.h>
-+#if !defined(__FreeBSD__)
-+#  include <sys/sysmacros.h>
-+#endif
- #include <unistd.h>
- 
- #include "Interest.h"
-diff -urN fam-oss-2.6.4/fam/Interest.c++ fam-oss-2.6.4-freebsd/fam/Interest.c++
---- fam-oss-2.6.4/fam/Interest.c++	Sat May 20 05:46:31 2000
-+++ fam-oss-2.6.4-freebsd/fam/Interest.c++	Sat Mar 17 14:06:37 2001
-@@ -25,7 +25,9 @@
- #include <string.h>
- #include <errno.h>
- #include <sys/param.h>
--#include <sys/sysmacros.h>
-+#if !defined(__FreeBSD__)
-+#  include <sys/sysmacros.h>
-+#endif
- 
- #ifdef HAVE_IRIX_XTAB_VERIFICATION
- #include <stdio.h>
-diff -urN fam-oss-2.6.4/fam/InternalClient.c++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++
---- fam-oss-2.6.4/fam/InternalClient.c++	Sat May 20 05:46:31 2000
-+++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++	Sat Mar 17 23:20:15 2001
-@@ -35,8 +35,8 @@
- {
-     assert(filename);
-     assert(h);
--    assert(filename[0] == '/');
-     Log::debug("%s watching %s", name(), filename);
-+    assert(filename[0] == '/');
-     interest = new File(filename, this, Request(0), Cred::SuperUser);
- }
- 
-diff -urN fam-oss-2.6.4/fam/Listener.c++ fam-oss-2.6.4-freebsd/fam/Listener.c++
---- fam-oss-2.6.4/fam/Listener.c++	Sat May 20 05:46:31 2000
-+++ fam-oss-2.6.4-freebsd/fam/Listener.c++	Sat Mar 17 14:12:57 2001
-@@ -22,6 +22,8 @@
- 
- #include "Listener.h"
- 
-+#include <stdio.h>
-+#include <stdlib.h>
- #include <assert.h>
- #include <fcntl.h>
- #include <sys/types.h>
-@@ -202,7 +204,11 @@
-     //  requested user and pass the name back to the client.
- 
-     char *tmpfile = tempnam("/tmp", ".fam");
-+#if defined(__FreeBSD__)
-+    sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
-+#else
-     sockaddr_un sun = { AF_UNIX, "" };
-+#endif
-     if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1))
-     {
-         Log::error("tmpnam() too long for sun_path (%d >= %d)!",
-@@ -235,7 +241,7 @@
-         return;
-     }
- 
--    if (chown(sun.sun_path, uid, -1) != 0)
-+    if (chown(sun.sun_path, uid, (gid_t)-1) != 0)
-     {   Log::perror("localclient chown");
- 	close(client_sock);
-         return;
-@@ -271,7 +277,11 @@
- 
-     // Get the new socket.
- 
-+#if defined(__FreeBSD__)
-+    struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
-+#else
-     struct sockaddr_un sun = { AF_UNIX, "" };
-+#endif
-     CONFIG_SOCKLEN_T sunlen = sizeof(sun);
-     int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen);
-     if (client_fd < 0)
-@@ -333,7 +343,11 @@
- void
- Listener::dirty_ugly_hack()
- {
-+#if defined(__FreeBSD__)
-+    static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" };
-+#else
-     static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" };
-+#endif
- 
-     int sock = socket(PF_UNIX, SOCK_STREAM, 0);
-     if (sock < 0)
-diff -urN fam-oss-2.6.4/fam/Log.c++ fam-oss-2.6.4-freebsd/fam/Log.c++
---- fam-oss-2.6.4/fam/Log.c++	Sat May 20 05:46:31 2000
-+++ fam-oss-2.6.4-freebsd/fam/Log.c++	Sat Mar 17 14:14:31 2001
-@@ -28,6 +28,8 @@
- #include <stdlib.h>
- #include <string.h>
- #include <syslog.h>
-+#include <sys/time.h>
-+#include <sys/types.h>
- #include <sys/resource.h>
- #include <sys/stat.h>
- #include <unistd.h>
-diff -urN fam-oss-2.6.4/fam/Makefile.am fam-oss-2.6.4-freebsd/fam/Makefile.am
---- fam-oss-2.6.4/fam/Makefile.am	Sat May 20 05:46:31 2000
-+++ fam-oss-2.6.4-freebsd/fam/Makefile.am	Sat Mar 17 18:12:17 2001
-@@ -72,6 +72,7 @@
-   main.c++ \
-   timeval.c++ \
-   timeval.h \
-+  mntent_compat.c++ \
-   @IMON_FUNCS@.c++
- 
- EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
-diff -urN fam-oss-2.6.4/fam/Scheduler.h fam-oss-2.6.4-freebsd/fam/Scheduler.h
---- fam-oss-2.6.4/fam/Scheduler.h	Sat May 20 05:46:32 2000
-+++ fam-oss-2.6.4-freebsd/fam/Scheduler.h	Sat Mar 17 00:14:04 2001
-@@ -24,6 +24,7 @@
- #define Scheduler_included
- 
- #include <sys/time.h>
-+#include <string.h>
- 
- #include "Boolean.h"
- 
-diff -urN fam-oss-2.6.4/fam/StringTable.h fam-oss-2.6.4-freebsd/fam/StringTable.h
---- fam-oss-2.6.4/fam/StringTable.h	Sat May 20 05:46:32 2000
-+++ fam-oss-2.6.4-freebsd/fam/StringTable.h	Sat Mar 17 18:05:38 2001
-@@ -25,6 +25,7 @@
- 
- #include <assert.h>
- #include <string.h>
-+#include "mntent.h"
- 
- //  A StringTable maps C strings onto values.  It is a cheap O(n)
- //  implementation, suitable only for small tables that are
-diff -urN fam-oss-2.6.4/fam/mntent.h fam-oss-2.6.4-freebsd/fam/mntent.h
---- fam-oss-2.6.4/fam/mntent.h	Thu Jan  1 01:00:00 1970
-+++ fam-oss-2.6.4-freebsd/fam/mntent.h	Sat Mar 17 18:11:08 2001
-@@ -0,0 +1,56 @@
-+/*
-+ *  mntent
-+ *  mntent.h - compatability header for FreeBSD
-+ *
-+ *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
-+ *  All rights reserved.
-+ *
-+ * 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.
-+ *
-+ * 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.
-+ */
-+
-+#if defined(HAVE_MNTENT_H)
-+#include <mntent.h>
-+#else
-+#ifndef _MNTENT_H
-+#define _MNTENT_H
-+#include <stdio.h>
-+
-+#define MOUNTED "dummy"
-+
-+#define MNTTYPE_NFS "nfs"
-+
-+struct mntent {
-+	char *mnt_fsname;
-+	char *mnt_dir;
-+	char *mnt_type;
-+	char *mnt_opts;
-+	int mnt_freq;
-+	int mnt_passno;
-+};
-+
-+#define setmntent(x,y) ((FILE *)0x1)
-+struct mntent *getmntent __P ((FILE *fp));
-+char *hasmntopt __P ((const struct mntent *mnt, const char *option));
-+#define endmntent(x) ((int)1)
-+
-+#endif /* _MNTENT_H */
-+#endif /* HAVE_MNTENT_H */
-diff -urN fam-oss-2.6.4/fam/mntent_compat.c++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++
---- fam-oss-2.6.4/fam/mntent_compat.c++	Thu Jan  1 01:00:00 1970
-+++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++	Sat Mar 17 23:48:07 2001
-@@ -0,0 +1,151 @@
-+/*
-+ * Copyright (c) 1980, 1989, 1993, 1994
-+ *      The Regents of the University of California.  All rights reserved.
-+ * Copyright (c) 2001
-+ *      David Rufino <daverufino@btinternet.com>
-+ *
-+ * 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 <stdlib.h>
-+#include <string.h>
-+#include <sys/param.h>
-+#include <sys/ucred.h>
-+#include <sys/mount.h>
-+
-+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");
-+        if (flags & MNT_NOCLUSTERR)     res = catopt(res, "noclusterr");
-+        if (flags & MNT_NOCLUSTERW)     res = catopt(res, "noclusterw");
-+        if (flags & MNT_NOSYMFOLLOW)    res = catopt(res, "nosymfollow");
-+        if (flags & MNT_SUIDDIR)        res = catopt(res, "suiddir");
-+
-+        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 */
-diff -urN fam-oss-2.6.4/libfam/Client.c++ fam-oss-2.6.4-freebsd/libfam/Client.c++
---- fam-oss-2.6.4/libfam/Client.c++	Sat May 20 05:46:32 2000
-+++ fam-oss-2.6.4-freebsd/libfam/Client.c++	Sat Mar 17 00:12:01 2001
-@@ -20,6 +20,7 @@
- //  with this program; if not, write the Free Software Foundation, Inc., 59
- //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
- 
-+#include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <netinet/in.h>
-diff -urN fam-oss-2.6.4/libfam/fam.c++ fam-oss-2.6.4-freebsd/libfam/fam.c++
---- fam-oss-2.6.4/libfam/fam.c++	Sat May 20 05:46:32 2000
-+++ fam-oss-2.6.4-freebsd/libfam/fam.c++	Sat Mar 17 00:12:43 2001
-@@ -21,6 +21,7 @@
- //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
- 
- #include <sys/types.h>
-+#include <rpc/rpc.h>
- #include <sys/time.h>
- #include <unistd.h>
- #include <stdlib.h>
-diff -urN fam-oss-2.6.4/test/test.c++ fam-oss-2.6.4-freebsd/test/test.c++
---- fam-oss-2.6.4/test/test.c++	Sat May 20 05:46:32 2000
-+++ fam-oss-2.6.4-freebsd/test/test.c++	Sat Mar 17 18:39:23 2001
-@@ -1,6 +1,7 @@
- #include <sys/types.h>
- #include <sys/time.h>
- #include <stdio.h>
-+#include <string.h>
- #include <unistd.h>
- #include <signal.h>
- #include <errno.h>
---- fam-oss-2.6.4/acconfig.h	Sat May 20 05:46:31 2000
-+++ fam-oss-2.6.4-freebsd/acconfig.h	Sun Mar 18 00:40:47 2001
-@@ -44,6 +44,8 @@
- **  Otherwise, we'll use MNTTYPE_NFS.  */
- #undef HAVE_FSID_NFS2
- 
-+#undef HAVE_MNTENT_H
-+
- /* Define if we have MNTTYPE_NFS2 */
- #define HAVE_MNTTYPE_NFS2 0
- 
Index: files/patch-libfam::Client.c++
===================================================================
RCS file: files/patch-libfam::Client.c++
diff -N files/patch-libfam::Client.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-libfam::Client.c++	7 Oct 2001 20:28:07 -0000
@@ -0,0 +1,10 @@
+--- libfam/Client.c++.orig	Fri May 19 23:46:32 2000
++++ libfam/Client.c++	Sun Oct  7 15:22:17 2001
+@@ -20,6 +20,7 @@
+ //  with this program; if not, write the Free Software Foundation, Inc., 59
+ //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ 
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <netinet/in.h>
Index: files/patch-libfam::Makefile.am
===================================================================
RCS file: files/patch-libfam::Makefile.am
diff -N files/patch-libfam::Makefile.am
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-libfam::Makefile.am	7 Oct 2001 21:28:53 -0000
@@ -0,0 +1,8 @@
+--- libfam/Makefile.am.orig	Fri May 19 23:46:32 2000
++++ libfam/Makefile.am	Sun Oct  7 16:28:34 2001
+@@ -11,4 +11,4 @@
+ 
+ EXTRA_DIST = fam.sym
+ 
+-CLEANFILES += ii_files/*.ii
++CLEANFILES = ii_files/*.ii
Index: files/patch-libfam::fam.c++
===================================================================
RCS file: files/patch-libfam::fam.c++
diff -N files/patch-libfam::fam.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-libfam::fam.c++	7 Oct 2001 20:28:28 -0000
@@ -0,0 +1,10 @@
+--- libfam/fam.c++.orig	Fri May 19 23:46:32 2000
++++ libfam/fam.c++	Sun Oct  7 15:22:17 2001
+@@ -21,6 +21,7 @@
+ //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ 
+ #include <sys/types.h>
++#include <rpc/rpc.h>
+ #include <sys/time.h>
+ #include <unistd.h>
+ #include <stdlib.h>
Index: files/patch-man::Makefile.am
===================================================================
RCS file: files/patch-man::Makefile.am
diff -N files/patch-man::Makefile.am
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-man::Makefile.am	23 Nov 2001 16:49:32 -0000
@@ -0,0 +1,12 @@
+--- man/Makefile.am.orig	Mon Oct 22 01:33:11 2001
++++ man/Makefile.am	Fri Nov 23 10:49:15 2001
+@@ -1,5 +1,5 @@
+-#  This is a little weird because fam.1m is generated from fam.1m.in
++#  This is a little weird because fam.8 is generated from fam.8.in
+ #  at the end of the configure script.
+-man_MANS = fam.1m fam.3x
+-EXTRA_DIST = fam.1m.in fam.3x
+-CLEANFILES = fam.1m
++man_MANS = fam.8 fam.3
++EXTRA_DIST = fam.8.in fam.3
++CLEANFILES = fam.8
Index: files/patch-man::fam.1m.in
===================================================================
RCS file: files/patch-man::fam.1m.in
diff -N files/patch-man::fam.1m.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-man::fam.1m.in	23 Nov 2001 16:52:11 -0000
@@ -0,0 +1,76 @@
+--- man/fam.1m.in.orig	Mon Oct 22 01:33:11 2001
++++ man/fam.1m.in	Fri Nov 23 10:51:54 2001
+@@ -1,6 +1,6 @@
+-.\"##  fam.1m.in
++.\"##  fam.8.in
+ .\"##
+-.\"##  When configure.in generates fam.1m, lines starting with .\"##
++.\"##  When configure.in generates fam.8, lines starting with .\"##
+ .\"##  should be removed; when building on IRIX, lines starting with
+ .\"##  .\"IRIX should have that part removed (uncommenting the rest
+ .\"##  of the line).
+@@ -9,13 +9,13 @@
+ .\"##  separate files.
+ .\"##
+ .nr X
+-.if \nX=0 .ds x} fam 1M "Silicon Graphics" "\&"
++.if \nX=0 .ds x} fam 8 "Silicon Graphics" "\&"
+ .TH \*(x}
+ .SH NAME
+ fam \- file alteration monitor
+ .SH SYNOPSIS
+ .nf
+-\f3/usr/etc/fam\f1 [ \f3\-f\f1 | \f3\-v\f1 | \f3\-d\f1 ] [ \f3\-l\f1 | \c
++\f3fam\f1 [ \f3\-f\f1 | \f3\-v\f1 | \f3\-d\f1 ] [ \f3\-l\f1 | \c
+ \f3\-t\f1 \f2NFS_polling_interval\f1 ] 
+ 	[ \f3\-T\f1 \f2idle_timeout\f1 ] [ \f3\-p\f1 \c
+ \f2program\f3.\f2version\f1 ] [ \f3\-L\f1 ] [ \f3-C\f1 ]
+@@ -24,22 +24,13 @@
+ .SH DESCRIPTION
+ \f2fam\f1 is a server that tracks changes to the filesystem and
+ relays these changes to interested applications.
+-Applications such as
+-\f2fm\f1(1G) and \f2mailbox\f1(1) present an up-to-date view of the filesystem.
+-In the absence of \f2fam\f1, these applications and others like them
+-are forced to poll the filesystem to detect changes.
+-\f2fam\f1 is
+-more efficient.
+-.P
+ Applications can request \f2fam\f1 to monitor any files or directories in
+ any filesystem.
+ When \f2fam\f1 detects changes to monitored files, it notifies
+ the appropriate application.
+ The FAM API provides a programmatic interface to \f2fam\f1; see
+-.IR fam (3X).
++.IR fam (3).
+ .P
+-\f2fam\f1 is informed of filesystem changes as they happen by the
+-kernel through the \f2imon\f1(7M) pseudo device driver.
+ If asked to
+ monitor files on an NFS mounted filesystem, \f2fam\f1 tries to use
+ \f2fam\f1 on the NFS server to monitor files.
+@@ -47,9 +38,9 @@
+ contact a remote \f2fam\f1, it polls the files instead.
+ \f2fam\f1 also polls special files.
+ .P
+-Normally, \f2fam\f1 is started by \f2inetd\f1(1M).
++Normally, \f2fam\f1 is started by \f2inetd\f1(8).
+ It is registered with
+-\f2portmap\f1(1M) as performing the sgi_fam service.
++\f2portmap\f1(8) as performing the sgi_fam service.
+ .SH OPTIONS
+ .TP 26
+ \f3\-l\f1
+@@ -196,9 +187,7 @@
+ XXX_FAM_CONF
+ .SH "SEE ALSO"
+ .\"IRIX fm(1G),
+-inetd(1M),
++fam(3),
++inetd(8),
+ .\"IRIX mailbox(1),
+-portmap(1M),
+-fam(3X),
+-imon(7M),
+-stat(1M).
++portmap(8).
Index: files/patch-man::fam.3x
===================================================================
RCS file: files/patch-man::fam.3x
diff -N files/patch-man::fam.3x
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-man::fam.3x	23 Nov 2001 16:52:23 -0000
@@ -0,0 +1,38 @@
+--- man/fam.3x.orig	Mon Oct 22 01:33:11 2001
++++ man/fam.3x	Fri Nov 23 10:51:07 2001
+@@ -1,9 +1,9 @@
+ '\"macro stdmacro
+-.if n .pH g3x.fam @(#)fam	30.3 of 1/19/86
++.if n .pH g3.fam @(#)fam	30.3 of 1/19/86
+ .nr X
+-.if \nX=0 .ds x} FAM 3X "Specialized Libraries" "\&"
+-.if \nX=1 .ds x} FAM 3X "Specialized Libraries"
+-.if \nX=2 .ds x} FAM 3X "" "\&"
++.if \nX=0 .ds x} FAM 3 "Specialized Libraries" "\&"
++.if \nX=1 .ds x} FAM 3 "Specialized Libraries"
++.if \nX=2 .ds x} FAM 3 "" "\&"
+ .if \nX=3 .ds x} FAM "" "" "\&"
+ .TH \*(x}
+ .SH NAME
+@@ -65,10 +65,9 @@
+ .PP
+ .SH DESCRIPTION
+ \fIFAM\fP monitors files and directories, notifying interested
+-applications of changes.  Routines for communicating with the fam(1M)
++applications of changes.  Routines for communicating with the fam(8)
+ server process are found in ``libfam.a'', which is loaded if the
+-option ``-lfam'' is used with cc(1) or ld(1).  The library
+-``libC.a'' (``-lC'') must also be specified.
++option ``-lfam'' is used with cc(1) or ld(1).
+ .PP
+ An application calls routines described here to establish a list of
+ files for \fIfam \fPto monitor.  \fIFam \fPgenerates events on a socket to
+@@ -282,7 +281,7 @@
+ 
+ 
+ .SH SEE ALSO
+-fam(1M).
++fam(8).
+ .SH BUGS
+ The FAMMoved event is not currently supported.
+ .PP
Index: files/patch-support::Makefile.am
===================================================================
RCS file: files/patch-support::Makefile.am
diff -N files/patch-support::Makefile.am
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-support::Makefile.am	7 Oct 2001 21:30:31 -0000
@@ -0,0 +1,9 @@
+--- support/Makefile.am.orig	Fri May 19 23:46:32 2000
++++ support/Makefile.am	Sun Oct  7 16:30:05 2001
+@@ -11,5 +11,5 @@
+ libsupport_a_DEPENDENCIES = @snprintf_o@ @foo_o@
+ libsupport_a_LIBADD       = @snprintf_o@ @foo_o@
+ 
+-CLEANFILES += @MKDEPFILE@ ii_files/*.ii
++CLEANFILES = @MKDEPFILE@ ii_files/*.ii
+ sinclude @MKDEPFILE@
Index: files/patch-test::Makefile.am
===================================================================
RCS file: files/patch-test::Makefile.am
diff -N files/patch-test::Makefile.am
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-test::Makefile.am	7 Oct 2001 21:29:41 -0000
@@ -0,0 +1,8 @@
+--- test/Makefile.am.orig	Fri May 19 23:46:32 2000
++++ test/Makefile.am	Sun Oct  7 16:29:21 2001
+@@ -4,4 +4,4 @@
+ test_SOURCES = test.c++
+ test_LDADD = ../libfam/libfam.la
+ 
+-CLEANFILES += ii_files/*.ii
++CLEANFILES = ii_files/*.ii
Index: files/patch-test::test.c++
===================================================================
RCS file: files/patch-test::test.c++
diff -N files/patch-test::test.c++
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-test::test.c++	7 Oct 2001 20:27:46 -0000
@@ -0,0 +1,10 @@
+--- test/test.c++.orig	Fri May 19 23:46:32 2000
++++ test/test.c++	Sun Oct  7 15:22:17 2001
+@@ -1,6 +1,7 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
>Release-Note:
>Audit-Trail:

From: Maxim Sobolev <sobomax@FreeBSD.ORG>
To: ishmael27@home.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: ports/32231: Update port devel/fam
Date: Fri, 23 Nov 2001 19:27:39 +0200 (EET)

 > Update fam to latest version, 2.6.6.
 > 
 > ports/devel/fam should be repo-copied to ports/sysutils/fam.
 > When originally creating this port, I mistakenly placed it in devel section
 > rather than sysutils, where it more properly belongs. Note that this would
 > require altering x11/kdelibs2 and devel/fampp LIB_DEPENDS.
 > 
 > This update also remove files/patch-freebsd, which touched multiple files, and
 > instead adds several individual patch files.
 
 Does it really work on FreeBSD? I am curious because I had almost
 completed from-scratch implementation based around BSD kquque(2)
 interface and planning to release it to the world really soon.
 
 -Maxim
State-Changed-From-To: open->analyzed 
State-Changed-By: petef 
State-Changed-When: Sun Nov 25 01:27:32 PST 2001 
State-Changed-Why:  
That's an awful lot of patches - have you submitted them to the author to 
include?  (since you have the freebsd ifdefs and compatability headers, I'd 
think he would include them for the next release.) 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32231 

From: Jeremy Norris <ishmael27@home.com>
To: petef@FreeBSD.org
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/32231: Update port devel/fam
Date: Sun, 25 Nov 2001 19:03:54 -0600

 I have sent these patches to the official FAM mailing list <fam@oss.sgi.com>. I
 have also created a bug in SGI's OSS bugzilla (http://oss.sgi.com/bugzilla),
 tracker ID 92. As mentioned in the PR's body, most of these patches already
 exist in files/patch-freebsd; I have merely broken them apart, 1 file patched
 per individual patchfile. This update also does make some more changes
 (changing some wording in manpages, default installation directory, etc.) so
 that they better integrate into FreeBSD.
 
 Finally, please use this diff instead of the original in the PR. It changes
 installation dir to ${LOCALBASE}/sbin, removes files/fam.sh.sample, and updates
 pkg-message to give better instructions on how to start FAM. Don't forget to
 cvs rm files/fam.sh.sample and files/patch-freebsd. Also, the repo-copy request
 still stands (move from devel to sysutils).
 
 Jeremy
 
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/Makefile,v
 retrieving revision 1.1
 diff -u -r1.1 Makefile
 --- Makefile	31 Mar 2001 02:45:55 -0000	1.1
 +++ Makefile	26 Nov 2001 00:39:17 -0000
 @@ -6,24 +6,67 @@
  #
  
  PORTNAME=	fam
 -PORTVERSION=	2.6.4
 -CATEGORIES=	devel
 +PORTVERSION=	2.6.6
 +CATEGORIES=	sysutils
  MASTER_SITES=	ftp://oss.sgi.com/projects/fam/download/
 -DISTNAME=	${PORTNAME}-oss-${PORTVERSION}
  
  MAINTAINER=	ishmael27@home.com
  
  USE_AUTOMAKE=	yes
 +AUTOMAKE_ARGS=	--add-missing --copy --foreign --include-deps
  USE_LIBTOOL=	yes
 -USE_GMAKE=	yes
 -PATCH_STRIP=	-p1
 +EXTRACT_AFTER_ARGS=	| ${TAR} -xf - -C ${WRKSRC}
 +PKGMESSAGE=	${WRKDIR}/pkg-message
  INSTALLS_SHLIB=	yes
  
 -MAN1=		fam.1m
 -MAN3=		fam.3x
 +MAN3=		fam.3
 +MAN8=		fam.8
 +
 +.if exists(/usr/sbin/rpcbind)
 +PORTMAP=	rpcbind
 +.else
 +PORTMAP=	portmap
 +.endif
 +
 +do-extract:
 +	@${RM} -rf ${WRKDIR}
 +	@${MKDIR} ${WRKSRC}
 +	@for file in ${EXTRACT_ONLY}; do \
 +		if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
 +		then \
 +			exit 1; \
 +		fi \
 +	done
 +.if !defined(EXTRACT_PRESERVE_OWNERSHIP)
 +	@if [ `id -u` = 0 ]; then \
 +		${CHMOD} -R ug-s ${WRKDIR}; \
 +		${CHOWN} -R 0:0 ${WRKDIR}; \
 +	fi
 +.endif
 +
 +pre-configure:
 +	@${MV} ${WRKSRC}/man/fam.1m.in ${WRKSRC}/man/fam.8.in
 +	@${MV} ${WRKSRC}/man/fam.3x ${WRKSRC}/man/fam.3
 +	@${RM} -f ${WRKSRC}/install-sh ${WRKSRC}/missing \
 +		${WRKSRC}/mkinstalldirs
 +	@cd ${WRKSRC} && ${LOCALBASE}/bin/libtoolize --force --copy && \
 +		${ACLOCAL} && ${AUTOHEADER}
 +
 +post-configure:
 +	@${FIND} ${WRKSRC} -name "Makefile" |xargs ${PERL} -pi -e  '\
 +		s|^ACLOCAL =.*|ACLOCAL = ${ACLOCAL}| ; \
 +		s|^AUTOCONF =.*|AUTOCONF = ${AUTOCONF}| ; \
 +		s|^AUTOMAKE =.*|AUTOMAKE = ${AUTOMAKE}| ; \
 +		s|^AUTOHEADER =.*|AUTOHEADER = ${AUTOHEADER}|'
 +	@${PERL} -pi -e 's|%%PORTMAP%%|${PORTMAP}|g' ${WRKSRC}/man/fam.8
 +	@${MV} ${WRKSRC}/fam/fam.conf ${WRKSRC}/fam/fam.conf.sample
 +	@${SED} -e 's|%%PORTMAP%%|${PORTMAP}|g' -e 's|%%PREFIX%%|${PREFIX}|g' \
 +		${PKGDIR}/pkg-message >${PKGMESSAGE}
  
  post-install:
 -	@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/fam.sh.sample ${PREFIX}/etc/rc.d/fam.sh.sample
 +	@if [ ! -f ${PREFIX}/etc/fam.conf ]; then \
 +		${CP} -p ${PREFIX}/etc/fam.conf.sample ${PREFIX}/etc/fam.conf; \
 +	fi
  	@${CAT} ${PKGMESSAGE}
  
  .include <bsd.port.mk>
 Index: distinfo
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/distinfo,v
 retrieving revision 1.1
 diff -u -r1.1 distinfo
 --- distinfo	31 Mar 2001 02:45:55 -0000	1.1
 +++ distinfo	23 Nov 2001 14:53:49 -0000
 @@ -1 +1 @@
 -MD5 (fam-oss-2.6.4.tar.gz) = d060919b3d9ede61a8b68eae1ded53ce
 +MD5 (fam-2.6.6.tar.gz) = c1ecf4136b673e49fd0ea7a2e50d9885
 Index: pkg-message
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/pkg-message,v
 retrieving revision 1.1
 diff -u -r1.1 pkg-message
 --- pkg-message	31 Mar 2001 02:45:55 -0000	1.1
 +++ pkg-message	25 Nov 2001 23:13:59 -0000
 @@ -1,8 +1,17 @@
 -************************************************************************
  
 -In order to run this port, please add the following line to /etc/rpc if
 -it is not already there:
 +To run FAM, please check and perform the following:
  
 +1. Be sure that the following line is in /etc/rpc
  sgi_fam		391002
  
 -************************************************************************
 +2. Be sure that %%PORTMAP%%(8) is running.
 +You probably will want to add the following line to /etc/rc.conf
 +portmap_enable="YES"
 +
 +3. Be sure that the following line is in /etc/inetd.conf
 +sgi_fam/1-2	stream rpc/tcp wait root	%%PREFIX%%/sbin/fam	fam
 +
 +4. Be sure that inetd(8) is running.
 +You probably will want to add the following line to /etc/rc.conf
 +inetd_enable="YES"
 +
 Index: pkg-plist
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/pkg-plist,v
 retrieving revision 1.2
 diff -u -r1.2 pkg-plist
 --- pkg-plist	21 May 2001 07:13:05 -0000	1.2
 +++ pkg-plist	26 Nov 2001 00:20:53 -0000
 @@ -1,9 +1,9 @@
 -bin/fam
 -etc/fam.conf
 -etc/rc.d/fam.sh.sample
 +@comment $FreeBSD$
 +@unexec if cmp -s %D/etc/fam.conf %D/etc/fam.conf.sample; then rm -f %D/etc/fam.conf; fi
 +etc/fam.conf.sample
 +@exec if [ ! -f %D/etc/fam.conf ]; then cp -p %D/%F %B/fam.conf; fi
  include/fam.h
 -lib/fam/editconf.perl
  lib/libfam.a
  lib/libfam.so
  lib/libfam.so.0
 -@dirrm lib/fam
 +sbin/fam
 Index: files/fam.sh.sample
 ===================================================================
 RCS file: files/fam.sh.sample
 diff -N files/fam.sh.sample
 --- files/fam.sh.sample	31 Mar 2001 02:45:55 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,20 +0,0 @@
 -#!/bin/sh
 -
 -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
 -    echo "$0: Cannot determine the PREFIX" >&2
 -    exit 1
 -fi
 -
 -case "$1" in
 -start)
 -	[ -x ${PREFIX}/bin/fam ] && ( ${PREFIX}/bin/fam & ) && echo -n ' fam'
 -	;;
 -stop)
 -	killall fam && echo -n ' fam'
 -	;;
 -*)
 -	echo "Usage: `basename $0` {start|stop}" >&2
 -	;;
 -esac
 -
 -exit 0
 Index: files/patch-Makefile.am
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/files/patch-Makefile.am,v
 retrieving revision 1.1
 diff -u -r1.1 patch-Makefile.am
 --- files/patch-Makefile.am	31 Mar 2001 02:45:55 -0000	1.1
 +++ files/patch-Makefile.am	26 Nov 2001 00:46:40 -0000
 @@ -1,33 +1,55 @@
 ---- Makefile.am.orig	Fri May 19 23:46:31 2000
 -+++ Makefile.am	Mon Mar 19 11:51:05 2001
 -@@ -7,30 +7,3 @@
 - rpm: dist
 - 	@cd build && $(MAKE) $(AM_MAKEFLAGS) rpm
 +--- Makefile.am.orig	Mon Oct 22 01:33:09 2001
 ++++ Makefile.am	Sun Nov 25 18:46:14 2001
 +@@ -1,6 +1,6 @@
 + include $(top_srcdir)/common.am
   
 --#  We proceed even if these commands fail because this might be an install
 --#  into $DESTDIR by a non-root user.
 +-SUBDIRS = util include support libfam fam man test build
 ++SUBDIRS = include support libfam fam man
 + 
 + EXTRA_DIST = common.am INSTALL.rpm
 + 
 +@@ -9,28 +9,28 @@
 + 
 + #  We proceed even if these commands fail because this might be an install
 + #  into $DESTDIR by a non-root user.
  -install-exec-hook:
  -	-@if test "no$(LDCONFIG)" != "no"; then \
 --##	    echo "Adding $(libdir) to ld.so.conf..."; \
 ++#install-exec-hook:
 ++#	-@if test "no$(LDCONFIG)" != "no"; then \
 + ##	    echo "Adding $(libdir) to ld.so.conf..."; \
  -	    $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \
  -	    exec $(LDCONFIG); \
  -	fi
 --##	@echo "Adding fam to rpc..."
 ++#	    $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \
 ++#	    exec $(LDCONFIG); \
 ++#	fi
 + ##	@echo "Adding fam to rpc..."
  -	-@$(EDITCONF) rpc add 391002 "sgi_fam		391002"
 --##	@echo "Adding fam to inetd.conf..."
 ++#	-@$(EDITCONF) rpc add 391002 "sgi_fam		391002"
 + ##	@echo "Adding fam to inetd.conf..."
  -	-@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
  -	    "#  fam, the File Alteration Monitor, http://oss.sgi.com/projects/fam/" \
  -	    "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
  -	@echo "Restarting inetd..."
  -	-@killall -HUP inetd
 --
 --#  We don't remove $(libdir) from ld.so.conf here because we don't have
 --#  a way to tell whether we're the ones who added it, and other things
 --#  probably use it as well.
 ++#	-@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
 ++#	    "#  fam, the File Alteration Monitor, http://oss.sgi.com/projects/fam/" \
 ++#	    "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
 ++#	@echo "Restarting inetd..."
 ++#	-@killall -HUP inetd
 + 
 + #  We don't remove $(libdir) from ld.so.conf here because we don't have
 + #  a way to tell whether we're the ones who added it, and other things
 + #  probably use it as well.
  -uninstall-local:
 --##	@echo "Removing fam from rpc..."
 ++#uninstall-local:
 + ##	@echo "Removing fam from rpc..."
  -	-@$(EDITCONF) rpc remove 391002
 --##	@echo "Removing fam from inetd.conf..."
 ++#	-@$(EDITCONF) rpc remove 391002
 + ##	@echo "Removing fam from inetd.conf..."
  -	-@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
  -	@echo "Restarting inetd..."
  -	-@killall -HUP inetd
 ++#	-@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
 ++#	@echo "Restarting inetd..."
 ++#	-@killall -HUP inetd
 Index: files/patch-acconfig.h
 ===================================================================
 RCS file: files/patch-acconfig.h
 diff -N files/patch-acconfig.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-acconfig.h	23 Nov 2001 15:54:25 -0000
 @@ -0,0 +1,11 @@
 +--- acconfig.h.orig	Mon Oct 22 01:33:09 2001
 ++++ acconfig.h	Fri Nov 23 09:54:00 2001
 +@@ -47,6 +47,8 @@
 + **  Otherwise, we'll use MNTTYPE_NFS.  */
 + #undef HAVE_FSID_NFS2
 + 
 ++#undef HAVE_MNTENT_H
 ++
 + /* Define if we have MNTTYPE_NFS2 */
 + #define HAVE_MNTTYPE_NFS2 0
 + 
 Index: files/patch-common.am
 ===================================================================
 RCS file: files/patch-common.am
 diff -N files/patch-common.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-common.am	7 Oct 2001 21:40:51 -0000
 @@ -0,0 +1,11 @@
 +--- common.am.orig	Fri May 19 23:46:31 2000
 ++++ common.am	Sun Oct  7 16:40:38 2001
 +@@ -1,7 +1,7 @@
 + #  Since we're not always using gcc, we don't want to use dependency
 + #  tracking.  (It croaks non-GNU compilers.)  Seems like this should be
 + #  configurable through autoconf!
 +-AUTOMAKE_OPTIONS=no-dependencies
 ++#AUTOMAKE_OPTIONS=no-dependencies
 + 
 + #  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 + INCLUDES = @FAMPROTOINC@ -DCONFIG_ETC_CONFIG_PATH=\"@FAM_CONF@\"
 Index: files/patch-config.h.in
 ===================================================================
 RCS file: files/patch-config.h.in
 diff -N files/patch-config.h.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-config.h.in	7 Oct 2001 20:28:42 -0000
 @@ -0,0 +1,11 @@
 +--- config.h.in.orig	Fri May 19 23:50:17 2000
 ++++ config.h.in	Sun Oct  7 15:22:17 2001
 +@@ -12,6 +12,8 @@
 + /*  Define if the system has imon and IMONIOC_ ioctl flags.  */
 + #undef HAVE_IMON
 + 
 ++#undef HAVE_MNTENT_H
 ++
 + /*  Define if the system has the struct revokdi and the IMONIOC_REVOKDI
 + **  ioctl flag.  (IRIX 5.3 doesn't.)
 + */
 Index: files/patch-configure.in
 ===================================================================
 RCS file: files/patch-configure.in
 diff -N files/patch-configure.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-configure.in	26 Nov 2001 00:42:27 -0000
 @@ -0,0 +1,79 @@
 +--- configure.in.orig	Sun Nov  4 23:31:30 2001
 ++++ configure.in	Sun Nov 25 18:28:59 2001
 +@@ -95,6 +95,8 @@
 + dnl AC_HEADER_SYS_WAIT
 + dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
 + 
 ++AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
 ++
 + dnl
 + dnl  See if imon is available; if so, is it IRIX or Linux?
 + dnl
 +@@ -310,10 +312,10 @@
 + dnl If we don't have MNTTYPE_NFS , we croak.
 + dnl
 + 
 +-FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 +-FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 +-FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 +-FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 + 
 + dnl
 + dnl  Test for bindresvport() prototype.
 +@@ -516,8 +518,8 @@
 + 
 + dnl
 + dnl  This grief is for replacing XXX_FAM_CONF with $FAM_CONF
 +-dnl  in the fam(1M) man page.  (Simply putting @FAM_CONF@ in
 +-dnl  fam.1m.in puts the string "$sysconfdir/fam.conf" in the
 ++dnl  in the fam(8) man page.  (Simply putting @FAM_CONF@ in
 ++dnl  fam.8.in puts the string "$sysconfdir/fam.conf" in the
 + dnl  man page, which isn't acceptable.  Isn't there a way to make
 + dnl  autoconf handle this??)
 + dnl
 +@@ -529,7 +531,7 @@
 + [
 +     TMPFILE=configure.tmp
 +     for f in $CONFIG_FILES; do
 +-        if test `basename $f` != 'fam.1m'; then
 ++        if test `basename $f` != 'fam.8'; then
 +             continue
 +         fi
 +         echo "replacing XXX_FAM_CONF with $FAM_CONF and removing maintainer comments in $f"
 +@@ -554,25 +556,25 @@
 + dnl
 + AC_OUTPUT(
 +     Makefile 
 +-    build/Makefile
 +-    build/rpm/Makefile
 +-    build/rpm/rpm.spec
 ++dnl    build/Makefile
 ++dnl    build/rpm/Makefile
 ++dnl    build/rpm/rpm.spec
 +     fam/Makefile
 +     fam/fam.conf
 +     include/Makefile
 +     libfam/Makefile
 +     man/Makefile
 +-    man/fam.1m
 ++    man/fam.8
 +     support/Makefile
 +     test/Makefile
 +-    util/Makefile
 +-    util/editconf/Makefile
 ++dnl    util/Makefile
 ++dnl    util/editconf/Makefile
 + )
 + 
 + dnl 
 + dnl  fam is a good deal less interesting without imon.
 + dnl 
 +-if test "$have_imon" != 'yes'; then
 ++if test `uname` = Linux && "$have_imon" != 'yes'; then
 +     cat << EOF
 + 
 +   ******************************************************************
 Index: files/patch-fam::Client.h
 ===================================================================
 RCS file: files/patch-fam::Client.h
 diff -N files/patch-fam::Client.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Client.h	7 Oct 2001 20:22:45 -0000
 @@ -0,0 +1,10 @@
 +--- fam/Client.h.orig	Fri May 19 23:46:31 2000
 ++++ fam/Client.h	Sun Oct  7 15:22:17 2001
 +@@ -23,6 +23,7 @@
 + #ifndef Client_included
 + #define Client_included
 + 
 ++#include <sys/types.h>
 + #include <netinet/in.h>  // for in_addr
 + 
 + #include "Activity.h"
 Index: files/patch-fam::FileSystem.c++
 ===================================================================
 RCS file: files/patch-fam::FileSystem.c++
 diff -N files/patch-fam::FileSystem.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::FileSystem.c++	7 Oct 2001 20:23:29 -0000
 @@ -0,0 +1,11 @@
 +--- fam/FileSystem.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/FileSystem.c++	Sun Oct  7 15:22:17 2001
 +@@ -22,7 +22,7 @@
 + 
 + #include "FileSystem.h"
 + 
 +-#include <mntent.h>
 ++#include "mntent.h"
 + #include <string.h>
 + 
 + #include "Event.h"
 Index: files/patch-fam::FileSystemTable.c++
 ===================================================================
 RCS file: files/patch-fam::FileSystemTable.c++
 diff -N files/patch-fam::FileSystemTable.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::FileSystemTable.c++	7 Oct 2001 20:24:05 -0000
 @@ -0,0 +1,25 @@
 +--- fam/FileSystemTable.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/FileSystemTable.c++	Sun Oct  7 15:22:17 2001
 +@@ -21,9 +21,10 @@
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 + 
 + #include <stddef.h>
 ++#include <stdio.h>
 + #include "FileSystemTable.h"
 + 
 +-#include <mntent.h>
 ++#include "mntent.h"
 + #include <stdlib.h>
 + #include <string.h>
 + 
 +@@ -255,7 +256,10 @@
 +     //  create_fs_by_name initializes our "root" member variable.
 +     if (!fs_by_name)
 +     {   create_fs_by_name();
 ++#if !defined(__FreeBSD__)
 ++	/* there is no mtab "file" in freebsd! */
 + 	mtab_watcher = new InternalClient(mtab_name, mtab_event_handler, NULL);
 ++#endif
 +     }
 + 
 +     cr.become_user();
 Index: files/patch-fam::IMon.c++
 ===================================================================
 RCS file: files/patch-fam::IMon.c++
 diff -N files/patch-fam::IMon.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::IMon.c++	7 Oct 2001 20:24:25 -0000
 @@ -0,0 +1,13 @@
 +--- fam/IMon.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/IMon.c++	Sun Oct  7 15:22:17 2001
 +@@ -34,7 +34,9 @@
 + #endif
 + #endif
 + 
 +-#include <sys/sysmacros.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/sysmacros.h>
 ++#endif
 + #include <unistd.h>
 + 
 + #include "Interest.h"
 Index: files/patch-fam::Interest.c++
 ===================================================================
 RCS file: files/patch-fam::Interest.c++
 diff -N files/patch-fam::Interest.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Interest.c++	7 Oct 2001 20:24:54 -0000
 @@ -0,0 +1,13 @@
 +--- fam/Interest.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/Interest.c++	Sun Oct  7 15:22:17 2001
 +@@ -25,7 +25,9 @@
 + #include <string.h>
 + #include <errno.h>
 + #include <sys/param.h>
 +-#include <sys/sysmacros.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/sysmacros.h>
 ++#endif
 + 
 + #ifdef HAVE_IRIX_XTAB_VERIFICATION
 + #include <stdio.h>
 Index: files/patch-fam::InternalClient.c++
 ===================================================================
 RCS file: files/patch-fam::InternalClient.c++
 diff -N files/patch-fam::InternalClient.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::InternalClient.c++	7 Oct 2001 20:25:13 -0000
 @@ -0,0 +1,12 @@
 +--- fam/InternalClient.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/InternalClient.c++	Sun Oct  7 15:22:17 2001
 +@@ -35,8 +35,8 @@
 + {
 +     assert(filename);
 +     assert(h);
 +-    assert(filename[0] == '/');
 +     Log::debug("%s watching %s", name(), filename);
 ++    assert(filename[0] == '/');
 +     interest = new File(filename, this, Request(0), Cred::SuperUser);
 + }
 + 
 Index: files/patch-fam::Listener.c++
 ===================================================================
 RCS file: files/patch-fam::Listener.c++
 diff -N files/patch-fam::Listener.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Listener.c++	23 Nov 2001 15:53:02 -0000
 @@ -0,0 +1,56 @@
 +--- fam/Listener.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Listener.c++	Fri Nov 23 09:52:14 2001
 +@@ -22,6 +22,8 @@
 + 
 + #include "Listener.h"
 + 
 ++#include <stdio.h>
 ++#include <stdlib.h>
 + #include <assert.h>
 + #include <fcntl.h>
 + #include <sys/types.h>
 +@@ -205,7 +207,11 @@
 +     unsetenv("TMPDIR");
 + 
 +     char *tmpfile = tempnam("/tmp", ".fam");
 ++#if defined(__FreeBSD__)
 ++    sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 ++#else
 +     sockaddr_un sun = { AF_UNIX, "" };
 ++#endif
 +     if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1))
 +     {
 +         Log::error("tmpnam() too long for sun_path (%d >= %d)!",
 +@@ -239,7 +245,7 @@
 +         return;
 +     }
 + 
 +-    if (chown(sun.sun_path, uid, -1) != 0)
 ++    if (chown(sun.sun_path, uid, (gid_t)-1) != 0)
 +     {   Log::perror("localclient chown");
 + 	close(client_sock);
 +         return;
 +@@ -275,7 +281,11 @@
 + 
 +     // Get the new socket.
 + 
 ++#if defined(__FreeBSD__)
 ++    struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 ++#else
 +     struct sockaddr_un sun = { AF_UNIX, "" };
 ++#endif
 +     CONFIG_SOCKLEN_T sunlen = sizeof(sun);
 +     int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen);
 +     if (client_fd < 0)
 +@@ -337,7 +347,11 @@
 + void
 + Listener::dirty_ugly_hack()
 + {
 ++#if defined(__FreeBSD__)
 ++    static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" };
 ++#else
 +     static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" };
 ++#endif
 + 
 +     int sock = socket(PF_UNIX, SOCK_STREAM, 0);
 +     if (sock < 0)
 Index: files/patch-fam::Log.c++
 ===================================================================
 RCS file: files/patch-fam::Log.c++
 diff -N files/patch-fam::Log.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Log.c++	7 Oct 2001 20:25:48 -0000
 @@ -0,0 +1,11 @@
 +--- fam/Log.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/Log.c++	Sun Oct  7 15:22:17 2001
 +@@ -28,6 +28,8 @@
 + #include <stdlib.h>
 + #include <string.h>
 + #include <syslog.h>
 ++#include <sys/time.h>
 ++#include <sys/types.h>
 + #include <sys/resource.h>
 + #include <sys/stat.h>
 + #include <unistd.h>
 Index: files/patch-fam::Makefile.am
 ===================================================================
 RCS file: files/patch-fam::Makefile.am
 diff -N files/patch-fam::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Makefile.am	26 Nov 2001 00:38:44 -0000
 @@ -0,0 +1,27 @@
 +--- fam/Makefile.am.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Makefile.am	Sun Nov 25 18:38:06 2001
 +@@ -1,7 +1,7 @@
 + include $(top_srcdir)/common.am
 + 
 +-bin_PROGRAMS = fam
 +-sysconf_DATA = fam.conf
 ++sbin_PROGRAMS = fam
 ++sysconf_DATA = fam.conf.sample
 + 
 + fam_SOURCES = \
 +   Activity.c++ \
 +@@ -72,11 +72,12 @@
 +   main.c++ \
 +   timeval.c++ \
 +   timeval.h \
 ++  mntent_compat.c++ \
 +   @IMON_FUNCS@.c++
 + 
 + EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
 + 
 + fam_LDADD = -lrpcsvc $(top_srcdir)/support/libsupport.a
 + 
 +-CLEANFILES += @MKDEPFILE@ ii_files/*.ii
 +-sinclude @MKDEPFILE@
 ++CLEANFILES = @MKDEPFILE@ ii_files/*.ii
 ++#sinclude @MKDEPFILE@
 Index: files/patch-fam::Scheduler.h
 ===================================================================
 RCS file: files/patch-fam::Scheduler.h
 diff -N files/patch-fam::Scheduler.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Scheduler.h	7 Oct 2001 20:26:25 -0000
 @@ -0,0 +1,10 @@
 +--- fam/Scheduler.h.orig	Fri May 19 23:46:32 2000
 ++++ fam/Scheduler.h	Sun Oct  7 15:22:17 2001
 +@@ -24,6 +24,7 @@
 + #define Scheduler_included
 + 
 + #include <sys/time.h>
 ++#include <string.h>
 + 
 + #include "Boolean.h"
 + 
 Index: files/patch-fam::StringTable.h
 ===================================================================
 RCS file: files/patch-fam::StringTable.h
 diff -N files/patch-fam::StringTable.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::StringTable.h	7 Oct 2001 20:26:42 -0000
 @@ -0,0 +1,10 @@
 +--- fam/StringTable.h.orig	Fri May 19 23:46:32 2000
 ++++ fam/StringTable.h	Sun Oct  7 15:22:17 2001
 +@@ -25,6 +25,7 @@
 + 
 + #include <assert.h>
 + #include <string.h>
 ++#include "mntent.h"
 + 
 + //  A StringTable maps C strings onto values.  It is a cheap O(n)
 + //  implementation, suitable only for small tables that are
 Index: files/patch-fam::fam.conf.in
 ===================================================================
 RCS file: files/patch-fam::fam.conf.in
 diff -N files/patch-fam::fam.conf.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::fam.conf.in	26 Nov 2001 00:24:01 -0000
 @@ -0,0 +1,11 @@
 +--- fam/fam.conf.in.orig	Mon Oct 22 01:33:11 2001
 ++++ fam/fam.conf.in	Sun Nov 25 18:23:46 2001
 +@@ -6,7 +6,7 @@
 + #  fam.conf
 + #
 + #  For more information on the configuration options below, see the
 +-#  fam(1M) man page.
 ++#  fam(8) man page.
 + 
 + #
 + #  insecure_compatibility disables authentication.  This causes
 Index: files/patch-fam::mntent.h
 ===================================================================
 RCS file: files/patch-fam::mntent.h
 diff -N files/patch-fam::mntent.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::mntent.h	7 Oct 2001 20:27:09 -0000
 @@ -0,0 +1,59 @@
 +--- fam/mntent.h.orig	Sun Oct  7 15:22:17 2001
 ++++ fam/mntent.h	Sun Oct  7 15:22:17 2001
 +@@ -0,0 +1,56 @@
 ++/*
 ++ *  mntent
 ++ *  mntent.h - compatability header for FreeBSD
 ++ *
 ++ *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
 ++ *  All rights reserved.
 ++ *
 ++ * 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.
 ++ *
 ++ * 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.
 ++ */
 ++
 ++#if defined(HAVE_MNTENT_H)
 ++#include <mntent.h>
 ++#else
 ++#ifndef _MNTENT_H
 ++#define _MNTENT_H
 ++#include <stdio.h>
 ++
 ++#define MOUNTED "dummy"
 ++
 ++#define MNTTYPE_NFS "nfs"
 ++
 ++struct mntent {
 ++	char *mnt_fsname;
 ++	char *mnt_dir;
 ++	char *mnt_type;
 ++	char *mnt_opts;
 ++	int mnt_freq;
 ++	int mnt_passno;
 ++};
 ++
 ++#define setmntent(x,y) ((FILE *)0x1)
 ++struct mntent *getmntent __P ((FILE *fp));
 ++char *hasmntopt __P ((const struct mntent *mnt, const char *option));
 ++#define endmntent(x) ((int)1)
 ++
 ++#endif /* _MNTENT_H */
 ++#endif /* HAVE_MNTENT_H */
 Index: files/patch-fam::mntent_compat.c++
 ===================================================================
 RCS file: files/patch-fam::mntent_compat.c++
 diff -N files/patch-fam::mntent_compat.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::mntent_compat.c++	7 Oct 2001 20:27:32 -0000
 @@ -0,0 +1,154 @@
 +--- fam/mntent_compat.c++.orig	Sun Oct  7 15:22:17 2001
 ++++ fam/mntent_compat.c++	Sun Oct  7 15:22:17 2001
 +@@ -0,0 +1,151 @@
 ++/*
 ++ * Copyright (c) 1980, 1989, 1993, 1994
 ++ *      The Regents of the University of California.  All rights reserved.
 ++ * Copyright (c) 2001
 ++ *      David Rufino <daverufino@btinternet.com>
 ++ *
 ++ * 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 <stdlib.h>
 ++#include <string.h>
 ++#include <sys/param.h>
 ++#include <sys/ucred.h>
 ++#include <sys/mount.h>
 ++
 ++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");
 ++        if (flags & MNT_NOCLUSTERR)     res = catopt(res, "noclusterr");
 ++        if (flags & MNT_NOCLUSTERW)     res = catopt(res, "noclusterw");
 ++        if (flags & MNT_NOSYMFOLLOW)    res = catopt(res, "nosymfollow");
 ++        if (flags & MNT_SUIDDIR)        res = catopt(res, "suiddir");
 ++
 ++        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 */
 Index: files/patch-freebsd
 ===================================================================
 RCS file: files/patch-freebsd
 diff -N files/patch-freebsd
 --- files/patch-freebsd	31 Mar 2001 02:45:55 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,490 +0,0 @@
 -diff -urN fam-oss-2.6.4/config.h.in fam-oss-2.6.4-freebsd/config.h.in
 ---- fam-oss-2.6.4/config.h.in	Sat May 20 05:50:17 2000
 -+++ fam-oss-2.6.4-freebsd/config.h.in	Sun Mar 18 00:02:38 2001
 -@@ -12,6 +12,8 @@
 - /*  Define if the system has imon and IMONIOC_ ioctl flags.  */
 - #undef HAVE_IMON
 - 
 -+#undef HAVE_MNTENT_H
 -+
 - /*  Define if the system has the struct revokdi and the IMONIOC_REVOKDI
 - **  ioctl flag.  (IRIX 5.3 doesn't.)
 - */
 -diff -urN fam-oss-2.6.4/configure.in fam-oss-2.6.4-freebsd/configure.in
 ---- fam-oss-2.6.4/configure.in	Sat May 20 06:23:17 2000
 -+++ fam-oss-2.6.4-freebsd/configure.in	Sun Mar 18 00:36:29 2001
 -@@ -95,6 +95,8 @@
 - dnl AC_HEADER_SYS_WAIT
 - dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
 - 
 -+AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
 -+
 - dnl
 - dnl  See if imon is available; if so, is it IRIX or Linux?
 - dnl
 -@@ -299,10 +301,10 @@
 - dnl If we don't have MNTTYPE_NFS , we croak.
 - dnl
 - 
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 --FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 - 
 - dnl
 - dnl  Test for bindresvport() prototype.
 -diff -urN fam-oss-2.6.4/fam/Client.h fam-oss-2.6.4-freebsd/fam/Client.h
 ---- fam-oss-2.6.4/fam/Client.h	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Client.h	Sat Mar 17 00:14:35 2001
 -@@ -23,6 +23,7 @@
 - #ifndef Client_included
 - #define Client_included
 - 
 -+#include <sys/types.h>
 - #include <netinet/in.h>  // for in_addr
 - 
 - #include "Activity.h"
 -diff -urN fam-oss-2.6.4/fam/FileSystem.c++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++
 ---- fam-oss-2.6.4/fam/FileSystem.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++	Sat Mar 17 13:18:10 2001
 -@@ -22,7 +22,7 @@
 - 
 - #include "FileSystem.h"
 - 
 --#include <mntent.h>
 -+#include "mntent.h"
 - #include <string.h>
 - 
 - #include "Event.h"
 -diff -urN fam-oss-2.6.4/fam/FileSystemTable.c++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++
 ---- fam-oss-2.6.4/fam/FileSystemTable.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++	Sat Mar 17 23:44:17 2001
 -@@ -21,9 +21,10 @@
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 - 
 - #include <stddef.h>
 -+#include <stdio.h>
 - #include "FileSystemTable.h"
 - 
 --#include <mntent.h>
 -+#include "mntent.h"
 - #include <stdlib.h>
 - #include <string.h>
 - 
 -@@ -255,7 +256,10 @@
 -     //  create_fs_by_name initializes our "root" member variable.
 -     if (!fs_by_name)
 -     {   create_fs_by_name();
 -+#if !defined(__FreeBSD__)
 -+	/* there is no mtab "file" in freebsd! */
 - 	mtab_watcher = new InternalClient(mtab_name, mtab_event_handler, NULL);
 -+#endif
 -     }
 - 
 -     cr.become_user();
 -diff -urN fam-oss-2.6.4/fam/IMon.c++ fam-oss-2.6.4-freebsd/fam/IMon.c++
 ---- fam-oss-2.6.4/fam/IMon.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/IMon.c++	Sat Mar 17 14:06:17 2001
 -@@ -34,7 +34,9 @@
 - #endif
 - #endif
 - 
 --#include <sys/sysmacros.h>
 -+#if !defined(__FreeBSD__)
 -+#  include <sys/sysmacros.h>
 -+#endif
 - #include <unistd.h>
 - 
 - #include "Interest.h"
 -diff -urN fam-oss-2.6.4/fam/Interest.c++ fam-oss-2.6.4-freebsd/fam/Interest.c++
 ---- fam-oss-2.6.4/fam/Interest.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Interest.c++	Sat Mar 17 14:06:37 2001
 -@@ -25,7 +25,9 @@
 - #include <string.h>
 - #include <errno.h>
 - #include <sys/param.h>
 --#include <sys/sysmacros.h>
 -+#if !defined(__FreeBSD__)
 -+#  include <sys/sysmacros.h>
 -+#endif
 - 
 - #ifdef HAVE_IRIX_XTAB_VERIFICATION
 - #include <stdio.h>
 -diff -urN fam-oss-2.6.4/fam/InternalClient.c++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++
 ---- fam-oss-2.6.4/fam/InternalClient.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++	Sat Mar 17 23:20:15 2001
 -@@ -35,8 +35,8 @@
 - {
 -     assert(filename);
 -     assert(h);
 --    assert(filename[0] == '/');
 -     Log::debug("%s watching %s", name(), filename);
 -+    assert(filename[0] == '/');
 -     interest = new File(filename, this, Request(0), Cred::SuperUser);
 - }
 - 
 -diff -urN fam-oss-2.6.4/fam/Listener.c++ fam-oss-2.6.4-freebsd/fam/Listener.c++
 ---- fam-oss-2.6.4/fam/Listener.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Listener.c++	Sat Mar 17 14:12:57 2001
 -@@ -22,6 +22,8 @@
 - 
 - #include "Listener.h"
 - 
 -+#include <stdio.h>
 -+#include <stdlib.h>
 - #include <assert.h>
 - #include <fcntl.h>
 - #include <sys/types.h>
 -@@ -202,7 +204,11 @@
 -     //  requested user and pass the name back to the client.
 - 
 -     char *tmpfile = tempnam("/tmp", ".fam");
 -+#if defined(__FreeBSD__)
 -+    sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 -+#else
 -     sockaddr_un sun = { AF_UNIX, "" };
 -+#endif
 -     if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1))
 -     {
 -         Log::error("tmpnam() too long for sun_path (%d >= %d)!",
 -@@ -235,7 +241,7 @@
 -         return;
 -     }
 - 
 --    if (chown(sun.sun_path, uid, -1) != 0)
 -+    if (chown(sun.sun_path, uid, (gid_t)-1) != 0)
 -     {   Log::perror("localclient chown");
 - 	close(client_sock);
 -         return;
 -@@ -271,7 +277,11 @@
 - 
 -     // Get the new socket.
 - 
 -+#if defined(__FreeBSD__)
 -+    struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 -+#else
 -     struct sockaddr_un sun = { AF_UNIX, "" };
 -+#endif
 -     CONFIG_SOCKLEN_T sunlen = sizeof(sun);
 -     int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen);
 -     if (client_fd < 0)
 -@@ -333,7 +343,11 @@
 - void
 - Listener::dirty_ugly_hack()
 - {
 -+#if defined(__FreeBSD__)
 -+    static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" };
 -+#else
 -     static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" };
 -+#endif
 - 
 -     int sock = socket(PF_UNIX, SOCK_STREAM, 0);
 -     if (sock < 0)
 -diff -urN fam-oss-2.6.4/fam/Log.c++ fam-oss-2.6.4-freebsd/fam/Log.c++
 ---- fam-oss-2.6.4/fam/Log.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Log.c++	Sat Mar 17 14:14:31 2001
 -@@ -28,6 +28,8 @@
 - #include <stdlib.h>
 - #include <string.h>
 - #include <syslog.h>
 -+#include <sys/time.h>
 -+#include <sys/types.h>
 - #include <sys/resource.h>
 - #include <sys/stat.h>
 - #include <unistd.h>
 -diff -urN fam-oss-2.6.4/fam/Makefile.am fam-oss-2.6.4-freebsd/fam/Makefile.am
 ---- fam-oss-2.6.4/fam/Makefile.am	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Makefile.am	Sat Mar 17 18:12:17 2001
 -@@ -72,6 +72,7 @@
 -   main.c++ \
 -   timeval.c++ \
 -   timeval.h \
 -+  mntent_compat.c++ \
 -   @IMON_FUNCS@.c++
 - 
 - EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
 -diff -urN fam-oss-2.6.4/fam/Scheduler.h fam-oss-2.6.4-freebsd/fam/Scheduler.h
 ---- fam-oss-2.6.4/fam/Scheduler.h	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Scheduler.h	Sat Mar 17 00:14:04 2001
 -@@ -24,6 +24,7 @@
 - #define Scheduler_included
 - 
 - #include <sys/time.h>
 -+#include <string.h>
 - 
 - #include "Boolean.h"
 - 
 -diff -urN fam-oss-2.6.4/fam/StringTable.h fam-oss-2.6.4-freebsd/fam/StringTable.h
 ---- fam-oss-2.6.4/fam/StringTable.h	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/fam/StringTable.h	Sat Mar 17 18:05:38 2001
 -@@ -25,6 +25,7 @@
 - 
 - #include <assert.h>
 - #include <string.h>
 -+#include "mntent.h"
 - 
 - //  A StringTable maps C strings onto values.  It is a cheap O(n)
 - //  implementation, suitable only for small tables that are
 -diff -urN fam-oss-2.6.4/fam/mntent.h fam-oss-2.6.4-freebsd/fam/mntent.h
 ---- fam-oss-2.6.4/fam/mntent.h	Thu Jan  1 01:00:00 1970
 -+++ fam-oss-2.6.4-freebsd/fam/mntent.h	Sat Mar 17 18:11:08 2001
 -@@ -0,0 +1,56 @@
 -+/*
 -+ *  mntent
 -+ *  mntent.h - compatability header for FreeBSD
 -+ *
 -+ *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
 -+ *  All rights reserved.
 -+ *
 -+ * 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.
 -+ *
 -+ * 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.
 -+ */
 -+
 -+#if defined(HAVE_MNTENT_H)
 -+#include <mntent.h>
 -+#else
 -+#ifndef _MNTENT_H
 -+#define _MNTENT_H
 -+#include <stdio.h>
 -+
 -+#define MOUNTED "dummy"
 -+
 -+#define MNTTYPE_NFS "nfs"
 -+
 -+struct mntent {
 -+	char *mnt_fsname;
 -+	char *mnt_dir;
 -+	char *mnt_type;
 -+	char *mnt_opts;
 -+	int mnt_freq;
 -+	int mnt_passno;
 -+};
 -+
 -+#define setmntent(x,y) ((FILE *)0x1)
 -+struct mntent *getmntent __P ((FILE *fp));
 -+char *hasmntopt __P ((const struct mntent *mnt, const char *option));
 -+#define endmntent(x) ((int)1)
 -+
 -+#endif /* _MNTENT_H */
 -+#endif /* HAVE_MNTENT_H */
 -diff -urN fam-oss-2.6.4/fam/mntent_compat.c++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++
 ---- fam-oss-2.6.4/fam/mntent_compat.c++	Thu Jan  1 01:00:00 1970
 -+++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++	Sat Mar 17 23:48:07 2001
 -@@ -0,0 +1,151 @@
 -+/*
 -+ * Copyright (c) 1980, 1989, 1993, 1994
 -+ *      The Regents of the University of California.  All rights reserved.
 -+ * Copyright (c) 2001
 -+ *      David Rufino <daverufino@btinternet.com>
 -+ *
 -+ * 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 <stdlib.h>
 -+#include <string.h>
 -+#include <sys/param.h>
 -+#include <sys/ucred.h>
 -+#include <sys/mount.h>
 -+
 -+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");
 -+        if (flags & MNT_NOCLUSTERR)     res = catopt(res, "noclusterr");
 -+        if (flags & MNT_NOCLUSTERW)     res = catopt(res, "noclusterw");
 -+        if (flags & MNT_NOSYMFOLLOW)    res = catopt(res, "nosymfollow");
 -+        if (flags & MNT_SUIDDIR)        res = catopt(res, "suiddir");
 -+
 -+        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 */
 -diff -urN fam-oss-2.6.4/libfam/Client.c++ fam-oss-2.6.4-freebsd/libfam/Client.c++
 ---- fam-oss-2.6.4/libfam/Client.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/libfam/Client.c++	Sat Mar 17 00:12:01 2001
 -@@ -20,6 +20,7 @@
 - //  with this program; if not, write the Free Software Foundation, Inc., 59
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 - 
 -+#include <stdio.h>
 - #include <stdlib.h>
 - #include <unistd.h>
 - #include <netinet/in.h>
 -diff -urN fam-oss-2.6.4/libfam/fam.c++ fam-oss-2.6.4-freebsd/libfam/fam.c++
 ---- fam-oss-2.6.4/libfam/fam.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/libfam/fam.c++	Sat Mar 17 00:12:43 2001
 -@@ -21,6 +21,7 @@
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 - 
 - #include <sys/types.h>
 -+#include <rpc/rpc.h>
 - #include <sys/time.h>
 - #include <unistd.h>
 - #include <stdlib.h>
 -diff -urN fam-oss-2.6.4/test/test.c++ fam-oss-2.6.4-freebsd/test/test.c++
 ---- fam-oss-2.6.4/test/test.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/test/test.c++	Sat Mar 17 18:39:23 2001
 -@@ -1,6 +1,7 @@
 - #include <sys/types.h>
 - #include <sys/time.h>
 - #include <stdio.h>
 -+#include <string.h>
 - #include <unistd.h>
 - #include <signal.h>
 - #include <errno.h>
 ---- fam-oss-2.6.4/acconfig.h	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/acconfig.h	Sun Mar 18 00:40:47 2001
 -@@ -44,6 +44,8 @@
 - **  Otherwise, we'll use MNTTYPE_NFS.  */
 - #undef HAVE_FSID_NFS2
 - 
 -+#undef HAVE_MNTENT_H
 -+
 - /* Define if we have MNTTYPE_NFS2 */
 - #define HAVE_MNTTYPE_NFS2 0
 - 
 Index: files/patch-libfam::Client.c++
 ===================================================================
 RCS file: files/patch-libfam::Client.c++
 diff -N files/patch-libfam::Client.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-libfam::Client.c++	7 Oct 2001 20:28:07 -0000
 @@ -0,0 +1,10 @@
 +--- libfam/Client.c++.orig	Fri May 19 23:46:32 2000
 ++++ libfam/Client.c++	Sun Oct  7 15:22:17 2001
 +@@ -20,6 +20,7 @@
 + //  with this program; if not, write the Free Software Foundation, Inc., 59
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 + 
 ++#include <stdio.h>
 + #include <stdlib.h>
 + #include <unistd.h>
 + #include <netinet/in.h>
 Index: files/patch-libfam::Makefile.am
 ===================================================================
 RCS file: files/patch-libfam::Makefile.am
 diff -N files/patch-libfam::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-libfam::Makefile.am	7 Oct 2001 21:28:53 -0000
 @@ -0,0 +1,8 @@
 +--- libfam/Makefile.am.orig	Fri May 19 23:46:32 2000
 ++++ libfam/Makefile.am	Sun Oct  7 16:28:34 2001
 +@@ -11,4 +11,4 @@
 + 
 + EXTRA_DIST = fam.sym
 + 
 +-CLEANFILES += ii_files/*.ii
 ++CLEANFILES = ii_files/*.ii
 Index: files/patch-libfam::fam.c++
 ===================================================================
 RCS file: files/patch-libfam::fam.c++
 diff -N files/patch-libfam::fam.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-libfam::fam.c++	7 Oct 2001 20:28:28 -0000
 @@ -0,0 +1,10 @@
 +--- libfam/fam.c++.orig	Fri May 19 23:46:32 2000
 ++++ libfam/fam.c++	Sun Oct  7 15:22:17 2001
 +@@ -21,6 +21,7 @@
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 + 
 + #include <sys/types.h>
 ++#include <rpc/rpc.h>
 + #include <sys/time.h>
 + #include <unistd.h>
 + #include <stdlib.h>
 Index: files/patch-man::Makefile.am
 ===================================================================
 RCS file: files/patch-man::Makefile.am
 diff -N files/patch-man::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::Makefile.am	23 Nov 2001 16:49:32 -0000
 @@ -0,0 +1,12 @@
 +--- man/Makefile.am.orig	Mon Oct 22 01:33:11 2001
 ++++ man/Makefile.am	Fri Nov 23 10:49:15 2001
 +@@ -1,5 +1,5 @@
 +-#  This is a little weird because fam.1m is generated from fam.1m.in
 ++#  This is a little weird because fam.8 is generated from fam.8.in
 + #  at the end of the configure script.
 +-man_MANS = fam.1m fam.3x
 +-EXTRA_DIST = fam.1m.in fam.3x
 +-CLEANFILES = fam.1m
 ++man_MANS = fam.8 fam.3
 ++EXTRA_DIST = fam.8.in fam.3
 ++CLEANFILES = fam.8
 Index: files/patch-man::fam.1m.in
 ===================================================================
 RCS file: files/patch-man::fam.1m.in
 diff -N files/patch-man::fam.1m.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::fam.1m.in	25 Nov 2001 22:12:56 -0000
 @@ -0,0 +1,76 @@
 +--- man/fam.1m.in.orig	Mon Oct 22 01:33:11 2001
 ++++ man/fam.1m.in	Sun Nov 25 16:09:29 2001
 +@@ -1,6 +1,6 @@
 +-.\"##  fam.1m.in
 ++.\"##  fam.8.in
 + .\"##
 +-.\"##  When configure.in generates fam.1m, lines starting with .\"##
 ++.\"##  When configure.in generates fam.8, lines starting with .\"##
 + .\"##  should be removed; when building on IRIX, lines starting with
 + .\"##  .\"IRIX should have that part removed (uncommenting the rest
 + .\"##  of the line).
 +@@ -9,13 +9,13 @@
 + .\"##  separate files.
 + .\"##
 + .nr X
 +-.if \nX=0 .ds x} fam 1M "Silicon Graphics" "\&"
 ++.if \nX=0 .ds x} fam 8 "Silicon Graphics" "\&"
 + .TH \*(x}
 + .SH NAME
 + fam \- file alteration monitor
 + .SH SYNOPSIS
 + .nf
 +-\f3/usr/etc/fam\f1 [ \f3\-f\f1 | \f3\-v\f1 | \f3\-d\f1 ] [ \f3\-l\f1 | \c
 ++\f3fam\f1 [ \f3\-f\f1 | \f3\-v\f1 | \f3\-d\f1 ] [ \f3\-l\f1 | \c
 + \f3\-t\f1 \f2NFS_polling_interval\f1 ] 
 + 	[ \f3\-T\f1 \f2idle_timeout\f1 ] [ \f3\-p\f1 \c
 + \f2program\f3.\f2version\f1 ] [ \f3\-L\f1 ] [ \f3-C\f1 ]
 +@@ -24,22 +24,13 @@
 + .SH DESCRIPTION
 + \f2fam\f1 is a server that tracks changes to the filesystem and
 + relays these changes to interested applications.
 +-Applications such as
 +-\f2fm\f1(1G) and \f2mailbox\f1(1) present an up-to-date view of the filesystem.
 +-In the absence of \f2fam\f1, these applications and others like them
 +-are forced to poll the filesystem to detect changes.
 +-\f2fam\f1 is
 +-more efficient.
 +-.P
 + Applications can request \f2fam\f1 to monitor any files or directories in
 + any filesystem.
 + When \f2fam\f1 detects changes to monitored files, it notifies
 + the appropriate application.
 + The FAM API provides a programmatic interface to \f2fam\f1; see
 +-.IR fam (3X).
 ++.IR fam (3).
 + .P
 +-\f2fam\f1 is informed of filesystem changes as they happen by the
 +-kernel through the \f2imon\f1(7M) pseudo device driver.
 + If asked to
 + monitor files on an NFS mounted filesystem, \f2fam\f1 tries to use
 + \f2fam\f1 on the NFS server to monitor files.
 +@@ -47,9 +38,9 @@
 + contact a remote \f2fam\f1, it polls the files instead.
 + \f2fam\f1 also polls special files.
 + .P
 +-Normally, \f2fam\f1 is started by \f2inetd\f1(1M).
 ++Normally, \f2fam\f1 is started by \f2inetd\f1(8).
 + It is registered with
 +-\f2portmap\f1(1M) as performing the sgi_fam service.
 ++\f2%%PORTMAP%%\f1(8) as performing the sgi_fam service.
 + .SH OPTIONS
 + .TP 26
 + \f3\-l\f1
 +@@ -196,9 +187,7 @@
 + XXX_FAM_CONF
 + .SH "SEE ALSO"
 + .\"IRIX fm(1G),
 +-inetd(1M),
 ++fam(3),
 ++inetd(8),
 + .\"IRIX mailbox(1),
 +-portmap(1M),
 +-fam(3X),
 +-imon(7M),
 +-stat(1M).
 ++%%PORTMAP%%(8).
 Index: files/patch-man::fam.3x
 ===================================================================
 RCS file: files/patch-man::fam.3x
 diff -N files/patch-man::fam.3x
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::fam.3x	23 Nov 2001 16:52:23 -0000
 @@ -0,0 +1,38 @@
 +--- man/fam.3x.orig	Mon Oct 22 01:33:11 2001
 ++++ man/fam.3x	Fri Nov 23 10:51:07 2001
 +@@ -1,9 +1,9 @@
 + '\"macro stdmacro
 +-.if n .pH g3x.fam @(#)fam	30.3 of 1/19/86
 ++.if n .pH g3.fam @(#)fam	30.3 of 1/19/86
 + .nr X
 +-.if \nX=0 .ds x} FAM 3X "Specialized Libraries" "\&"
 +-.if \nX=1 .ds x} FAM 3X "Specialized Libraries"
 +-.if \nX=2 .ds x} FAM 3X "" "\&"
 ++.if \nX=0 .ds x} FAM 3 "Specialized Libraries" "\&"
 ++.if \nX=1 .ds x} FAM 3 "Specialized Libraries"
 ++.if \nX=2 .ds x} FAM 3 "" "\&"
 + .if \nX=3 .ds x} FAM "" "" "\&"
 + .TH \*(x}
 + .SH NAME
 +@@ -65,10 +65,9 @@
 + .PP
 + .SH DESCRIPTION
 + \fIFAM\fP monitors files and directories, notifying interested
 +-applications of changes.  Routines for communicating with the fam(1M)
 ++applications of changes.  Routines for communicating with the fam(8)
 + server process are found in ``libfam.a'', which is loaded if the
 +-option ``-lfam'' is used with cc(1) or ld(1).  The library
 +-``libC.a'' (``-lC'') must also be specified.
 ++option ``-lfam'' is used with cc(1) or ld(1).
 + .PP
 + An application calls routines described here to establish a list of
 + files for \fIfam \fPto monitor.  \fIFam \fPgenerates events on a socket to
 +@@ -282,7 +281,7 @@
 + 
 + 
 + .SH SEE ALSO
 +-fam(1M).
 ++fam(8).
 + .SH BUGS
 + The FAMMoved event is not currently supported.
 + .PP
 Index: files/patch-support::Makefile.am
 ===================================================================
 RCS file: files/patch-support::Makefile.am
 diff -N files/patch-support::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-support::Makefile.am	26 Nov 2001 00:39:03 -0000
 @@ -0,0 +1,10 @@
 +--- support/Makefile.am.orig	Mon Oct 22 01:33:11 2001
 ++++ support/Makefile.am	Sun Nov 25 18:38:28 2001
 +@@ -11,5 +11,5 @@
 + libsupport_a_DEPENDENCIES = @snprintf_o@ @foo_o@
 + libsupport_a_LIBADD       = @snprintf_o@ @foo_o@
 + 
 +-CLEANFILES += @MKDEPFILE@ ii_files/*.ii
 +-sinclude @MKDEPFILE@
 ++CLEANFILES = @MKDEPFILE@ ii_files/*.ii
 ++#sinclude @MKDEPFILE@
 Index: files/patch-test::Makefile.am
 ===================================================================
 RCS file: files/patch-test::Makefile.am
 diff -N files/patch-test::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-test::Makefile.am	7 Oct 2001 21:29:41 -0000
 @@ -0,0 +1,8 @@
 +--- test/Makefile.am.orig	Fri May 19 23:46:32 2000
 ++++ test/Makefile.am	Sun Oct  7 16:29:21 2001
 +@@ -4,4 +4,4 @@
 + test_SOURCES = test.c++
 + test_LDADD = ../libfam/libfam.la
 + 
 +-CLEANFILES += ii_files/*.ii
 ++CLEANFILES = ii_files/*.ii
 Index: files/patch-test::test.c++
 ===================================================================
 RCS file: files/patch-test::test.c++
 diff -N files/patch-test::test.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-test::test.c++	7 Oct 2001 20:27:46 -0000
 @@ -0,0 +1,10 @@
 +--- test/test.c++.orig	Fri May 19 23:46:32 2000
 ++++ test/test.c++	Sun Oct  7 15:22:17 2001
 +@@ -1,6 +1,7 @@
 + #include <sys/types.h>
 + #include <sys/time.h>
 + #include <stdio.h>
 ++#include <string.h>
 + #include <unistd.h>
 + #include <signal.h>
 + #include <errno.h>
Responsible-Changed-From-To: freebsd-ports->freebsd-cvs 
Responsible-Changed-By: trevor 
Responsible-Changed-When: Thu Dec 6 01:57:20 PST 2001 
Responsible-Changed-Why:  
repo copy requested:  ports/devel/fam/ to ports/sysutils/fam/ 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32231 
Responsible-Changed-From-To: freebsd-cvs->cvs 
Responsible-Changed-By: trevor 
Responsible-Changed-When: Thu Dec 6 05:14:58 PST 2001 
Responsible-Changed-Why:  
Oops, there is no freebsd-cvs alias. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32231 
Responsible-Changed-From-To: cvs->freebsd-ports 
Responsible-Changed-By: joe 
Responsible-Changed-When: Mon Dec 10 06:20:39 PST 2001 
Responsible-Changed-Why:  
This needs to be managed by a ports person.  They should pick up 
the changes and when ready email cvs@ requesting the repo-copy in 
the normal way.  It is incorrect to assign this PR directly to cvs@ 
because in general the repomeisters don't do port upgrades. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32231 

From: Jeremy Norris <ishmael27x@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/32231: Update port devel/fam
Date: Sun, 16 Dec 2001 18:31:47 -0600

 Please use this diff. Updates in this diff include:
 
 Now uses USE_AUTOMAKE_VER=15 and USE_AUTOCONF_VER=213 (note: it is
 USE_AUTOCONF_VER=25 ready when we get that).
 
 Created custom do-configure target, so that we run auto-stuff in a more proper
 order.
 
 Added comments in a few places in Makefile to explain my methods.
 
 Changed tabbing after variable declarations in Makefile to line everything up.
 
 Added patch-fam::Directory.c++ and patch-fam::DirectoryScanner.h to change
 #include <sys/dir.h> -> #include <dirent.h> (sys/dir.h is depracated).
 
 Added patches obtained from Redhat (patch-fam::Interest.c++ and
 patch-fam::NetConnection.c++) that "fixes some of the one second mtime
 resolution races" and "fixes a warning that Kde tends to trigger a lot that can
 fill up your logs".
 
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/Makefile,v
 retrieving revision 1.1
 diff -u -r1.1 Makefile
 --- Makefile	31 Mar 2001 02:45:55 -0000	1.1
 +++ Makefile	17 Dec 2001 00:13:48 -0000
 @@ -5,25 +5,91 @@
  # $FreeBSD: ports/devel/fam/Makefile,v 1.1 2001/03/31 02:45:55 will Exp $
  #
  
 -PORTNAME=	fam
 -PORTVERSION=	2.6.4
 -CATEGORIES=	devel
 -MASTER_SITES=	ftp://oss.sgi.com/projects/fam/download/
 -DISTNAME=	${PORTNAME}-oss-${PORTVERSION}
 -
 -MAINTAINER=	ishmael27@home.com
 -
 -USE_AUTOMAKE=	yes
 -USE_LIBTOOL=	yes
 -USE_GMAKE=	yes
 -PATCH_STRIP=	-p1
 -INSTALLS_SHLIB=	yes
 +PORTNAME=		fam
 +PORTVERSION=		2.6.6
 +CATEGORIES=		sysutils
 +MASTER_SITES=		ftp://oss.sgi.com/projects/fam/download/
  
 -MAN1=		fam.1m
 -MAN3=		fam.3x
 +MAINTAINER=		ishmael27x@yahoo.com
 +
 +USE_AUTOCONF_VER=	213
 +USE_AUTOMAKE_VER=	15
 +AUTOMAKE_ARGS=		--add-missing --force-missing --copy --foreign
 +USE_LIBTOOL=		yes
 +EXTRACT_AFTER_ARGS=	| ${TAR} -xf - -C ${WRKSRC}
 +PKGMESSAGE=		${WRKDIR}/.MESSAGE
 +INSTALLS_SHLIB=		yes
 +MAN3=			fam.3
 +MAN8=			fam.8
 +
 +LIBTOOLIZE=		libtoolize
 +LIBTOOLIZE_ARGS=	--force --copy
 +.if exists(/usr/sbin/rpcbind)
 +PORTMAP=		rpcbind
 +.else
 +PORTMAP=		portmap
 +.endif
 +
 +# XXX This and ${EXTRACT_AFTER_ARGS} are needed since tarball doesn't extract
 +#     directly into ${WRKDIR}/fam-2.6.6
 +do-extract:
 +	@${RM} -rf ${WRKDIR}
 +	@${MKDIR} ${WRKSRC}
 +	@for file in ${EXTRACT_ONLY}; do \
 +		if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
 +		then \
 +			exit 1; \
 +		fi \
 +	done
 +.if !defined(EXTRACT_PRESERVE_OWNERSHIP)
 +	@if [ `id -u` = 0 ]; then \
 +		${CHMOD} -R ug-s ${WRKDIR}; \
 +		${CHOWN} -R 0:0 ${WRKDIR}; \
 +	fi
 +.endif
 +
 +post-patch:
 +	@${MV} ${WRKSRC}/man/fam.1m.in ${WRKSRC}/man/fam.8.in
 +	@${MV} ${WRKSRC}/man/fam.3x ${WRKSRC}/man/fam.3
 +
 +# XXX This seems to be the more preferred order of running things.
 +do-configure:
 +	@(cd ${WRKSRC} && ${LIBTOOLIZE} ${LIBTOOLIZE_ARGS})
 +	@(cd ${WRKSRC} && ${ACLOCAL})
 +	@(cd ${WRKSRC} && ${SETENV} ${AUTOCONF_ENV} ${AUTOCONF} \
 +		${AUTOCONF_ARGS})
 +# XXX This can go away when we get autoconf-2.52 in the ports tree.
 +	@${PERL} -pi -e '\
 +		s|^AUTOCONF=.*|AUTOCONF=\$${AUTOCONF-"\$${am_missing_run}${AUTOCONF}"}| ; \
 +		s|^AUTOHEADER=.*|AUTOHEADER=\$${AUTOHEADER-"\$${am_missing_run}${AUTOHEADER}"}|' \
 +		${WRKSRC}/configure
 +	@(cd ${WRKSRC} && ${AUTOHEADER})
 +	@(cd ${WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${AUTOMAKE} \
 +		${AUTOMAKE_ARGS})
 +	@(cd ${WRKSRC} && \
 +		if ! ${SETENV} CC="${CC}" CXX="${CXX}" \
 +	    CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
 +	    INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \
 +	    INSTALL_DATA="${INSTALL_DATA}" \
 +	    INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
 +	    INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
 +	    ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}; then \
 +			${ECHO} "===>  Script \"${CONFIGURE_SCRIPT}\" failed: here are the contents of \"${CONFIGURE_LOG}\""; \
 +			${CAT} ${CONFIGURE_LOG}; \
 +			${ECHO} "(end of \"${CONFIGURE_LOG}\")"; \
 +			${FALSE}; \
 +		fi)
 +
 +post-configure:
 +	@${PERL} -pi -e 's|%%PORTMAP%%|${PORTMAP}|g' ${WRKSRC}/man/fam.8
 +	@${MV} ${WRKSRC}/fam/fam.conf ${WRKSRC}/fam/fam.conf.sample
 +	@${SED} -e 's|%%PORTMAP%%|${PORTMAP}|g' -e 's|%%PREFIX%%|${PREFIX}|g' \
 +		${PKGDIR}/pkg-message >${PKGMESSAGE}
  
  post-install:
 -	@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/fam.sh.sample ${PREFIX}/etc/rc.d/fam.sh.sample
 +	@if [ ! -f ${PREFIX}/etc/fam.conf ]; then \
 +		${CP} -p ${PREFIX}/etc/fam.conf.sample ${PREFIX}/etc/fam.conf; \
 +	fi
  	@${CAT} ${PKGMESSAGE}
  
  .include <bsd.port.mk>
 Index: distinfo
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/distinfo,v
 retrieving revision 1.1
 diff -u -r1.1 distinfo
 --- distinfo	31 Mar 2001 02:45:55 -0000	1.1
 +++ distinfo	23 Nov 2001 14:53:49 -0000
 @@ -1 +1 @@
 -MD5 (fam-oss-2.6.4.tar.gz) = d060919b3d9ede61a8b68eae1ded53ce
 +MD5 (fam-2.6.6.tar.gz) = c1ecf4136b673e49fd0ea7a2e50d9885
 Index: pkg-descr
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/pkg-descr,v
 retrieving revision 1.1
 diff -u -r1.1 pkg-descr
 --- pkg-descr	31 Mar 2001 02:45:55 -0000	1.1
 +++ pkg-descr	16 Dec 2001 17:42:15 -0000
 @@ -1,4 +1,5 @@
 -FAM, the File Alteration Monitor, provides an API which applications can use
 -to be notified when specific files or directories are changed.
 +FAM, the File Alteration Monitor, provides a daemon and an API which
 +applications can use to be notified when specific files or directories are
 +changed.
  
  WWW: http://oss.sgi.com/projects/fam/
 Index: pkg-message
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/pkg-message,v
 retrieving revision 1.1
 diff -u -r1.1 pkg-message
 --- pkg-message	31 Mar 2001 02:45:55 -0000	1.1
 +++ pkg-message	25 Nov 2001 23:13:59 -0000
 @@ -1,8 +1,17 @@
 -************************************************************************
  
 -In order to run this port, please add the following line to /etc/rpc if
 -it is not already there:
 +To run FAM, please check and perform the following:
  
 +1. Be sure that the following line is in /etc/rpc
  sgi_fam		391002
  
 -************************************************************************
 +2. Be sure that %%PORTMAP%%(8) is running.
 +You probably will want to add the following line to /etc/rc.conf
 +portmap_enable="YES"
 +
 +3. Be sure that the following line is in /etc/inetd.conf
 +sgi_fam/1-2	stream rpc/tcp wait root	%%PREFIX%%/sbin/fam	fam
 +
 +4. Be sure that inetd(8) is running.
 +You probably will want to add the following line to /etc/rc.conf
 +inetd_enable="YES"
 +
 Index: pkg-plist
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/pkg-plist,v
 retrieving revision 1.2
 diff -u -r1.2 pkg-plist
 --- pkg-plist	21 May 2001 07:13:05 -0000	1.2
 +++ pkg-plist	26 Nov 2001 00:20:53 -0000
 @@ -1,9 +1,9 @@
 -bin/fam
 -etc/fam.conf
 -etc/rc.d/fam.sh.sample
 +@comment $FreeBSD$
 +@unexec if cmp -s %D/etc/fam.conf %D/etc/fam.conf.sample; then rm -f %D/etc/fam.conf; fi
 +etc/fam.conf.sample
 +@exec if [ ! -f %D/etc/fam.conf ]; then cp -p %D/%F %B/fam.conf; fi
  include/fam.h
 -lib/fam/editconf.perl
  lib/libfam.a
  lib/libfam.so
  lib/libfam.so.0
 -@dirrm lib/fam
 +sbin/fam
 Index: files/fam.sh.sample
 ===================================================================
 RCS file: files/fam.sh.sample
 diff -N files/fam.sh.sample
 --- files/fam.sh.sample	31 Mar 2001 02:45:55 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,20 +0,0 @@
 -#!/bin/sh
 -
 -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
 -    echo "$0: Cannot determine the PREFIX" >&2
 -    exit 1
 -fi
 -
 -case "$1" in
 -start)
 -	[ -x ${PREFIX}/bin/fam ] && ( ${PREFIX}/bin/fam & ) && echo -n ' fam'
 -	;;
 -stop)
 -	killall fam && echo -n ' fam'
 -	;;
 -*)
 -	echo "Usage: `basename $0` {start|stop}" >&2
 -	;;
 -esac
 -
 -exit 0
 Index: files/patch-Makefile.am
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/files/patch-Makefile.am,v
 retrieving revision 1.1
 diff -u -r1.1 patch-Makefile.am
 --- files/patch-Makefile.am	31 Mar 2001 02:45:55 -0000	1.1
 +++ files/patch-Makefile.am	16 Dec 2001 00:32:21 -0000
 @@ -1,33 +1,58 @@
 ---- Makefile.am.orig	Fri May 19 23:46:31 2000
 -+++ Makefile.am	Mon Mar 19 11:51:05 2001
 -@@ -7,30 +7,3 @@
 - rpm: dist
 - 	@cd build && $(MAKE) $(AM_MAKEFLAGS) rpm
 +
 +$FreeBSD$
 +
 +--- Makefile.am.orig	Mon Oct 22 01:33:09 2001
 ++++ Makefile.am	Sun Nov 25 18:46:14 2001
 +@@ -1,6 +1,6 @@
 + include $(top_srcdir)/common.am
   
 --#  We proceed even if these commands fail because this might be an install
 --#  into $DESTDIR by a non-root user.
 +-SUBDIRS = util include support libfam fam man test build
 ++SUBDIRS = include support libfam fam man
 + 
 + EXTRA_DIST = common.am INSTALL.rpm
 + 
 +@@ -9,28 +9,28 @@
 + 
 + #  We proceed even if these commands fail because this might be an install
 + #  into $DESTDIR by a non-root user.
  -install-exec-hook:
  -	-@if test "no$(LDCONFIG)" != "no"; then \
 --##	    echo "Adding $(libdir) to ld.so.conf..."; \
 ++#install-exec-hook:
 ++#	-@if test "no$(LDCONFIG)" != "no"; then \
 + ##	    echo "Adding $(libdir) to ld.so.conf..."; \
  -	    $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \
  -	    exec $(LDCONFIG); \
  -	fi
 --##	@echo "Adding fam to rpc..."
 ++#	    $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \
 ++#	    exec $(LDCONFIG); \
 ++#	fi
 + ##	@echo "Adding fam to rpc..."
  -	-@$(EDITCONF) rpc add 391002 "sgi_fam		391002"
 --##	@echo "Adding fam to inetd.conf..."
 ++#	-@$(EDITCONF) rpc add 391002 "sgi_fam		391002"
 + ##	@echo "Adding fam to inetd.conf..."
  -	-@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
  -	    "#  fam, the File Alteration Monitor, http://oss.sgi.com/projects/fam/" \
  -	    "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
  -	@echo "Restarting inetd..."
  -	-@killall -HUP inetd
 --
 --#  We don't remove $(libdir) from ld.so.conf here because we don't have
 --#  a way to tell whether we're the ones who added it, and other things
 --#  probably use it as well.
 ++#	-@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
 ++#	    "#  fam, the File Alteration Monitor, http://oss.sgi.com/projects/fam/" \
 ++#	    "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
 ++#	@echo "Restarting inetd..."
 ++#	-@killall -HUP inetd
 + 
 + #  We don't remove $(libdir) from ld.so.conf here because we don't have
 + #  a way to tell whether we're the ones who added it, and other things
 + #  probably use it as well.
  -uninstall-local:
 --##	@echo "Removing fam from rpc..."
 ++#uninstall-local:
 + ##	@echo "Removing fam from rpc..."
  -	-@$(EDITCONF) rpc remove 391002
 --##	@echo "Removing fam from inetd.conf..."
 ++#	-@$(EDITCONF) rpc remove 391002
 + ##	@echo "Removing fam from inetd.conf..."
  -	-@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
  -	@echo "Restarting inetd..."
  -	-@killall -HUP inetd
 ++#	-@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
 ++#	@echo "Restarting inetd..."
 ++#	-@killall -HUP inetd
 Index: files/patch-acconfig.h
 ===================================================================
 RCS file: files/patch-acconfig.h
 diff -N files/patch-acconfig.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-acconfig.h	16 Dec 2001 00:33:17 -0000
 @@ -0,0 +1,14 @@
 +
 +$FreeBSD$
 +
 +--- acconfig.h.orig	Mon Oct 22 01:33:09 2001
 ++++ acconfig.h	Fri Nov 23 09:54:00 2001
 +@@ -47,6 +47,8 @@
 + **  Otherwise, we'll use MNTTYPE_NFS.  */
 + #undef HAVE_FSID_NFS2
 + 
 ++#undef HAVE_MNTENT_H
 ++
 + /* Define if we have MNTTYPE_NFS2 */
 + #define HAVE_MNTTYPE_NFS2 0
 + 
 Index: files/patch-common.am
 ===================================================================
 RCS file: files/patch-common.am
 diff -N files/patch-common.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-common.am	16 Dec 2001 00:33:29 -0000
 @@ -0,0 +1,20 @@
 +
 +$FreeBSD$
 +
 +--- common.am.orig	Mon Oct 22 01:33:09 2001
 ++++ common.am	Fri Dec 14 17:44:24 2001
 +@@ -1,7 +1,7 @@
 + #  Since we're not always using gcc, we don't want to use dependency
 + #  tracking.  (It croaks non-GNU compilers.)  Seems like this should be
 + #  configurable through autoconf!
 +-AUTOMAKE_OPTIONS=no-dependencies
 ++#AUTOMAKE_OPTIONS=no-dependencies
 + 
 + #  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 + INCLUDES = @FAMPROTOINC@ -DCONFIG_ETC_CONFIG_PATH=\"@FAM_CONF@\"
 +@@ -10,3 +10,5 @@
 + EDITCONF = perl $(top_srcdir)/util/editconf/editconf.perl
 + 
 + uninstallscriptdir = $(pkglibdir)
 ++
 ++CLEANFILES =
 Index: files/patch-configure.in
 ===================================================================
 RCS file: files/patch-configure.in
 diff -N files/patch-configure.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-configure.in	16 Dec 2001 17:17:18 -0000
 @@ -0,0 +1,91 @@
 +
 +$FreeBSD$
 +
 +--- configure.in.orig	Sun Nov  4 23:31:30 2001
 ++++ configure.in	Sun Dec 16 11:16:25 2001
 +@@ -73,7 +73,7 @@
 + fi
 + AC_PROG_CXX
 + AC_PROG_CXXCPP
 +-AC_PROG_RANLIB
 ++dnl AC_PROG_RANLIB
 + 
 + AC_PROG_INSTALL
 + dnl I don't know why, but automake wants to use ./mkinstalldirs.
 +@@ -95,6 +95,8 @@
 + dnl AC_HEADER_SYS_WAIT
 + dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
 + 
 ++AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
 ++
 + dnl
 + dnl  See if imon is available; if so, is it IRIX or Linux?
 + dnl
 +@@ -310,10 +312,10 @@
 + dnl If we don't have MNTTYPE_NFS , we croak.
 + dnl
 + 
 +-FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 +-FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 +-FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 +-FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 + 
 + dnl
 + dnl  Test for bindresvport() prototype.
 +@@ -516,8 +518,8 @@
 + 
 + dnl
 + dnl  This grief is for replacing XXX_FAM_CONF with $FAM_CONF
 +-dnl  in the fam(1M) man page.  (Simply putting @FAM_CONF@ in
 +-dnl  fam.1m.in puts the string "$sysconfdir/fam.conf" in the
 ++dnl  in the fam(8) man page.  (Simply putting @FAM_CONF@ in
 ++dnl  fam.8.in puts the string "$sysconfdir/fam.conf" in the
 + dnl  man page, which isn't acceptable.  Isn't there a way to make
 + dnl  autoconf handle this??)
 + dnl
 +@@ -529,7 +531,7 @@
 + [
 +     TMPFILE=configure.tmp
 +     for f in $CONFIG_FILES; do
 +-        if test `basename $f` != 'fam.1m'; then
 ++        if test `basename $f` != 'fam.8'; then
 +             continue
 +         fi
 +         echo "replacing XXX_FAM_CONF with $FAM_CONF and removing maintainer comments in $f"
 +@@ -554,25 +556,25 @@
 + dnl
 + AC_OUTPUT(
 +     Makefile 
 +-    build/Makefile
 +-    build/rpm/Makefile
 +-    build/rpm/rpm.spec
 ++dnl    build/Makefile
 ++dnl    build/rpm/Makefile
 ++dnl    build/rpm/rpm.spec
 +     fam/Makefile
 +     fam/fam.conf
 +     include/Makefile
 +     libfam/Makefile
 +     man/Makefile
 +-    man/fam.1m
 ++    man/fam.8
 +     support/Makefile
 +     test/Makefile
 +-    util/Makefile
 +-    util/editconf/Makefile
 ++dnl    util/Makefile
 ++dnl    util/editconf/Makefile
 + )
 + 
 + dnl 
 + dnl  fam is a good deal less interesting without imon.
 + dnl 
 +-if test "$have_imon" != 'yes'; then
 ++if test `uname` = Linux && "$have_imon" != 'yes'; then
 +     cat << EOF
 + 
 +   ******************************************************************
 Index: files/patch-fam::Client.h
 ===================================================================
 RCS file: files/patch-fam::Client.h
 diff -N files/patch-fam::Client.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Client.h	16 Dec 2001 00:34:15 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- fam/Client.h.orig	Fri May 19 23:46:31 2000
 ++++ fam/Client.h	Sun Oct  7 15:22:17 2001
 +@@ -23,6 +23,7 @@
 + #ifndef Client_included
 + #define Client_included
 + 
 ++#include <sys/types.h>
 + #include <netinet/in.h>  // for in_addr
 + 
 + #include "Activity.h"
 Index: files/patch-fam::Directory.c++
 ===================================================================
 RCS file: files/patch-fam::Directory.c++
 diff -N files/patch-fam::Directory.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Directory.c++	17 Dec 2001 00:08:54 -0000
 @@ -0,0 +1,16 @@
 +
 +$FreeBSD$
 +
 +--- fam/Directory.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Directory.c++	Sun Dec 16 18:06:34 2001
 +@@ -26,7 +26,9 @@
 + #include <errno.h>
 + #include <string.h>
 + #include <stdio.h>
 +-#include <sys/dir.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/dir.h>
 ++#endif
 + #include <sys/stat.h>
 + #include <sys/wait.h>
 + #include <unistd.h>
 Index: files/patch-fam::DirectoryScanner.h
 ===================================================================
 RCS file: files/patch-fam::DirectoryScanner.h
 diff -N files/patch-fam::DirectoryScanner.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::DirectoryScanner.h	17 Dec 2001 00:09:02 -0000
 @@ -0,0 +1,19 @@
 +
 +$FreeBSD$
 +
 +--- fam/DirectoryScanner.h.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/DirectoryScanner.h	Sun Dec 16 18:07:45 2001
 +@@ -27,7 +27,12 @@
 + 
 + #include <stddef.h>
 + #include <sys/types.h>
 +-#include <sys/dir.h>
 ++#if defined(__FreeBSD__)
 ++#  include <dirent.h>
 ++#  define direct dirent
 ++#else
 ++#  include <sys/dir.h>
 ++#endif
 + 
 + #include "Event.h"
 + 
 Index: files/patch-fam::FileSystem.c++
 ===================================================================
 RCS file: files/patch-fam::FileSystem.c++
 diff -N files/patch-fam::FileSystem.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::FileSystem.c++	16 Dec 2001 00:34:31 -0000
 @@ -0,0 +1,14 @@
 +
 +$FreeBSD$
 +
 +--- fam/FileSystem.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/FileSystem.c++	Sun Oct  7 15:22:17 2001
 +@@ -22,7 +22,7 @@
 + 
 + #include "FileSystem.h"
 + 
 +-#include <mntent.h>
 ++#include "mntent.h"
 + #include <string.h>
 + 
 + #include "Event.h"
 Index: files/patch-fam::FileSystemTable.c++
 ===================================================================
 RCS file: files/patch-fam::FileSystemTable.c++
 diff -N files/patch-fam::FileSystemTable.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::FileSystemTable.c++	16 Dec 2001 00:34:49 -0000
 @@ -0,0 +1,28 @@
 +
 +$FreeBSD$
 +
 +--- fam/FileSystemTable.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/FileSystemTable.c++	Sun Oct  7 15:22:17 2001
 +@@ -21,9 +21,10 @@
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 + 
 + #include <stddef.h>
 ++#include <stdio.h>
 + #include "FileSystemTable.h"
 + 
 +-#include <mntent.h>
 ++#include "mntent.h"
 + #include <stdlib.h>
 + #include <string.h>
 + 
 +@@ -255,7 +256,10 @@
 +     //  create_fs_by_name initializes our "root" member variable.
 +     if (!fs_by_name)
 +     {   create_fs_by_name();
 ++#if !defined(__FreeBSD__)
 ++	/* there is no mtab "file" in freebsd! */
 + 	mtab_watcher = new InternalClient(mtab_name, mtab_event_handler, NULL);
 ++#endif
 +     }
 + 
 +     cr.become_user();
 Index: files/patch-fam::IMon.c++
 ===================================================================
 RCS file: files/patch-fam::IMon.c++
 diff -N files/patch-fam::IMon.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::IMon.c++	16 Dec 2001 00:35:04 -0000
 @@ -0,0 +1,16 @@
 +
 +$FreeBSD$
 +
 +--- fam/IMon.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/IMon.c++	Sun Oct  7 15:22:17 2001
 +@@ -34,7 +34,9 @@
 + #endif
 + #endif
 + 
 +-#include <sys/sysmacros.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/sysmacros.h>
 ++#endif
 + #include <unistd.h>
 + 
 + #include "Interest.h"
 Index: files/patch-fam::Interest.c++
 ===================================================================
 RCS file: files/patch-fam::Interest.c++
 diff -N files/patch-fam::Interest.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Interest.c++	16 Dec 2001 00:36:07 -0000
 @@ -0,0 +1,35 @@
 +
 +$FreeBSD$
 +
 +--- fam/Interest.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Interest.c++	Fri Dec 14 17:40:52 2001
 +@@ -25,7 +25,9 @@
 + #include <string.h>
 + #include <errno.h>
 + #include <sys/param.h>
 +-#include <sys/sysmacros.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/sysmacros.h>
 ++#endif
 + 
 + #ifdef HAVE_IRIX_XTAB_VERIFICATION
 + #include <stdio.h>
 +@@ -186,11 +188,16 @@
 +     bool stat_changed = (old_stat.st_ctim.tv_sec != status.st_ctim.tv_sec) ||
 +                         (old_stat.st_ctim.tv_nsec != status.st_ctim.tv_nsec) ||
 +                         (old_stat.st_mtim.tv_sec != status.st_mtim.tv_sec) ||
 +-                        (old_stat.st_mtim.tv_nsec != status.st_mtim.tv_nsec);
 ++                        (old_stat.st_mtim.tv_nsec != status.st_mtim.tv_nsec) ||
 + #else
 +     bool stat_changed = (old_stat.st_ctime != status.st_ctime) ||
 +-                        (old_stat.st_mtime != status.st_mtime);
 ++                        (old_stat.st_mtime != status.st_mtime) ||
 + #endif
 ++                        (old_stat.st_mode != status.st_mode) ||
 ++                        (old_stat.st_uid != status.st_uid) ||
 ++                        (old_stat.st_gid != status.st_gid) ||
 ++                        (old_stat.st_size != status.st_size) ||
 ++                        (old_stat.st_ino != status.st_ino);
 +     old_stat = status;
 + 
 +     //  If dev/ino changed, move this interest to the right hash chain.
 Index: files/patch-fam::InternalClient.c++
 ===================================================================
 RCS file: files/patch-fam::InternalClient.c++
 diff -N files/patch-fam::InternalClient.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::InternalClient.c++	16 Dec 2001 00:36:27 -0000
 @@ -0,0 +1,15 @@
 +
 +$FreeBSD$
 +
 +--- fam/InternalClient.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/InternalClient.c++	Sun Oct  7 15:22:17 2001
 +@@ -35,8 +35,8 @@
 + {
 +     assert(filename);
 +     assert(h);
 +-    assert(filename[0] == '/');
 +     Log::debug("%s watching %s", name(), filename);
 ++    assert(filename[0] == '/');
 +     interest = new File(filename, this, Request(0), Cred::SuperUser);
 + }
 + 
 Index: files/patch-fam::Listener.c++
 ===================================================================
 RCS file: files/patch-fam::Listener.c++
 diff -N files/patch-fam::Listener.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Listener.c++	16 Dec 2001 00:36:40 -0000
 @@ -0,0 +1,59 @@
 +
 +$FreeBSD$
 +
 +--- fam/Listener.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Listener.c++	Fri Nov 23 09:52:14 2001
 +@@ -22,6 +22,8 @@
 + 
 + #include "Listener.h"
 + 
 ++#include <stdio.h>
 ++#include <stdlib.h>
 + #include <assert.h>
 + #include <fcntl.h>
 + #include <sys/types.h>
 +@@ -205,7 +207,11 @@
 +     unsetenv("TMPDIR");
 + 
 +     char *tmpfile = tempnam("/tmp", ".fam");
 ++#if defined(__FreeBSD__)
 ++    sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 ++#else
 +     sockaddr_un sun = { AF_UNIX, "" };
 ++#endif
 +     if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1))
 +     {
 +         Log::error("tmpnam() too long for sun_path (%d >= %d)!",
 +@@ -239,7 +245,7 @@
 +         return;
 +     }
 + 
 +-    if (chown(sun.sun_path, uid, -1) != 0)
 ++    if (chown(sun.sun_path, uid, (gid_t)-1) != 0)
 +     {   Log::perror("localclient chown");
 + 	close(client_sock);
 +         return;
 +@@ -275,7 +281,11 @@
 + 
 +     // Get the new socket.
 + 
 ++#if defined(__FreeBSD__)
 ++    struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 ++#else
 +     struct sockaddr_un sun = { AF_UNIX, "" };
 ++#endif
 +     CONFIG_SOCKLEN_T sunlen = sizeof(sun);
 +     int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen);
 +     if (client_fd < 0)
 +@@ -337,7 +347,11 @@
 + void
 + Listener::dirty_ugly_hack()
 + {
 ++#if defined(__FreeBSD__)
 ++    static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" };
 ++#else
 +     static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" };
 ++#endif
 + 
 +     int sock = socket(PF_UNIX, SOCK_STREAM, 0);
 +     if (sock < 0)
 Index: files/patch-fam::Log.c++
 ===================================================================
 RCS file: files/patch-fam::Log.c++
 diff -N files/patch-fam::Log.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Log.c++	16 Dec 2001 00:36:53 -0000
 @@ -0,0 +1,14 @@
 +
 +$FreeBSD$
 +
 +--- fam/Log.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/Log.c++	Sun Oct  7 15:22:17 2001
 +@@ -28,6 +28,8 @@
 + #include <stdlib.h>
 + #include <string.h>
 + #include <syslog.h>
 ++#include <sys/time.h>
 ++#include <sys/types.h>
 + #include <sys/resource.h>
 + #include <sys/stat.h>
 + #include <unistd.h>
 Index: files/patch-fam::Makefile.am
 ===================================================================
 RCS file: files/patch-fam::Makefile.am
 diff -N files/patch-fam::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Makefile.am	16 Dec 2001 00:37:05 -0000
 @@ -0,0 +1,29 @@
 +
 +$FreeBSD$
 +
 +--- fam/Makefile.am.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Makefile.am	Sat Dec 15 18:13:35 2001
 +@@ -1,7 +1,7 @@
 + include $(top_srcdir)/common.am
 + 
 +-bin_PROGRAMS = fam
 +-sysconf_DATA = fam.conf
 ++sbin_PROGRAMS = fam
 ++sysconf_DATA = fam.conf.sample
 + 
 + fam_SOURCES = \
 +   Activity.c++ \
 +@@ -72,6 +72,7 @@
 +   main.c++ \
 +   timeval.c++ \
 +   timeval.h \
 ++  mntent_compat.c++ \
 +   @IMON_FUNCS@.c++
 + 
 + EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
 +@@ -79,4 +80,4 @@
 + fam_LDADD = -lrpcsvc $(top_srcdir)/support/libsupport.a
 + 
 + CLEANFILES += @MKDEPFILE@ ii_files/*.ii
 +-sinclude @MKDEPFILE@
 ++#sinclude @MKDEPFILE@
 Index: files/patch-fam::NetConnection.c++
 ===================================================================
 RCS file: files/patch-fam::NetConnection.c++
 diff -N files/patch-fam::NetConnection.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::NetConnection.c++	16 Dec 2001 00:37:17 -0000
 @@ -0,0 +1,26 @@
 +
 +$FreeBSD$
 +
 +--- fam/NetConnection.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/NetConnection.c++	Fri Dec 14 17:41:01 2001
 +@@ -252,7 +252,19 @@
 +                 assert(ret == omsgList->len);
 +             } else 
 +             {
 +-                Log::error("fd %d write error: %m", fd);
 ++		/* Since the client library can close it's fd before
 ++		 * getting acks from all FAMCancelMonitor requests we
 ++		 * may get a broken pipe error here when writing the ack.
 ++		 * Don't threat this as an error, since that fills the logs
 ++		 * with crap.
 ++		 */
 ++		if (errno == EPIPE)
 ++		{
 ++		    Log::debug("fd %d write error: %m", fd);
 ++		} else
 ++		{
 ++		    Log::error("fd %d write error: %m", fd);
 ++		}
 +                 
 +             }
 +             msgList_t *oldHead = omsgList;
 Index: files/patch-fam::Scheduler.h
 ===================================================================
 RCS file: files/patch-fam::Scheduler.h
 diff -N files/patch-fam::Scheduler.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Scheduler.h	16 Dec 2001 00:37:41 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- fam/Scheduler.h.orig	Fri May 19 23:46:32 2000
 ++++ fam/Scheduler.h	Sun Oct  7 15:22:17 2001
 +@@ -24,6 +24,7 @@
 + #define Scheduler_included
 + 
 + #include <sys/time.h>
 ++#include <string.h>
 + 
 + #include "Boolean.h"
 + 
 Index: files/patch-fam::StringTable.h
 ===================================================================
 RCS file: files/patch-fam::StringTable.h
 diff -N files/patch-fam::StringTable.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::StringTable.h	16 Dec 2001 00:37:55 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- fam/StringTable.h.orig	Fri May 19 23:46:32 2000
 ++++ fam/StringTable.h	Sun Oct  7 15:22:17 2001
 +@@ -25,6 +25,7 @@
 + 
 + #include <assert.h>
 + #include <string.h>
 ++#include "mntent.h"
 + 
 + //  A StringTable maps C strings onto values.  It is a cheap O(n)
 + //  implementation, suitable only for small tables that are
 Index: files/patch-fam::fam.conf.in
 ===================================================================
 RCS file: files/patch-fam::fam.conf.in
 diff -N files/patch-fam::fam.conf.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::fam.conf.in	16 Dec 2001 00:38:08 -0000
 @@ -0,0 +1,14 @@
 +
 +$FreeBSD$
 +
 +--- fam/fam.conf.in.orig	Mon Oct 22 01:33:11 2001
 ++++ fam/fam.conf.in	Sun Nov 25 18:23:46 2001
 +@@ -6,7 +6,7 @@
 + #  fam.conf
 + #
 + #  For more information on the configuration options below, see the
 +-#  fam(1M) man page.
 ++#  fam(8) man page.
 + 
 + #
 + #  insecure_compatibility disables authentication.  This causes
 Index: files/patch-fam::mntent.h
 ===================================================================
 RCS file: files/patch-fam::mntent.h
 diff -N files/patch-fam::mntent.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::mntent.h	16 Dec 2001 00:38:24 -0000
 @@ -0,0 +1,62 @@
 +
 +$FreeBSD$
 +
 +--- fam/mntent.h.orig	Sun Oct  7 15:22:17 2001
 ++++ fam/mntent.h	Sun Oct  7 15:22:17 2001
 +@@ -0,0 +1,56 @@
 ++/*
 ++ *  mntent
 ++ *  mntent.h - compatability header for FreeBSD
 ++ *
 ++ *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
 ++ *  All rights reserved.
 ++ *
 ++ * 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.
 ++ *
 ++ * 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.
 ++ */
 ++
 ++#if defined(HAVE_MNTENT_H)
 ++#include <mntent.h>
 ++#else
 ++#ifndef _MNTENT_H
 ++#define _MNTENT_H
 ++#include <stdio.h>
 ++
 ++#define MOUNTED "dummy"
 ++
 ++#define MNTTYPE_NFS "nfs"
 ++
 ++struct mntent {
 ++	char *mnt_fsname;
 ++	char *mnt_dir;
 ++	char *mnt_type;
 ++	char *mnt_opts;
 ++	int mnt_freq;
 ++	int mnt_passno;
 ++};
 ++
 ++#define setmntent(x,y) ((FILE *)0x1)
 ++struct mntent *getmntent __P ((FILE *fp));
 ++char *hasmntopt __P ((const struct mntent *mnt, const char *option));
 ++#define endmntent(x) ((int)1)
 ++
 ++#endif /* _MNTENT_H */
 ++#endif /* HAVE_MNTENT_H */
 Index: files/patch-fam::mntent_compat.c++
 ===================================================================
 RCS file: files/patch-fam::mntent_compat.c++
 diff -N files/patch-fam::mntent_compat.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::mntent_compat.c++	16 Dec 2001 00:38:39 -0000
 @@ -0,0 +1,157 @@
 +
 +$FreeBSD$
 +
 +--- fam/mntent_compat.c++.orig	Sun Oct  7 15:22:17 2001
 ++++ fam/mntent_compat.c++	Sun Oct  7 15:22:17 2001
 +@@ -0,0 +1,151 @@
 ++/*
 ++ * Copyright (c) 1980, 1989, 1993, 1994
 ++ *      The Regents of the University of California.  All rights reserved.
 ++ * Copyright (c) 2001
 ++ *      David Rufino <daverufino@btinternet.com>
 ++ *
 ++ * 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 <stdlib.h>
 ++#include <string.h>
 ++#include <sys/param.h>
 ++#include <sys/ucred.h>
 ++#include <sys/mount.h>
 ++
 ++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");
 ++        if (flags & MNT_NOCLUSTERR)     res = catopt(res, "noclusterr");
 ++        if (flags & MNT_NOCLUSTERW)     res = catopt(res, "noclusterw");
 ++        if (flags & MNT_NOSYMFOLLOW)    res = catopt(res, "nosymfollow");
 ++        if (flags & MNT_SUIDDIR)        res = catopt(res, "suiddir");
 ++
 ++        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 */
 Index: files/patch-freebsd
 ===================================================================
 RCS file: files/patch-freebsd
 diff -N files/patch-freebsd
 --- files/patch-freebsd	31 Mar 2001 02:45:55 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,490 +0,0 @@
 -diff -urN fam-oss-2.6.4/config.h.in fam-oss-2.6.4-freebsd/config.h.in
 ---- fam-oss-2.6.4/config.h.in	Sat May 20 05:50:17 2000
 -+++ fam-oss-2.6.4-freebsd/config.h.in	Sun Mar 18 00:02:38 2001
 -@@ -12,6 +12,8 @@
 - /*  Define if the system has imon and IMONIOC_ ioctl flags.  */
 - #undef HAVE_IMON
 - 
 -+#undef HAVE_MNTENT_H
 -+
 - /*  Define if the system has the struct revokdi and the IMONIOC_REVOKDI
 - **  ioctl flag.  (IRIX 5.3 doesn't.)
 - */
 -diff -urN fam-oss-2.6.4/configure.in fam-oss-2.6.4-freebsd/configure.in
 ---- fam-oss-2.6.4/configure.in	Sat May 20 06:23:17 2000
 -+++ fam-oss-2.6.4-freebsd/configure.in	Sun Mar 18 00:36:29 2001
 -@@ -95,6 +95,8 @@
 - dnl AC_HEADER_SYS_WAIT
 - dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
 - 
 -+AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
 -+
 - dnl
 - dnl  See if imon is available; if so, is it IRIX or Linux?
 - dnl
 -@@ -299,10 +301,10 @@
 - dnl If we don't have MNTTYPE_NFS , we croak.
 - dnl
 - 
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 --FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 - 
 - dnl
 - dnl  Test for bindresvport() prototype.
 -diff -urN fam-oss-2.6.4/fam/Client.h fam-oss-2.6.4-freebsd/fam/Client.h
 ---- fam-oss-2.6.4/fam/Client.h	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Client.h	Sat Mar 17 00:14:35 2001
 -@@ -23,6 +23,7 @@
 - #ifndef Client_included
 - #define Client_included
 - 
 -+#include <sys/types.h>
 - #include <netinet/in.h>  // for in_addr
 - 
 - #include "Activity.h"
 -diff -urN fam-oss-2.6.4/fam/FileSystem.c++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++
 ---- fam-oss-2.6.4/fam/FileSystem.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++	Sat Mar 17 13:18:10 2001
 -@@ -22,7 +22,7 @@
 - 
 - #include "FileSystem.h"
 - 
 --#include <mntent.h>
 -+#include "mntent.h"
 - #include <string.h>
 - 
 - #include "Event.h"
 -diff -urN fam-oss-2.6.4/fam/FileSystemTable.c++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++
 ---- fam-oss-2.6.4/fam/FileSystemTable.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++	Sat Mar 17 23:44:17 2001
 -@@ -21,9 +21,10 @@
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 - 
 - #include <stddef.h>
 -+#include <stdio.h>
 - #include "FileSystemTable.h"
 - 
 --#include <mntent.h>
 -+#include "mntent.h"
 - #include <stdlib.h>
 - #include <string.h>
 - 
 -@@ -255,7 +256,10 @@
 -     //  create_fs_by_name initializes our "root" member variable.
 -     if (!fs_by_name)
 -     {   create_fs_by_name();
 -+#if !defined(__FreeBSD__)
 -+	/* there is no mtab "file" in freebsd! */
 - 	mtab_watcher = new InternalClient(mtab_name, mtab_event_handler, NULL);
 -+#endif
 -     }
 - 
 -     cr.become_user();
 -diff -urN fam-oss-2.6.4/fam/IMon.c++ fam-oss-2.6.4-freebsd/fam/IMon.c++
 ---- fam-oss-2.6.4/fam/IMon.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/IMon.c++	Sat Mar 17 14:06:17 2001
 -@@ -34,7 +34,9 @@
 - #endif
 - #endif
 - 
 --#include <sys/sysmacros.h>
 -+#if !defined(__FreeBSD__)
 -+#  include <sys/sysmacros.h>
 -+#endif
 - #include <unistd.h>
 - 
 - #include "Interest.h"
 -diff -urN fam-oss-2.6.4/fam/Interest.c++ fam-oss-2.6.4-freebsd/fam/Interest.c++
 ---- fam-oss-2.6.4/fam/Interest.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Interest.c++	Sat Mar 17 14:06:37 2001
 -@@ -25,7 +25,9 @@
 - #include <string.h>
 - #include <errno.h>
 - #include <sys/param.h>
 --#include <sys/sysmacros.h>
 -+#if !defined(__FreeBSD__)
 -+#  include <sys/sysmacros.h>
 -+#endif
 - 
 - #ifdef HAVE_IRIX_XTAB_VERIFICATION
 - #include <stdio.h>
 -diff -urN fam-oss-2.6.4/fam/InternalClient.c++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++
 ---- fam-oss-2.6.4/fam/InternalClient.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++	Sat Mar 17 23:20:15 2001
 -@@ -35,8 +35,8 @@
 - {
 -     assert(filename);
 -     assert(h);
 --    assert(filename[0] == '/');
 -     Log::debug("%s watching %s", name(), filename);
 -+    assert(filename[0] == '/');
 -     interest = new File(filename, this, Request(0), Cred::SuperUser);
 - }
 - 
 -diff -urN fam-oss-2.6.4/fam/Listener.c++ fam-oss-2.6.4-freebsd/fam/Listener.c++
 ---- fam-oss-2.6.4/fam/Listener.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Listener.c++	Sat Mar 17 14:12:57 2001
 -@@ -22,6 +22,8 @@
 - 
 - #include "Listener.h"
 - 
 -+#include <stdio.h>
 -+#include <stdlib.h>
 - #include <assert.h>
 - #include <fcntl.h>
 - #include <sys/types.h>
 -@@ -202,7 +204,11 @@
 -     //  requested user and pass the name back to the client.
 - 
 -     char *tmpfile = tempnam("/tmp", ".fam");
 -+#if defined(__FreeBSD__)
 -+    sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 -+#else
 -     sockaddr_un sun = { AF_UNIX, "" };
 -+#endif
 -     if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1))
 -     {
 -         Log::error("tmpnam() too long for sun_path (%d >= %d)!",
 -@@ -235,7 +241,7 @@
 -         return;
 -     }
 - 
 --    if (chown(sun.sun_path, uid, -1) != 0)
 -+    if (chown(sun.sun_path, uid, (gid_t)-1) != 0)
 -     {   Log::perror("localclient chown");
 - 	close(client_sock);
 -         return;
 -@@ -271,7 +277,11 @@
 - 
 -     // Get the new socket.
 - 
 -+#if defined(__FreeBSD__)
 -+    struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 -+#else
 -     struct sockaddr_un sun = { AF_UNIX, "" };
 -+#endif
 -     CONFIG_SOCKLEN_T sunlen = sizeof(sun);
 -     int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen);
 -     if (client_fd < 0)
 -@@ -333,7 +343,11 @@
 - void
 - Listener::dirty_ugly_hack()
 - {
 -+#if defined(__FreeBSD__)
 -+    static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" };
 -+#else
 -     static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" };
 -+#endif
 - 
 -     int sock = socket(PF_UNIX, SOCK_STREAM, 0);
 -     if (sock < 0)
 -diff -urN fam-oss-2.6.4/fam/Log.c++ fam-oss-2.6.4-freebsd/fam/Log.c++
 ---- fam-oss-2.6.4/fam/Log.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Log.c++	Sat Mar 17 14:14:31 2001
 -@@ -28,6 +28,8 @@
 - #include <stdlib.h>
 - #include <string.h>
 - #include <syslog.h>
 -+#include <sys/time.h>
 -+#include <sys/types.h>
 - #include <sys/resource.h>
 - #include <sys/stat.h>
 - #include <unistd.h>
 -diff -urN fam-oss-2.6.4/fam/Makefile.am fam-oss-2.6.4-freebsd/fam/Makefile.am
 ---- fam-oss-2.6.4/fam/Makefile.am	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Makefile.am	Sat Mar 17 18:12:17 2001
 -@@ -72,6 +72,7 @@
 -   main.c++ \
 -   timeval.c++ \
 -   timeval.h \
 -+  mntent_compat.c++ \
 -   @IMON_FUNCS@.c++
 - 
 - EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
 -diff -urN fam-oss-2.6.4/fam/Scheduler.h fam-oss-2.6.4-freebsd/fam/Scheduler.h
 ---- fam-oss-2.6.4/fam/Scheduler.h	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Scheduler.h	Sat Mar 17 00:14:04 2001
 -@@ -24,6 +24,7 @@
 - #define Scheduler_included
 - 
 - #include <sys/time.h>
 -+#include <string.h>
 - 
 - #include "Boolean.h"
 - 
 -diff -urN fam-oss-2.6.4/fam/StringTable.h fam-oss-2.6.4-freebsd/fam/StringTable.h
 ---- fam-oss-2.6.4/fam/StringTable.h	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/fam/StringTable.h	Sat Mar 17 18:05:38 2001
 -@@ -25,6 +25,7 @@
 - 
 - #include <assert.h>
 - #include <string.h>
 -+#include "mntent.h"
 - 
 - //  A StringTable maps C strings onto values.  It is a cheap O(n)
 - //  implementation, suitable only for small tables that are
 -diff -urN fam-oss-2.6.4/fam/mntent.h fam-oss-2.6.4-freebsd/fam/mntent.h
 ---- fam-oss-2.6.4/fam/mntent.h	Thu Jan  1 01:00:00 1970
 -+++ fam-oss-2.6.4-freebsd/fam/mntent.h	Sat Mar 17 18:11:08 2001
 -@@ -0,0 +1,56 @@
 -+/*
 -+ *  mntent
 -+ *  mntent.h - compatability header for FreeBSD
 -+ *
 -+ *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
 -+ *  All rights reserved.
 -+ *
 -+ * 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.
 -+ *
 -+ * 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.
 -+ */
 -+
 -+#if defined(HAVE_MNTENT_H)
 -+#include <mntent.h>
 -+#else
 -+#ifndef _MNTENT_H
 -+#define _MNTENT_H
 -+#include <stdio.h>
 -+
 -+#define MOUNTED "dummy"
 -+
 -+#define MNTTYPE_NFS "nfs"
 -+
 -+struct mntent {
 -+	char *mnt_fsname;
 -+	char *mnt_dir;
 -+	char *mnt_type;
 -+	char *mnt_opts;
 -+	int mnt_freq;
 -+	int mnt_passno;
 -+};
 -+
 -+#define setmntent(x,y) ((FILE *)0x1)
 -+struct mntent *getmntent __P ((FILE *fp));
 -+char *hasmntopt __P ((const struct mntent *mnt, const char *option));
 -+#define endmntent(x) ((int)1)
 -+
 -+#endif /* _MNTENT_H */
 -+#endif /* HAVE_MNTENT_H */
 -diff -urN fam-oss-2.6.4/fam/mntent_compat.c++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++
 ---- fam-oss-2.6.4/fam/mntent_compat.c++	Thu Jan  1 01:00:00 1970
 -+++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++	Sat Mar 17 23:48:07 2001
 -@@ -0,0 +1,151 @@
 -+/*
 -+ * Copyright (c) 1980, 1989, 1993, 1994
 -+ *      The Regents of the University of California.  All rights reserved.
 -+ * Copyright (c) 2001
 -+ *      David Rufino <daverufino@btinternet.com>
 -+ *
 -+ * 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 <stdlib.h>
 -+#include <string.h>
 -+#include <sys/param.h>
 -+#include <sys/ucred.h>
 -+#include <sys/mount.h>
 -+
 -+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");
 -+        if (flags & MNT_NOCLUSTERR)     res = catopt(res, "noclusterr");
 -+        if (flags & MNT_NOCLUSTERW)     res = catopt(res, "noclusterw");
 -+        if (flags & MNT_NOSYMFOLLOW)    res = catopt(res, "nosymfollow");
 -+        if (flags & MNT_SUIDDIR)        res = catopt(res, "suiddir");
 -+
 -+        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 */
 -diff -urN fam-oss-2.6.4/libfam/Client.c++ fam-oss-2.6.4-freebsd/libfam/Client.c++
 ---- fam-oss-2.6.4/libfam/Client.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/libfam/Client.c++	Sat Mar 17 00:12:01 2001
 -@@ -20,6 +20,7 @@
 - //  with this program; if not, write the Free Software Foundation, Inc., 59
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 - 
 -+#include <stdio.h>
 - #include <stdlib.h>
 - #include <unistd.h>
 - #include <netinet/in.h>
 -diff -urN fam-oss-2.6.4/libfam/fam.c++ fam-oss-2.6.4-freebsd/libfam/fam.c++
 ---- fam-oss-2.6.4/libfam/fam.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/libfam/fam.c++	Sat Mar 17 00:12:43 2001
 -@@ -21,6 +21,7 @@
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 - 
 - #include <sys/types.h>
 -+#include <rpc/rpc.h>
 - #include <sys/time.h>
 - #include <unistd.h>
 - #include <stdlib.h>
 -diff -urN fam-oss-2.6.4/test/test.c++ fam-oss-2.6.4-freebsd/test/test.c++
 ---- fam-oss-2.6.4/test/test.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/test/test.c++	Sat Mar 17 18:39:23 2001
 -@@ -1,6 +1,7 @@
 - #include <sys/types.h>
 - #include <sys/time.h>
 - #include <stdio.h>
 -+#include <string.h>
 - #include <unistd.h>
 - #include <signal.h>
 - #include <errno.h>
 ---- fam-oss-2.6.4/acconfig.h	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/acconfig.h	Sun Mar 18 00:40:47 2001
 -@@ -44,6 +44,8 @@
 - **  Otherwise, we'll use MNTTYPE_NFS.  */
 - #undef HAVE_FSID_NFS2
 - 
 -+#undef HAVE_MNTENT_H
 -+
 - /* Define if we have MNTTYPE_NFS2 */
 - #define HAVE_MNTTYPE_NFS2 0
 - 
 Index: files/patch-libfam::Client.c++
 ===================================================================
 RCS file: files/patch-libfam::Client.c++
 diff -N files/patch-libfam::Client.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-libfam::Client.c++	16 Dec 2001 00:38:52 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- libfam/Client.c++.orig	Fri May 19 23:46:32 2000
 ++++ libfam/Client.c++	Sun Oct  7 15:22:17 2001
 +@@ -20,6 +20,7 @@
 + //  with this program; if not, write the Free Software Foundation, Inc., 59
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 + 
 ++#include <stdio.h>
 + #include <stdlib.h>
 + #include <unistd.h>
 + #include <netinet/in.h>
 Index: files/patch-libfam::fam.c++
 ===================================================================
 RCS file: files/patch-libfam::fam.c++
 diff -N files/patch-libfam::fam.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-libfam::fam.c++	16 Dec 2001 00:39:05 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- libfam/fam.c++.orig	Fri May 19 23:46:32 2000
 ++++ libfam/fam.c++	Sun Oct  7 15:22:17 2001
 +@@ -21,6 +21,7 @@
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 + 
 + #include <sys/types.h>
 ++#include <rpc/rpc.h>
 + #include <sys/time.h>
 + #include <unistd.h>
 + #include <stdlib.h>
 Index: files/patch-man::Makefile.am
 ===================================================================
 RCS file: files/patch-man::Makefile.am
 diff -N files/patch-man::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::Makefile.am	16 Dec 2001 00:39:22 -0000
 @@ -0,0 +1,15 @@
 +
 +$FreeBSD$
 +
 +--- man/Makefile.am.orig	Mon Oct 22 01:33:11 2001
 ++++ man/Makefile.am	Fri Nov 23 10:49:15 2001
 +@@ -1,5 +1,5 @@
 +-#  This is a little weird because fam.1m is generated from fam.1m.in
 ++#  This is a little weird because fam.8 is generated from fam.8.in
 + #  at the end of the configure script.
 +-man_MANS = fam.1m fam.3x
 +-EXTRA_DIST = fam.1m.in fam.3x
 +-CLEANFILES = fam.1m
 ++man_MANS = fam.8 fam.3
 ++EXTRA_DIST = fam.8.in fam.3
 ++CLEANFILES = fam.8
 Index: files/patch-man::fam.1m.in
 ===================================================================
 RCS file: files/patch-man::fam.1m.in
 diff -N files/patch-man::fam.1m.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::fam.1m.in	16 Dec 2001 00:39:41 -0000
 @@ -0,0 +1,89 @@
 +
 +$FreeBSD$
 +
 +--- man/fam.1m.in.orig	Mon Oct 22 01:33:11 2001
 ++++ man/fam.1m.in	Sat Dec 15 18:29:50 2001
 +@@ -1,6 +1,6 @@
 +-.\"##  fam.1m.in
 ++.\"##  fam.8.in
 + .\"##
 +-.\"##  When configure.in generates fam.1m, lines starting with .\"##
 ++.\"##  When configure.in generates fam.8, lines starting with .\"##
 + .\"##  should be removed; when building on IRIX, lines starting with
 + .\"##  .\"IRIX should have that part removed (uncommenting the rest
 + .\"##  of the line).
 +@@ -9,13 +9,13 @@
 + .\"##  separate files.
 + .\"##
 + .nr X
 +-.if \nX=0 .ds x} fam 1M "Silicon Graphics" "\&"
 ++.if \nX=0 .ds x} fam 8 "Silicon Graphics" "\&"
 + .TH \*(x}
 + .SH NAME
 + fam \- file alteration monitor
 + .SH SYNOPSIS
 + .nf
 +-\f3/usr/etc/fam\f1 [ \f3\-f\f1 | \f3\-v\f1 | \f3\-d\f1 ] [ \f3\-l\f1 | \c
 ++\f3fam\f1 [ \f3\-f\f1 | \f3\-v\f1 | \f3\-d\f1 ] [ \f3\-l\f1 | \c
 + \f3\-t\f1 \f2NFS_polling_interval\f1 ] 
 + 	[ \f3\-T\f1 \f2idle_timeout\f1 ] [ \f3\-p\f1 \c
 + \f2program\f3.\f2version\f1 ] [ \f3\-L\f1 ] [ \f3-C\f1 ]
 +@@ -24,22 +24,13 @@
 + .SH DESCRIPTION
 + \f2fam\f1 is a server that tracks changes to the filesystem and
 + relays these changes to interested applications.
 +-Applications such as
 +-\f2fm\f1(1G) and \f2mailbox\f1(1) present an up-to-date view of the filesystem.
 +-In the absence of \f2fam\f1, these applications and others like them
 +-are forced to poll the filesystem to detect changes.
 +-\f2fam\f1 is
 +-more efficient.
 +-.P
 + Applications can request \f2fam\f1 to monitor any files or directories in
 + any filesystem.
 + When \f2fam\f1 detects changes to monitored files, it notifies
 + the appropriate application.
 + The FAM API provides a programmatic interface to \f2fam\f1; see
 +-.IR fam (3X).
 ++.IR fam (3).
 + .P
 +-\f2fam\f1 is informed of filesystem changes as they happen by the
 +-kernel through the \f2imon\f1(7M) pseudo device driver.
 + If asked to
 + monitor files on an NFS mounted filesystem, \f2fam\f1 tries to use
 + \f2fam\f1 on the NFS server to monitor files.
 +@@ -47,9 +38,9 @@
 + contact a remote \f2fam\f1, it polls the files instead.
 + \f2fam\f1 also polls special files.
 + .P
 +-Normally, \f2fam\f1 is started by \f2inetd\f1(1M).
 ++Normally, \f2fam\f1 is started by \f2inetd\f1(8).
 + It is registered with
 +-\f2portmap\f1(1M) as performing the sgi_fam service.
 ++\f2%%PORTMAP%%\f1(8) as performing the sgi_fam service.
 + .SH OPTIONS
 + .TP 26
 + \f3\-l\f1
 +@@ -166,8 +157,7 @@
 + \f2Note that fam never opens the files it's monitoring\f1, and cannot
 + be used by a rogue client to read the contents of any file on the system.
 + \f2fam\f1 only gives out the names of monitored files, and only monitors files
 +-which the client can
 +-.IR stat (1M).
 ++which the client can stat.
 + Users can stat a file without having read permission on it as long as
 + they have search permission on the directory containing it.
 + .\"IRIX .SH COMPATIBILITY
 +@@ -196,9 +186,7 @@
 + XXX_FAM_CONF
 + .SH "SEE ALSO"
 + .\"IRIX fm(1G),
 +-inetd(1M),
 ++fam(3),
 ++inetd(8),
 + .\"IRIX mailbox(1),
 +-portmap(1M),
 +-fam(3X),
 +-imon(7M),
 +-stat(1M).
 ++%%PORTMAP%%(8).
 Index: files/patch-man::fam.3x
 ===================================================================
 RCS file: files/patch-man::fam.3x
 diff -N files/patch-man::fam.3x
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::fam.3x	16 Dec 2001 00:39:55 -0000
 @@ -0,0 +1,41 @@
 +
 +$FreeBSD$
 +
 +--- man/fam.3x.orig	Mon Oct 22 01:33:11 2001
 ++++ man/fam.3x	Fri Nov 23 10:51:07 2001
 +@@ -1,9 +1,9 @@
 + '\"macro stdmacro
 +-.if n .pH g3x.fam @(#)fam	30.3 of 1/19/86
 ++.if n .pH g3.fam @(#)fam	30.3 of 1/19/86
 + .nr X
 +-.if \nX=0 .ds x} FAM 3X "Specialized Libraries" "\&"
 +-.if \nX=1 .ds x} FAM 3X "Specialized Libraries"
 +-.if \nX=2 .ds x} FAM 3X "" "\&"
 ++.if \nX=0 .ds x} FAM 3 "Specialized Libraries" "\&"
 ++.if \nX=1 .ds x} FAM 3 "Specialized Libraries"
 ++.if \nX=2 .ds x} FAM 3 "" "\&"
 + .if \nX=3 .ds x} FAM "" "" "\&"
 + .TH \*(x}
 + .SH NAME
 +@@ -65,10 +65,9 @@
 + .PP
 + .SH DESCRIPTION
 + \fIFAM\fP monitors files and directories, notifying interested
 +-applications of changes.  Routines for communicating with the fam(1M)
 ++applications of changes.  Routines for communicating with the fam(8)
 + server process are found in ``libfam.a'', which is loaded if the
 +-option ``-lfam'' is used with cc(1) or ld(1).  The library
 +-``libC.a'' (``-lC'') must also be specified.
 ++option ``-lfam'' is used with cc(1) or ld(1).
 + .PP
 + An application calls routines described here to establish a list of
 + files for \fIfam \fPto monitor.  \fIFam \fPgenerates events on a socket to
 +@@ -282,7 +281,7 @@
 + 
 + 
 + .SH SEE ALSO
 +-fam(1M).
 ++fam(8).
 + .SH BUGS
 + The FAMMoved event is not currently supported.
 + .PP
 Index: files/patch-support::Makefile.am
 ===================================================================
 RCS file: files/patch-support::Makefile.am
 diff -N files/patch-support::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-support::Makefile.am	16 Dec 2001 00:40:07 -0000
 @@ -0,0 +1,11 @@
 +
 +$FreeBSD$
 +
 +--- support/Makefile.am.orig	Mon Oct 22 01:33:11 2001
 ++++ support/Makefile.am	Sat Dec 15 18:14:16 2001
 +@@ -12,4 +12,4 @@
 + libsupport_a_LIBADD       = @snprintf_o@ @foo_o@
 + 
 + CLEANFILES += @MKDEPFILE@ ii_files/*.ii
 +-sinclude @MKDEPFILE@
 ++#sinclude @MKDEPFILE@

From: Jeremy Norris <ishmael27x@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/32231: Update port devel/fam
Date: Sun, 16 Dec 2001 23:15:10 -0600

 I forgot a couple things in the previous update, so please use this diff:
 
 Include patch posted to FAM mailing list by Mark Miller <joup@bigfoot.com>
 that allows specification of nfs_polling_interval and idle_timeout in fam.conf.
 Also changes discrepancy in usage() stating nfs_polling_interval default is 3
 (it is really 6). (found in patch-fam::main.c++, patch-fam::fam.conf.in, and
 patch-man::fam.1m.in).
 
 Add patch-fam::Scheduler.c++, which is obtained from Debian. This fixes
 building of fam with gcc-3.
 
 Please note, I have submitted these patches to the official FAM caretakers.
 Please see bug 93 at http://oss.sgi.com/bugzilla/
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/Makefile,v
 retrieving revision 1.1
 diff -u -r1.1 Makefile
 --- Makefile	31 Mar 2001 02:45:55 -0000	1.1
 +++ Makefile	17 Dec 2001 05:00:10 -0000
 @@ -5,25 +5,91 @@
  # $FreeBSD: ports/devel/fam/Makefile,v 1.1 2001/03/31 02:45:55 will Exp $
  #
  
 -PORTNAME=	fam
 -PORTVERSION=	2.6.4
 -CATEGORIES=	devel
 -MASTER_SITES=	ftp://oss.sgi.com/projects/fam/download/
 -DISTNAME=	${PORTNAME}-oss-${PORTVERSION}
 -
 -MAINTAINER=	ishmael27@home.com
 -
 -USE_AUTOMAKE=	yes
 -USE_LIBTOOL=	yes
 -USE_GMAKE=	yes
 -PATCH_STRIP=	-p1
 -INSTALLS_SHLIB=	yes
 +PORTNAME=		fam
 +PORTVERSION=		2.6.6
 +CATEGORIES=		sysutils
 +MASTER_SITES=		ftp://oss.sgi.com/projects/fam/download/
  
 -MAN1=		fam.1m
 -MAN3=		fam.3x
 +MAINTAINER=		ishmael27x@yahoo.com
 +
 +USE_AUTOCONF_VER=	213
 +USE_AUTOMAKE_VER=	15
 +AUTOMAKE_ARGS=		--add-missing --force-missing --copy --foreign
 +USE_LIBTOOL=		yes
 +EXTRACT_AFTER_ARGS=	| ${TAR} -xf - -C ${WRKSRC}
 +PKGMESSAGE=		${WRKDIR}/.MESSAGE
 +INSTALLS_SHLIB=		yes
 +MAN3=			fam.3
 +MAN8=			fam.8
 +
 +LIBTOOLIZE=		libtoolize
 +LIBTOOLIZE_ARGS=	--force --copy
 +.if exists(/usr/sbin/rpcbind)
 +PORTMAP=		rpcbind
 +.else
 +PORTMAP=		portmap
 +.endif
 +
 +# XXX This and ${EXTRACT_AFTER_ARGS} are needed since tarball doesn't extract
 +#     directly into ${WRKDIR}/fam-2.6.6
 +do-extract:
 +	@${RM} -rf ${WRKDIR}
 +	@${MKDIR} ${WRKSRC}
 +	@for file in ${EXTRACT_ONLY}; do \
 +		if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
 +		then \
 +			exit 1; \
 +		fi \
 +	done
 +.if !defined(EXTRACT_PRESERVE_OWNERSHIP)
 +	@if [ `id -u` = 0 ]; then \
 +		${CHMOD} -R ug-s ${WRKDIR}; \
 +		${CHOWN} -R 0:0 ${WRKDIR}; \
 +	fi
 +.endif
 +
 +post-patch:
 +	@${MV} ${WRKSRC}/man/fam.1m.in ${WRKSRC}/man/fam.8.in
 +	@${MV} ${WRKSRC}/man/fam.3x ${WRKSRC}/man/fam.3
 +
 +# XXX This seems to be the more preferred order of running things.
 +do-configure:
 +	@(cd ${WRKSRC} && ${LIBTOOLIZE} ${LIBTOOLIZE_ARGS})
 +	@(cd ${WRKSRC} && ${ACLOCAL})
 +	@(cd ${WRKSRC} && ${SETENV} ${AUTOCONF_ENV} ${AUTOCONF} \
 +		${AUTOCONF_ARGS})
 +# XXX This can go away when we get autoconf-2.52 in the ports tree.
 +	@${PERL} -pi -e '\
 +		s|^AUTOCONF=.*|AUTOCONF=\$${AUTOCONF-"\$${am_missing_run}${AUTOCONF}"}| ; \
 +		s|^AUTOHEADER=.*|AUTOHEADER=\$${AUTOHEADER-"\$${am_missing_run}${AUTOHEADER}"}|' \
 +		${WRKSRC}/configure
 +	@(cd ${WRKSRC} && ${AUTOHEADER})
 +	@(cd ${WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${AUTOMAKE} \
 +		${AUTOMAKE_ARGS})
 +	@(cd ${WRKSRC} && \
 +		if ! ${SETENV} CC="${CC}" CXX="${CXX}" \
 +	    CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
 +	    INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \
 +	    INSTALL_DATA="${INSTALL_DATA}" \
 +	    INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
 +	    INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
 +	    ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}; then \
 +			${ECHO} "===>  Script \"${CONFIGURE_SCRIPT}\" failed: here are the contents of \"${CONFIGURE_LOG}\""; \
 +			${CAT} ${CONFIGURE_LOG}; \
 +			${ECHO} "(end of \"${CONFIGURE_LOG}\")"; \
 +			${FALSE}; \
 +		fi)
 +
 +post-configure:
 +	@${PERL} -pi -e 's|%%PORTMAP%%|${PORTMAP}|g' ${WRKSRC}/man/fam.8
 +	@${MV} ${WRKSRC}/fam/fam.conf ${WRKSRC}/fam/fam.conf.sample
 +	@${SED} -e 's|%%PORTMAP%%|${PORTMAP}|g' -e 's|%%PREFIX%%|${PREFIX}|g' \
 +		${PKGDIR}/pkg-message >${PKGMESSAGE}
  
  post-install:
 -	@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/fam.sh.sample ${PREFIX}/etc/rc.d/fam.sh.sample
 +	@if [ ! -f ${PREFIX}/etc/fam.conf ]; then \
 +		${CP} -p ${PREFIX}/etc/fam.conf.sample ${PREFIX}/etc/fam.conf; \
 +	fi
  	@${CAT} ${PKGMESSAGE}
  
  .include <bsd.port.mk>
 Index: distinfo
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/distinfo,v
 retrieving revision 1.1
 diff -u -r1.1 distinfo
 --- distinfo	31 Mar 2001 02:45:55 -0000	1.1
 +++ distinfo	23 Nov 2001 14:53:49 -0000
 @@ -1 +1 @@
 -MD5 (fam-oss-2.6.4.tar.gz) = d060919b3d9ede61a8b68eae1ded53ce
 +MD5 (fam-2.6.6.tar.gz) = c1ecf4136b673e49fd0ea7a2e50d9885
 Index: pkg-descr
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/pkg-descr,v
 retrieving revision 1.1
 diff -u -r1.1 pkg-descr
 --- pkg-descr	31 Mar 2001 02:45:55 -0000	1.1
 +++ pkg-descr	16 Dec 2001 17:42:15 -0000
 @@ -1,4 +1,5 @@
 -FAM, the File Alteration Monitor, provides an API which applications can use
 -to be notified when specific files or directories are changed.
 +FAM, the File Alteration Monitor, provides a daemon and an API which
 +applications can use to be notified when specific files or directories are
 +changed.
  
  WWW: http://oss.sgi.com/projects/fam/
 Index: pkg-message
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/pkg-message,v
 retrieving revision 1.1
 diff -u -r1.1 pkg-message
 --- pkg-message	31 Mar 2001 02:45:55 -0000	1.1
 +++ pkg-message	25 Nov 2001 23:13:59 -0000
 @@ -1,8 +1,17 @@
 -************************************************************************
  
 -In order to run this port, please add the following line to /etc/rpc if
 -it is not already there:
 +To run FAM, please check and perform the following:
  
 +1. Be sure that the following line is in /etc/rpc
  sgi_fam		391002
  
 -************************************************************************
 +2. Be sure that %%PORTMAP%%(8) is running.
 +You probably will want to add the following line to /etc/rc.conf
 +portmap_enable="YES"
 +
 +3. Be sure that the following line is in /etc/inetd.conf
 +sgi_fam/1-2	stream rpc/tcp wait root	%%PREFIX%%/sbin/fam	fam
 +
 +4. Be sure that inetd(8) is running.
 +You probably will want to add the following line to /etc/rc.conf
 +inetd_enable="YES"
 +
 Index: pkg-plist
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/pkg-plist,v
 retrieving revision 1.2
 diff -u -r1.2 pkg-plist
 --- pkg-plist	21 May 2001 07:13:05 -0000	1.2
 +++ pkg-plist	26 Nov 2001 00:20:53 -0000
 @@ -1,9 +1,9 @@
 -bin/fam
 -etc/fam.conf
 -etc/rc.d/fam.sh.sample
 +@comment $FreeBSD$
 +@unexec if cmp -s %D/etc/fam.conf %D/etc/fam.conf.sample; then rm -f %D/etc/fam.conf; fi
 +etc/fam.conf.sample
 +@exec if [ ! -f %D/etc/fam.conf ]; then cp -p %D/%F %B/fam.conf; fi
  include/fam.h
 -lib/fam/editconf.perl
  lib/libfam.a
  lib/libfam.so
  lib/libfam.so.0
 -@dirrm lib/fam
 +sbin/fam
 Index: files/fam.sh.sample
 ===================================================================
 RCS file: files/fam.sh.sample
 diff -N files/fam.sh.sample
 --- files/fam.sh.sample	31 Mar 2001 02:45:55 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,20 +0,0 @@
 -#!/bin/sh
 -
 -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
 -    echo "$0: Cannot determine the PREFIX" >&2
 -    exit 1
 -fi
 -
 -case "$1" in
 -start)
 -	[ -x ${PREFIX}/bin/fam ] && ( ${PREFIX}/bin/fam & ) && echo -n ' fam'
 -	;;
 -stop)
 -	killall fam && echo -n ' fam'
 -	;;
 -*)
 -	echo "Usage: `basename $0` {start|stop}" >&2
 -	;;
 -esac
 -
 -exit 0
 Index: files/patch-Makefile.am
 ===================================================================
 RCS file: /home/ncvs/ports/devel/fam/files/patch-Makefile.am,v
 retrieving revision 1.1
 diff -u -r1.1 patch-Makefile.am
 --- files/patch-Makefile.am	31 Mar 2001 02:45:55 -0000	1.1
 +++ files/patch-Makefile.am	16 Dec 2001 00:32:21 -0000
 @@ -1,33 +1,58 @@
 ---- Makefile.am.orig	Fri May 19 23:46:31 2000
 -+++ Makefile.am	Mon Mar 19 11:51:05 2001
 -@@ -7,30 +7,3 @@
 - rpm: dist
 - 	@cd build && $(MAKE) $(AM_MAKEFLAGS) rpm
 +
 +$FreeBSD$
 +
 +--- Makefile.am.orig	Mon Oct 22 01:33:09 2001
 ++++ Makefile.am	Sun Nov 25 18:46:14 2001
 +@@ -1,6 +1,6 @@
 + include $(top_srcdir)/common.am
   
 --#  We proceed even if these commands fail because this might be an install
 --#  into $DESTDIR by a non-root user.
 +-SUBDIRS = util include support libfam fam man test build
 ++SUBDIRS = include support libfam fam man
 + 
 + EXTRA_DIST = common.am INSTALL.rpm
 + 
 +@@ -9,28 +9,28 @@
 + 
 + #  We proceed even if these commands fail because this might be an install
 + #  into $DESTDIR by a non-root user.
  -install-exec-hook:
  -	-@if test "no$(LDCONFIG)" != "no"; then \
 --##	    echo "Adding $(libdir) to ld.so.conf..."; \
 ++#install-exec-hook:
 ++#	-@if test "no$(LDCONFIG)" != "no"; then \
 + ##	    echo "Adding $(libdir) to ld.so.conf..."; \
  -	    $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \
  -	    exec $(LDCONFIG); \
  -	fi
 --##	@echo "Adding fam to rpc..."
 ++#	    $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \
 ++#	    exec $(LDCONFIG); \
 ++#	fi
 + ##	@echo "Adding fam to rpc..."
  -	-@$(EDITCONF) rpc add 391002 "sgi_fam		391002"
 --##	@echo "Adding fam to inetd.conf..."
 ++#	-@$(EDITCONF) rpc add 391002 "sgi_fam		391002"
 + ##	@echo "Adding fam to inetd.conf..."
  -	-@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
  -	    "#  fam, the File Alteration Monitor, http://oss.sgi.com/projects/fam/" \
  -	    "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
  -	@echo "Restarting inetd..."
  -	-@killall -HUP inetd
 --
 --#  We don't remove $(libdir) from ld.so.conf here because we don't have
 --#  a way to tell whether we're the ones who added it, and other things
 --#  probably use it as well.
 ++#	-@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
 ++#	    "#  fam, the File Alteration Monitor, http://oss.sgi.com/projects/fam/" \
 ++#	    "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
 ++#	@echo "Restarting inetd..."
 ++#	-@killall -HUP inetd
 + 
 + #  We don't remove $(libdir) from ld.so.conf here because we don't have
 + #  a way to tell whether we're the ones who added it, and other things
 + #  probably use it as well.
  -uninstall-local:
 --##	@echo "Removing fam from rpc..."
 ++#uninstall-local:
 + ##	@echo "Removing fam from rpc..."
  -	-@$(EDITCONF) rpc remove 391002
 --##	@echo "Removing fam from inetd.conf..."
 ++#	-@$(EDITCONF) rpc remove 391002
 + ##	@echo "Removing fam from inetd.conf..."
  -	-@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
  -	@echo "Restarting inetd..."
  -	-@killall -HUP inetd
 ++#	-@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
 ++#	@echo "Restarting inetd..."
 ++#	-@killall -HUP inetd
 Index: files/patch-acconfig.h
 ===================================================================
 RCS file: files/patch-acconfig.h
 diff -N files/patch-acconfig.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-acconfig.h	16 Dec 2001 00:33:17 -0000
 @@ -0,0 +1,14 @@
 +
 +$FreeBSD$
 +
 +--- acconfig.h.orig	Mon Oct 22 01:33:09 2001
 ++++ acconfig.h	Fri Nov 23 09:54:00 2001
 +@@ -47,6 +47,8 @@
 + **  Otherwise, we'll use MNTTYPE_NFS.  */
 + #undef HAVE_FSID_NFS2
 + 
 ++#undef HAVE_MNTENT_H
 ++
 + /* Define if we have MNTTYPE_NFS2 */
 + #define HAVE_MNTTYPE_NFS2 0
 + 
 Index: files/patch-common.am
 ===================================================================
 RCS file: files/patch-common.am
 diff -N files/patch-common.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-common.am	16 Dec 2001 00:33:29 -0000
 @@ -0,0 +1,20 @@
 +
 +$FreeBSD$
 +
 +--- common.am.orig	Mon Oct 22 01:33:09 2001
 ++++ common.am	Fri Dec 14 17:44:24 2001
 +@@ -1,7 +1,7 @@
 + #  Since we're not always using gcc, we don't want to use dependency
 + #  tracking.  (It croaks non-GNU compilers.)  Seems like this should be
 + #  configurable through autoconf!
 +-AUTOMAKE_OPTIONS=no-dependencies
 ++#AUTOMAKE_OPTIONS=no-dependencies
 + 
 + #  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 + INCLUDES = @FAMPROTOINC@ -DCONFIG_ETC_CONFIG_PATH=\"@FAM_CONF@\"
 +@@ -10,3 +10,5 @@
 + EDITCONF = perl $(top_srcdir)/util/editconf/editconf.perl
 + 
 + uninstallscriptdir = $(pkglibdir)
 ++
 ++CLEANFILES =
 Index: files/patch-configure.in
 ===================================================================
 RCS file: files/patch-configure.in
 diff -N files/patch-configure.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-configure.in	16 Dec 2001 17:17:18 -0000
 @@ -0,0 +1,91 @@
 +
 +$FreeBSD$
 +
 +--- configure.in.orig	Sun Nov  4 23:31:30 2001
 ++++ configure.in	Sun Dec 16 11:16:25 2001
 +@@ -73,7 +73,7 @@
 + fi
 + AC_PROG_CXX
 + AC_PROG_CXXCPP
 +-AC_PROG_RANLIB
 ++dnl AC_PROG_RANLIB
 + 
 + AC_PROG_INSTALL
 + dnl I don't know why, but automake wants to use ./mkinstalldirs.
 +@@ -95,6 +95,8 @@
 + dnl AC_HEADER_SYS_WAIT
 + dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
 + 
 ++AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
 ++
 + dnl
 + dnl  See if imon is available; if so, is it IRIX or Linux?
 + dnl
 +@@ -310,10 +312,10 @@
 + dnl If we don't have MNTTYPE_NFS , we croak.
 + dnl
 + 
 +-FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 +-FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 +-FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 +-FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 ++dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 + 
 + dnl
 + dnl  Test for bindresvport() prototype.
 +@@ -516,8 +518,8 @@
 + 
 + dnl
 + dnl  This grief is for replacing XXX_FAM_CONF with $FAM_CONF
 +-dnl  in the fam(1M) man page.  (Simply putting @FAM_CONF@ in
 +-dnl  fam.1m.in puts the string "$sysconfdir/fam.conf" in the
 ++dnl  in the fam(8) man page.  (Simply putting @FAM_CONF@ in
 ++dnl  fam.8.in puts the string "$sysconfdir/fam.conf" in the
 + dnl  man page, which isn't acceptable.  Isn't there a way to make
 + dnl  autoconf handle this??)
 + dnl
 +@@ -529,7 +531,7 @@
 + [
 +     TMPFILE=configure.tmp
 +     for f in $CONFIG_FILES; do
 +-        if test `basename $f` != 'fam.1m'; then
 ++        if test `basename $f` != 'fam.8'; then
 +             continue
 +         fi
 +         echo "replacing XXX_FAM_CONF with $FAM_CONF and removing maintainer comments in $f"
 +@@ -554,25 +556,25 @@
 + dnl
 + AC_OUTPUT(
 +     Makefile 
 +-    build/Makefile
 +-    build/rpm/Makefile
 +-    build/rpm/rpm.spec
 ++dnl    build/Makefile
 ++dnl    build/rpm/Makefile
 ++dnl    build/rpm/rpm.spec
 +     fam/Makefile
 +     fam/fam.conf
 +     include/Makefile
 +     libfam/Makefile
 +     man/Makefile
 +-    man/fam.1m
 ++    man/fam.8
 +     support/Makefile
 +     test/Makefile
 +-    util/Makefile
 +-    util/editconf/Makefile
 ++dnl    util/Makefile
 ++dnl    util/editconf/Makefile
 + )
 + 
 + dnl 
 + dnl  fam is a good deal less interesting without imon.
 + dnl 
 +-if test "$have_imon" != 'yes'; then
 ++if test `uname` = Linux && "$have_imon" != 'yes'; then
 +     cat << EOF
 + 
 +   ******************************************************************
 Index: files/patch-fam::Client.h
 ===================================================================
 RCS file: files/patch-fam::Client.h
 diff -N files/patch-fam::Client.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Client.h	16 Dec 2001 00:34:15 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- fam/Client.h.orig	Fri May 19 23:46:31 2000
 ++++ fam/Client.h	Sun Oct  7 15:22:17 2001
 +@@ -23,6 +23,7 @@
 + #ifndef Client_included
 + #define Client_included
 + 
 ++#include <sys/types.h>
 + #include <netinet/in.h>  // for in_addr
 + 
 + #include "Activity.h"
 Index: files/patch-fam::Directory.c++
 ===================================================================
 RCS file: files/patch-fam::Directory.c++
 diff -N files/patch-fam::Directory.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Directory.c++	17 Dec 2001 00:08:54 -0000
 @@ -0,0 +1,16 @@
 +
 +$FreeBSD$
 +
 +--- fam/Directory.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Directory.c++	Sun Dec 16 18:06:34 2001
 +@@ -26,7 +26,9 @@
 + #include <errno.h>
 + #include <string.h>
 + #include <stdio.h>
 +-#include <sys/dir.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/dir.h>
 ++#endif
 + #include <sys/stat.h>
 + #include <sys/wait.h>
 + #include <unistd.h>
 Index: files/patch-fam::DirectoryScanner.h
 ===================================================================
 RCS file: files/patch-fam::DirectoryScanner.h
 diff -N files/patch-fam::DirectoryScanner.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::DirectoryScanner.h	17 Dec 2001 00:09:02 -0000
 @@ -0,0 +1,19 @@
 +
 +$FreeBSD$
 +
 +--- fam/DirectoryScanner.h.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/DirectoryScanner.h	Sun Dec 16 18:07:45 2001
 +@@ -27,7 +27,12 @@
 + 
 + #include <stddef.h>
 + #include <sys/types.h>
 +-#include <sys/dir.h>
 ++#if defined(__FreeBSD__)
 ++#  include <dirent.h>
 ++#  define direct dirent
 ++#else
 ++#  include <sys/dir.h>
 ++#endif
 + 
 + #include "Event.h"
 + 
 Index: files/patch-fam::FileSystem.c++
 ===================================================================
 RCS file: files/patch-fam::FileSystem.c++
 diff -N files/patch-fam::FileSystem.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::FileSystem.c++	16 Dec 2001 00:34:31 -0000
 @@ -0,0 +1,14 @@
 +
 +$FreeBSD$
 +
 +--- fam/FileSystem.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/FileSystem.c++	Sun Oct  7 15:22:17 2001
 +@@ -22,7 +22,7 @@
 + 
 + #include "FileSystem.h"
 + 
 +-#include <mntent.h>
 ++#include "mntent.h"
 + #include <string.h>
 + 
 + #include "Event.h"
 Index: files/patch-fam::FileSystemTable.c++
 ===================================================================
 RCS file: files/patch-fam::FileSystemTable.c++
 diff -N files/patch-fam::FileSystemTable.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::FileSystemTable.c++	16 Dec 2001 00:34:49 -0000
 @@ -0,0 +1,28 @@
 +
 +$FreeBSD$
 +
 +--- fam/FileSystemTable.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/FileSystemTable.c++	Sun Oct  7 15:22:17 2001
 +@@ -21,9 +21,10 @@
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 + 
 + #include <stddef.h>
 ++#include <stdio.h>
 + #include "FileSystemTable.h"
 + 
 +-#include <mntent.h>
 ++#include "mntent.h"
 + #include <stdlib.h>
 + #include <string.h>
 + 
 +@@ -255,7 +256,10 @@
 +     //  create_fs_by_name initializes our "root" member variable.
 +     if (!fs_by_name)
 +     {   create_fs_by_name();
 ++#if !defined(__FreeBSD__)
 ++	/* there is no mtab "file" in freebsd! */
 + 	mtab_watcher = new InternalClient(mtab_name, mtab_event_handler, NULL);
 ++#endif
 +     }
 + 
 +     cr.become_user();
 Index: files/patch-fam::IMon.c++
 ===================================================================
 RCS file: files/patch-fam::IMon.c++
 diff -N files/patch-fam::IMon.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::IMon.c++	16 Dec 2001 00:35:04 -0000
 @@ -0,0 +1,16 @@
 +
 +$FreeBSD$
 +
 +--- fam/IMon.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/IMon.c++	Sun Oct  7 15:22:17 2001
 +@@ -34,7 +34,9 @@
 + #endif
 + #endif
 + 
 +-#include <sys/sysmacros.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/sysmacros.h>
 ++#endif
 + #include <unistd.h>
 + 
 + #include "Interest.h"
 Index: files/patch-fam::Interest.c++
 ===================================================================
 RCS file: files/patch-fam::Interest.c++
 diff -N files/patch-fam::Interest.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Interest.c++	16 Dec 2001 00:36:07 -0000
 @@ -0,0 +1,35 @@
 +
 +$FreeBSD$
 +
 +--- fam/Interest.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Interest.c++	Fri Dec 14 17:40:52 2001
 +@@ -25,7 +25,9 @@
 + #include <string.h>
 + #include <errno.h>
 + #include <sys/param.h>
 +-#include <sys/sysmacros.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/sysmacros.h>
 ++#endif
 + 
 + #ifdef HAVE_IRIX_XTAB_VERIFICATION
 + #include <stdio.h>
 +@@ -186,11 +188,16 @@
 +     bool stat_changed = (old_stat.st_ctim.tv_sec != status.st_ctim.tv_sec) ||
 +                         (old_stat.st_ctim.tv_nsec != status.st_ctim.tv_nsec) ||
 +                         (old_stat.st_mtim.tv_sec != status.st_mtim.tv_sec) ||
 +-                        (old_stat.st_mtim.tv_nsec != status.st_mtim.tv_nsec);
 ++                        (old_stat.st_mtim.tv_nsec != status.st_mtim.tv_nsec) ||
 + #else
 +     bool stat_changed = (old_stat.st_ctime != status.st_ctime) ||
 +-                        (old_stat.st_mtime != status.st_mtime);
 ++                        (old_stat.st_mtime != status.st_mtime) ||
 + #endif
 ++                        (old_stat.st_mode != status.st_mode) ||
 ++                        (old_stat.st_uid != status.st_uid) ||
 ++                        (old_stat.st_gid != status.st_gid) ||
 ++                        (old_stat.st_size != status.st_size) ||
 ++                        (old_stat.st_ino != status.st_ino);
 +     old_stat = status;
 + 
 +     //  If dev/ino changed, move this interest to the right hash chain.
 Index: files/patch-fam::InternalClient.c++
 ===================================================================
 RCS file: files/patch-fam::InternalClient.c++
 diff -N files/patch-fam::InternalClient.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::InternalClient.c++	16 Dec 2001 00:36:27 -0000
 @@ -0,0 +1,15 @@
 +
 +$FreeBSD$
 +
 +--- fam/InternalClient.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/InternalClient.c++	Sun Oct  7 15:22:17 2001
 +@@ -35,8 +35,8 @@
 + {
 +     assert(filename);
 +     assert(h);
 +-    assert(filename[0] == '/');
 +     Log::debug("%s watching %s", name(), filename);
 ++    assert(filename[0] == '/');
 +     interest = new File(filename, this, Request(0), Cred::SuperUser);
 + }
 + 
 Index: files/patch-fam::Listener.c++
 ===================================================================
 RCS file: files/patch-fam::Listener.c++
 diff -N files/patch-fam::Listener.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Listener.c++	16 Dec 2001 00:36:40 -0000
 @@ -0,0 +1,59 @@
 +
 +$FreeBSD$
 +
 +--- fam/Listener.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Listener.c++	Fri Nov 23 09:52:14 2001
 +@@ -22,6 +22,8 @@
 + 
 + #include "Listener.h"
 + 
 ++#include <stdio.h>
 ++#include <stdlib.h>
 + #include <assert.h>
 + #include <fcntl.h>
 + #include <sys/types.h>
 +@@ -205,7 +207,11 @@
 +     unsetenv("TMPDIR");
 + 
 +     char *tmpfile = tempnam("/tmp", ".fam");
 ++#if defined(__FreeBSD__)
 ++    sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 ++#else
 +     sockaddr_un sun = { AF_UNIX, "" };
 ++#endif
 +     if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1))
 +     {
 +         Log::error("tmpnam() too long for sun_path (%d >= %d)!",
 +@@ -239,7 +245,7 @@
 +         return;
 +     }
 + 
 +-    if (chown(sun.sun_path, uid, -1) != 0)
 ++    if (chown(sun.sun_path, uid, (gid_t)-1) != 0)
 +     {   Log::perror("localclient chown");
 + 	close(client_sock);
 +         return;
 +@@ -275,7 +281,11 @@
 + 
 +     // Get the new socket.
 + 
 ++#if defined(__FreeBSD__)
 ++    struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 ++#else
 +     struct sockaddr_un sun = { AF_UNIX, "" };
 ++#endif
 +     CONFIG_SOCKLEN_T sunlen = sizeof(sun);
 +     int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen);
 +     if (client_fd < 0)
 +@@ -337,7 +347,11 @@
 + void
 + Listener::dirty_ugly_hack()
 + {
 ++#if defined(__FreeBSD__)
 ++    static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" };
 ++#else
 +     static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" };
 ++#endif
 + 
 +     int sock = socket(PF_UNIX, SOCK_STREAM, 0);
 +     if (sock < 0)
 Index: files/patch-fam::Log.c++
 ===================================================================
 RCS file: files/patch-fam::Log.c++
 diff -N files/patch-fam::Log.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Log.c++	16 Dec 2001 00:36:53 -0000
 @@ -0,0 +1,14 @@
 +
 +$FreeBSD$
 +
 +--- fam/Log.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/Log.c++	Sun Oct  7 15:22:17 2001
 +@@ -28,6 +28,8 @@
 + #include <stdlib.h>
 + #include <string.h>
 + #include <syslog.h>
 ++#include <sys/time.h>
 ++#include <sys/types.h>
 + #include <sys/resource.h>
 + #include <sys/stat.h>
 + #include <unistd.h>
 Index: files/patch-fam::Makefile.am
 ===================================================================
 RCS file: files/patch-fam::Makefile.am
 diff -N files/patch-fam::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Makefile.am	16 Dec 2001 00:37:05 -0000
 @@ -0,0 +1,29 @@
 +
 +$FreeBSD$
 +
 +--- fam/Makefile.am.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Makefile.am	Sat Dec 15 18:13:35 2001
 +@@ -1,7 +1,7 @@
 + include $(top_srcdir)/common.am
 + 
 +-bin_PROGRAMS = fam
 +-sysconf_DATA = fam.conf
 ++sbin_PROGRAMS = fam
 ++sysconf_DATA = fam.conf.sample
 + 
 + fam_SOURCES = \
 +   Activity.c++ \
 +@@ -72,6 +72,7 @@
 +   main.c++ \
 +   timeval.c++ \
 +   timeval.h \
 ++  mntent_compat.c++ \
 +   @IMON_FUNCS@.c++
 + 
 + EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
 +@@ -79,4 +80,4 @@
 + fam_LDADD = -lrpcsvc $(top_srcdir)/support/libsupport.a
 + 
 + CLEANFILES += @MKDEPFILE@ ii_files/*.ii
 +-sinclude @MKDEPFILE@
 ++#sinclude @MKDEPFILE@
 Index: files/patch-fam::NetConnection.c++
 ===================================================================
 RCS file: files/patch-fam::NetConnection.c++
 diff -N files/patch-fam::NetConnection.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::NetConnection.c++	16 Dec 2001 00:37:17 -0000
 @@ -0,0 +1,26 @@
 +
 +$FreeBSD$
 +
 +--- fam/NetConnection.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/NetConnection.c++	Fri Dec 14 17:41:01 2001
 +@@ -252,7 +252,19 @@
 +                 assert(ret == omsgList->len);
 +             } else 
 +             {
 +-                Log::error("fd %d write error: %m", fd);
 ++		/* Since the client library can close it's fd before
 ++		 * getting acks from all FAMCancelMonitor requests we
 ++		 * may get a broken pipe error here when writing the ack.
 ++		 * Don't threat this as an error, since that fills the logs
 ++		 * with crap.
 ++		 */
 ++		if (errno == EPIPE)
 ++		{
 ++		    Log::debug("fd %d write error: %m", fd);
 ++		} else
 ++		{
 ++		    Log::error("fd %d write error: %m", fd);
 ++		}
 +                 
 +             }
 +             msgList_t *oldHead = omsgList;
 Index: files/patch-fam::Scheduler.c++
 ===================================================================
 RCS file: files/patch-fam::Scheduler.c++
 diff -N files/patch-fam::Scheduler.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Scheduler.c++	17 Dec 2001 05:00:33 -0000
 @@ -0,0 +1,22 @@
 +
 +$FreeBSD$
 +
 +--- fam/Scheduler.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Scheduler.c++	Sun Dec 16 22:09:59 2001
 +@@ -26,6 +26,7 @@
 + #include <string.h>
 + #include <errno.h>
 + #include <unistd.h>
 ++#include <cstdlib>
 + #include <sys/param.h>
 + 
 + #include "Log.h"
 +@@ -332,7 +333,7 @@
 + 
 +     if (status == -1 && errno != EINTR)
 +     {   Log::perror("select");		// Oh, no!
 +-	::exit(1);
 ++	std::exit(1);
 +     }
 +     if (status > 0)
 +     {
 Index: files/patch-fam::Scheduler.h
 ===================================================================
 RCS file: files/patch-fam::Scheduler.h
 diff -N files/patch-fam::Scheduler.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Scheduler.h	16 Dec 2001 00:37:41 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- fam/Scheduler.h.orig	Fri May 19 23:46:32 2000
 ++++ fam/Scheduler.h	Sun Oct  7 15:22:17 2001
 +@@ -24,6 +24,7 @@
 + #define Scheduler_included
 + 
 + #include <sys/time.h>
 ++#include <string.h>
 + 
 + #include "Boolean.h"
 + 
 Index: files/patch-fam::StringTable.h
 ===================================================================
 RCS file: files/patch-fam::StringTable.h
 diff -N files/patch-fam::StringTable.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::StringTable.h	16 Dec 2001 00:37:55 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- fam/StringTable.h.orig	Fri May 19 23:46:32 2000
 ++++ fam/StringTable.h	Sun Oct  7 15:22:17 2001
 +@@ -25,6 +25,7 @@
 + 
 + #include <assert.h>
 + #include <string.h>
 ++#include "mntent.h"
 + 
 + //  A StringTable maps C strings onto values.  It is a cheap O(n)
 + //  implementation, suitable only for small tables that are
 Index: files/patch-fam::fam.conf.in
 ===================================================================
 RCS file: files/patch-fam::fam.conf.in
 diff -N files/patch-fam::fam.conf.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::fam.conf.in	17 Dec 2001 03:39:54 -0000
 @@ -0,0 +1,33 @@
 +
 +$FreeBSD$
 +
 +--- fam/fam.conf.in.orig	Mon Oct 22 01:33:11 2001
 ++++ fam/fam.conf.in	Sun Dec 16 21:37:47 2001
 +@@ -6,7 +6,7 @@
 + #  fam.conf
 + #
 + #  For more information on the configuration options below, see the
 +-#  fam(1M) man page.
 ++#  fam(8) man page.
 + 
 + #
 + #  insecure_compatibility disables authentication.  This causes
 +@@ -38,6 +38,18 @@
 + #  exported to the hosts.
 + #
 + xtab_verification = true
 ++
 ++#
 ++#  idle_timeout sets the number of seconds fam will wait for new
 ++#  connections before quitting.  A value of zero will cause fam to
 ++#  wait indefinitely.  This will be overridden by the command-line option
 ++#  -T.  The default is 5
 ++idle_timeout = 5
 ++
 ++#
 ++#  Set the interval for polling files to nfs_polling_interval seconds.
 ++#  The default is 6 seconds.  Overridden by -t.
 ++nfs_polling_interval = 6
 + 
 + ##  This is removed because the HAVE_MAC and HAVE_AUDIT stuff is not done.
 + ###
 Index: files/patch-fam::main.c++
 ===================================================================
 RCS file: files/patch-fam::main.c++
 diff -N files/patch-fam::main.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::main.c++	17 Dec 2001 03:40:03 -0000
 @@ -0,0 +1,64 @@
 +
 +$FreeBSD$
 +
 +--- fam/main.c++.orig	Mon Oct 22 01:33:11 2001
 ++++ fam/main.c++	Sun Dec 16 21:37:47 2001
 +@@ -64,6 +64,8 @@
 + #define CFG_LOCAL_ONLY "local_only"
 + #define CFG_XTAB_VERIFICATION "xtab_verification"
 + #define CFG_UNTRUSTED_USER "untrusted_user"
 ++#define CFG_IDLE_TIMEOUT "idle_timeout"
 ++#define CFG_NFS_POLLING_INTERVAL "nfs_polling_interval"
 + static void parse_config(config_opts &opts);
 + static void parse_config_line(config_opts &opts, int line,
 +                               const char *k, const char *v);
 +@@ -88,7 +90,7 @@
 +     fprintf(stderr, "\t-d\t\tdebug\n");
 +     fprintf(stderr, "\t-v\t\tverbose\n");
 +     fprintf(stderr, "\t-l\t\tno polling\n");
 +-    fprintf(stderr, "\t-t seconds\tset polling interval (default 3 sec)\n");
 ++    fprintf(stderr, "\t-t seconds\tset polling interval (default 6 sec)\n");
 +     fprintf(stderr, "\t-T seconds\tset inactive timeout (default 5 sec)\n");
 +     fprintf(stderr, "\t-p prog.vers\tset RPC program number and version\n");
 +     fprintf(stderr, "\t-L\t\tlocal only (ignore remote requests)\n");
 +@@ -339,6 +341,9 @@
 + static void
 + parse_config_line(config_opts &opts, int lineno, const char *key, const char *val)
 + {
 ++    char* p;
 ++    int secs;
 ++
 +     if(!strcmp(key, CFG_UNTRUSTED_USER))
 +     {
 +         if (!opts.untrusted_user) opts.untrusted_user = strdup(val);
 +@@ -359,6 +364,30 @@
 +                        CFG_INSECURE_COMPAT " is set",
 +                        opts.config_file, lineno, key);
 +         }
 ++    }
 ++    else if(!strcmp(key, CFG_IDLE_TIMEOUT))
 ++    {
 ++        secs = strtoul(val, &p, 10);
 ++        if (*p)
 ++	{  
 ++  	    Log::error("config file %s line %d: value for %s " 
 ++		       "must be an integer.  Ignoring.",
 ++		       opts.config_file, lineno, key);
 ++	}
 ++	else 
 ++	{
 ++	    opts.activity_timeout = secs;
 ++	}
 ++    }
 ++    else if(!strcmp(key, CFG_NFS_POLLING_INTERVAL))
 ++    {
 ++        secs = strtoul(val, &p, 10);
 ++        if (*p || secs == 0)
 ++  	    Log::error("config file %s line %d: value for %s " 
 ++		       "must be a non-zero integer.  Ignoring.",
 ++		       opts.config_file, lineno, key);
 ++	else
 ++	    opts.pollster_interval = secs;
 +     }
 +     else if(!strcmp(key, CFG_INSECURE_COMPAT))
 +     {
 Index: files/patch-fam::mntent.h
 ===================================================================
 RCS file: files/patch-fam::mntent.h
 diff -N files/patch-fam::mntent.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::mntent.h	16 Dec 2001 00:38:24 -0000
 @@ -0,0 +1,62 @@
 +
 +$FreeBSD$
 +
 +--- fam/mntent.h.orig	Sun Oct  7 15:22:17 2001
 ++++ fam/mntent.h	Sun Oct  7 15:22:17 2001
 +@@ -0,0 +1,56 @@
 ++/*
 ++ *  mntent
 ++ *  mntent.h - compatability header for FreeBSD
 ++ *
 ++ *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
 ++ *  All rights reserved.
 ++ *
 ++ * 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.
 ++ *
 ++ * 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.
 ++ */
 ++
 ++#if defined(HAVE_MNTENT_H)
 ++#include <mntent.h>
 ++#else
 ++#ifndef _MNTENT_H
 ++#define _MNTENT_H
 ++#include <stdio.h>
 ++
 ++#define MOUNTED "dummy"
 ++
 ++#define MNTTYPE_NFS "nfs"
 ++
 ++struct mntent {
 ++	char *mnt_fsname;
 ++	char *mnt_dir;
 ++	char *mnt_type;
 ++	char *mnt_opts;
 ++	int mnt_freq;
 ++	int mnt_passno;
 ++};
 ++
 ++#define setmntent(x,y) ((FILE *)0x1)
 ++struct mntent *getmntent __P ((FILE *fp));
 ++char *hasmntopt __P ((const struct mntent *mnt, const char *option));
 ++#define endmntent(x) ((int)1)
 ++
 ++#endif /* _MNTENT_H */
 ++#endif /* HAVE_MNTENT_H */
 Index: files/patch-fam::mntent_compat.c++
 ===================================================================
 RCS file: files/patch-fam::mntent_compat.c++
 diff -N files/patch-fam::mntent_compat.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::mntent_compat.c++	16 Dec 2001 00:38:39 -0000
 @@ -0,0 +1,157 @@
 +
 +$FreeBSD$
 +
 +--- fam/mntent_compat.c++.orig	Sun Oct  7 15:22:17 2001
 ++++ fam/mntent_compat.c++	Sun Oct  7 15:22:17 2001
 +@@ -0,0 +1,151 @@
 ++/*
 ++ * Copyright (c) 1980, 1989, 1993, 1994
 ++ *      The Regents of the University of California.  All rights reserved.
 ++ * Copyright (c) 2001
 ++ *      David Rufino <daverufino@btinternet.com>
 ++ *
 ++ * 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 <stdlib.h>
 ++#include <string.h>
 ++#include <sys/param.h>
 ++#include <sys/ucred.h>
 ++#include <sys/mount.h>
 ++
 ++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");
 ++        if (flags & MNT_NOCLUSTERR)     res = catopt(res, "noclusterr");
 ++        if (flags & MNT_NOCLUSTERW)     res = catopt(res, "noclusterw");
 ++        if (flags & MNT_NOSYMFOLLOW)    res = catopt(res, "nosymfollow");
 ++        if (flags & MNT_SUIDDIR)        res = catopt(res, "suiddir");
 ++
 ++        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 */
 Index: files/patch-freebsd
 ===================================================================
 RCS file: files/patch-freebsd
 diff -N files/patch-freebsd
 --- files/patch-freebsd	31 Mar 2001 02:45:55 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,490 +0,0 @@
 -diff -urN fam-oss-2.6.4/config.h.in fam-oss-2.6.4-freebsd/config.h.in
 ---- fam-oss-2.6.4/config.h.in	Sat May 20 05:50:17 2000
 -+++ fam-oss-2.6.4-freebsd/config.h.in	Sun Mar 18 00:02:38 2001
 -@@ -12,6 +12,8 @@
 - /*  Define if the system has imon and IMONIOC_ ioctl flags.  */
 - #undef HAVE_IMON
 - 
 -+#undef HAVE_MNTENT_H
 -+
 - /*  Define if the system has the struct revokdi and the IMONIOC_REVOKDI
 - **  ioctl flag.  (IRIX 5.3 doesn't.)
 - */
 -diff -urN fam-oss-2.6.4/configure.in fam-oss-2.6.4-freebsd/configure.in
 ---- fam-oss-2.6.4/configure.in	Sat May 20 06:23:17 2000
 -+++ fam-oss-2.6.4-freebsd/configure.in	Sun Mar 18 00:36:29 2001
 -@@ -95,6 +95,8 @@
 - dnl AC_HEADER_SYS_WAIT
 - dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
 - 
 -+AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
 -+
 - dnl
 - dnl  See if imon is available; if so, is it IRIX or Linux?
 - dnl
 -@@ -299,10 +301,10 @@
 - dnl If we don't have MNTTYPE_NFS , we croak.
 - dnl
 - 
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 --FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 - 
 - dnl
 - dnl  Test for bindresvport() prototype.
 -diff -urN fam-oss-2.6.4/fam/Client.h fam-oss-2.6.4-freebsd/fam/Client.h
 ---- fam-oss-2.6.4/fam/Client.h	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Client.h	Sat Mar 17 00:14:35 2001
 -@@ -23,6 +23,7 @@
 - #ifndef Client_included
 - #define Client_included
 - 
 -+#include <sys/types.h>
 - #include <netinet/in.h>  // for in_addr
 - 
 - #include "Activity.h"
 -diff -urN fam-oss-2.6.4/fam/FileSystem.c++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++
 ---- fam-oss-2.6.4/fam/FileSystem.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++	Sat Mar 17 13:18:10 2001
 -@@ -22,7 +22,7 @@
 - 
 - #include "FileSystem.h"
 - 
 --#include <mntent.h>
 -+#include "mntent.h"
 - #include <string.h>
 - 
 - #include "Event.h"
 -diff -urN fam-oss-2.6.4/fam/FileSystemTable.c++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++
 ---- fam-oss-2.6.4/fam/FileSystemTable.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++	Sat Mar 17 23:44:17 2001
 -@@ -21,9 +21,10 @@
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 - 
 - #include <stddef.h>
 -+#include <stdio.h>
 - #include "FileSystemTable.h"
 - 
 --#include <mntent.h>
 -+#include "mntent.h"
 - #include <stdlib.h>
 - #include <string.h>
 - 
 -@@ -255,7 +256,10 @@
 -     //  create_fs_by_name initializes our "root" member variable.
 -     if (!fs_by_name)
 -     {   create_fs_by_name();
 -+#if !defined(__FreeBSD__)
 -+	/* there is no mtab "file" in freebsd! */
 - 	mtab_watcher = new InternalClient(mtab_name, mtab_event_handler, NULL);
 -+#endif
 -     }
 - 
 -     cr.become_user();
 -diff -urN fam-oss-2.6.4/fam/IMon.c++ fam-oss-2.6.4-freebsd/fam/IMon.c++
 ---- fam-oss-2.6.4/fam/IMon.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/IMon.c++	Sat Mar 17 14:06:17 2001
 -@@ -34,7 +34,9 @@
 - #endif
 - #endif
 - 
 --#include <sys/sysmacros.h>
 -+#if !defined(__FreeBSD__)
 -+#  include <sys/sysmacros.h>
 -+#endif
 - #include <unistd.h>
 - 
 - #include "Interest.h"
 -diff -urN fam-oss-2.6.4/fam/Interest.c++ fam-oss-2.6.4-freebsd/fam/Interest.c++
 ---- fam-oss-2.6.4/fam/Interest.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Interest.c++	Sat Mar 17 14:06:37 2001
 -@@ -25,7 +25,9 @@
 - #include <string.h>
 - #include <errno.h>
 - #include <sys/param.h>
 --#include <sys/sysmacros.h>
 -+#if !defined(__FreeBSD__)
 -+#  include <sys/sysmacros.h>
 -+#endif
 - 
 - #ifdef HAVE_IRIX_XTAB_VERIFICATION
 - #include <stdio.h>
 -diff -urN fam-oss-2.6.4/fam/InternalClient.c++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++
 ---- fam-oss-2.6.4/fam/InternalClient.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++	Sat Mar 17 23:20:15 2001
 -@@ -35,8 +35,8 @@
 - {
 -     assert(filename);
 -     assert(h);
 --    assert(filename[0] == '/');
 -     Log::debug("%s watching %s", name(), filename);
 -+    assert(filename[0] == '/');
 -     interest = new File(filename, this, Request(0), Cred::SuperUser);
 - }
 - 
 -diff -urN fam-oss-2.6.4/fam/Listener.c++ fam-oss-2.6.4-freebsd/fam/Listener.c++
 ---- fam-oss-2.6.4/fam/Listener.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Listener.c++	Sat Mar 17 14:12:57 2001
 -@@ -22,6 +22,8 @@
 - 
 - #include "Listener.h"
 - 
 -+#include <stdio.h>
 -+#include <stdlib.h>
 - #include <assert.h>
 - #include <fcntl.h>
 - #include <sys/types.h>
 -@@ -202,7 +204,11 @@
 -     //  requested user and pass the name back to the client.
 - 
 -     char *tmpfile = tempnam("/tmp", ".fam");
 -+#if defined(__FreeBSD__)
 -+    sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 -+#else
 -     sockaddr_un sun = { AF_UNIX, "" };
 -+#endif
 -     if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1))
 -     {
 -         Log::error("tmpnam() too long for sun_path (%d >= %d)!",
 -@@ -235,7 +241,7 @@
 -         return;
 -     }
 - 
 --    if (chown(sun.sun_path, uid, -1) != 0)
 -+    if (chown(sun.sun_path, uid, (gid_t)-1) != 0)
 -     {   Log::perror("localclient chown");
 - 	close(client_sock);
 -         return;
 -@@ -271,7 +277,11 @@
 - 
 -     // Get the new socket.
 - 
 -+#if defined(__FreeBSD__)
 -+    struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
 -+#else
 -     struct sockaddr_un sun = { AF_UNIX, "" };
 -+#endif
 -     CONFIG_SOCKLEN_T sunlen = sizeof(sun);
 -     int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen);
 -     if (client_fd < 0)
 -@@ -333,7 +343,11 @@
 - void
 - Listener::dirty_ugly_hack()
 - {
 -+#if defined(__FreeBSD__)
 -+    static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" };
 -+#else
 -     static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" };
 -+#endif
 - 
 -     int sock = socket(PF_UNIX, SOCK_STREAM, 0);
 -     if (sock < 0)
 -diff -urN fam-oss-2.6.4/fam/Log.c++ fam-oss-2.6.4-freebsd/fam/Log.c++
 ---- fam-oss-2.6.4/fam/Log.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Log.c++	Sat Mar 17 14:14:31 2001
 -@@ -28,6 +28,8 @@
 - #include <stdlib.h>
 - #include <string.h>
 - #include <syslog.h>
 -+#include <sys/time.h>
 -+#include <sys/types.h>
 - #include <sys/resource.h>
 - #include <sys/stat.h>
 - #include <unistd.h>
 -diff -urN fam-oss-2.6.4/fam/Makefile.am fam-oss-2.6.4-freebsd/fam/Makefile.am
 ---- fam-oss-2.6.4/fam/Makefile.am	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Makefile.am	Sat Mar 17 18:12:17 2001
 -@@ -72,6 +72,7 @@
 -   main.c++ \
 -   timeval.c++ \
 -   timeval.h \
 -+  mntent_compat.c++ \
 -   @IMON_FUNCS@.c++
 - 
 - EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
 -diff -urN fam-oss-2.6.4/fam/Scheduler.h fam-oss-2.6.4-freebsd/fam/Scheduler.h
 ---- fam-oss-2.6.4/fam/Scheduler.h	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Scheduler.h	Sat Mar 17 00:14:04 2001
 -@@ -24,6 +24,7 @@
 - #define Scheduler_included
 - 
 - #include <sys/time.h>
 -+#include <string.h>
 - 
 - #include "Boolean.h"
 - 
 -diff -urN fam-oss-2.6.4/fam/StringTable.h fam-oss-2.6.4-freebsd/fam/StringTable.h
 ---- fam-oss-2.6.4/fam/StringTable.h	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/fam/StringTable.h	Sat Mar 17 18:05:38 2001
 -@@ -25,6 +25,7 @@
 - 
 - #include <assert.h>
 - #include <string.h>
 -+#include "mntent.h"
 - 
 - //  A StringTable maps C strings onto values.  It is a cheap O(n)
 - //  implementation, suitable only for small tables that are
 -diff -urN fam-oss-2.6.4/fam/mntent.h fam-oss-2.6.4-freebsd/fam/mntent.h
 ---- fam-oss-2.6.4/fam/mntent.h	Thu Jan  1 01:00:00 1970
 -+++ fam-oss-2.6.4-freebsd/fam/mntent.h	Sat Mar 17 18:11:08 2001
 -@@ -0,0 +1,56 @@
 -+/*
 -+ *  mntent
 -+ *  mntent.h - compatability header for FreeBSD
 -+ *
 -+ *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
 -+ *  All rights reserved.
 -+ *
 -+ * 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.
 -+ *
 -+ * 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.
 -+ */
 -+
 -+#if defined(HAVE_MNTENT_H)
 -+#include <mntent.h>
 -+#else
 -+#ifndef _MNTENT_H
 -+#define _MNTENT_H
 -+#include <stdio.h>
 -+
 -+#define MOUNTED "dummy"
 -+
 -+#define MNTTYPE_NFS "nfs"
 -+
 -+struct mntent {
 -+	char *mnt_fsname;
 -+	char *mnt_dir;
 -+	char *mnt_type;
 -+	char *mnt_opts;
 -+	int mnt_freq;
 -+	int mnt_passno;
 -+};
 -+
 -+#define setmntent(x,y) ((FILE *)0x1)
 -+struct mntent *getmntent __P ((FILE *fp));
 -+char *hasmntopt __P ((const struct mntent *mnt, const char *option));
 -+#define endmntent(x) ((int)1)
 -+
 -+#endif /* _MNTENT_H */
 -+#endif /* HAVE_MNTENT_H */
 -diff -urN fam-oss-2.6.4/fam/mntent_compat.c++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++
 ---- fam-oss-2.6.4/fam/mntent_compat.c++	Thu Jan  1 01:00:00 1970
 -+++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++	Sat Mar 17 23:48:07 2001
 -@@ -0,0 +1,151 @@
 -+/*
 -+ * Copyright (c) 1980, 1989, 1993, 1994
 -+ *      The Regents of the University of California.  All rights reserved.
 -+ * Copyright (c) 2001
 -+ *      David Rufino <daverufino@btinternet.com>
 -+ *
 -+ * 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 <stdlib.h>
 -+#include <string.h>
 -+#include <sys/param.h>
 -+#include <sys/ucred.h>
 -+#include <sys/mount.h>
 -+
 -+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");
 -+        if (flags & MNT_NOCLUSTERR)     res = catopt(res, "noclusterr");
 -+        if (flags & MNT_NOCLUSTERW)     res = catopt(res, "noclusterw");
 -+        if (flags & MNT_NOSYMFOLLOW)    res = catopt(res, "nosymfollow");
 -+        if (flags & MNT_SUIDDIR)        res = catopt(res, "suiddir");
 -+
 -+        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 */
 -diff -urN fam-oss-2.6.4/libfam/Client.c++ fam-oss-2.6.4-freebsd/libfam/Client.c++
 ---- fam-oss-2.6.4/libfam/Client.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/libfam/Client.c++	Sat Mar 17 00:12:01 2001
 -@@ -20,6 +20,7 @@
 - //  with this program; if not, write the Free Software Foundation, Inc., 59
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 - 
 -+#include <stdio.h>
 - #include <stdlib.h>
 - #include <unistd.h>
 - #include <netinet/in.h>
 -diff -urN fam-oss-2.6.4/libfam/fam.c++ fam-oss-2.6.4-freebsd/libfam/fam.c++
 ---- fam-oss-2.6.4/libfam/fam.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/libfam/fam.c++	Sat Mar 17 00:12:43 2001
 -@@ -21,6 +21,7 @@
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 - 
 - #include <sys/types.h>
 -+#include <rpc/rpc.h>
 - #include <sys/time.h>
 - #include <unistd.h>
 - #include <stdlib.h>
 -diff -urN fam-oss-2.6.4/test/test.c++ fam-oss-2.6.4-freebsd/test/test.c++
 ---- fam-oss-2.6.4/test/test.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/test/test.c++	Sat Mar 17 18:39:23 2001
 -@@ -1,6 +1,7 @@
 - #include <sys/types.h>
 - #include <sys/time.h>
 - #include <stdio.h>
 -+#include <string.h>
 - #include <unistd.h>
 - #include <signal.h>
 - #include <errno.h>
 ---- fam-oss-2.6.4/acconfig.h	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/acconfig.h	Sun Mar 18 00:40:47 2001
 -@@ -44,6 +44,8 @@
 - **  Otherwise, we'll use MNTTYPE_NFS.  */
 - #undef HAVE_FSID_NFS2
 - 
 -+#undef HAVE_MNTENT_H
 -+
 - /* Define if we have MNTTYPE_NFS2 */
 - #define HAVE_MNTTYPE_NFS2 0
 - 
 Index: files/patch-libfam::Client.c++
 ===================================================================
 RCS file: files/patch-libfam::Client.c++
 diff -N files/patch-libfam::Client.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-libfam::Client.c++	16 Dec 2001 00:38:52 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- libfam/Client.c++.orig	Fri May 19 23:46:32 2000
 ++++ libfam/Client.c++	Sun Oct  7 15:22:17 2001
 +@@ -20,6 +20,7 @@
 + //  with this program; if not, write the Free Software Foundation, Inc., 59
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 + 
 ++#include <stdio.h>
 + #include <stdlib.h>
 + #include <unistd.h>
 + #include <netinet/in.h>
 Index: files/patch-libfam::fam.c++
 ===================================================================
 RCS file: files/patch-libfam::fam.c++
 diff -N files/patch-libfam::fam.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-libfam::fam.c++	16 Dec 2001 00:39:05 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- libfam/fam.c++.orig	Fri May 19 23:46:32 2000
 ++++ libfam/fam.c++	Sun Oct  7 15:22:17 2001
 +@@ -21,6 +21,7 @@
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 + 
 + #include <sys/types.h>
 ++#include <rpc/rpc.h>
 + #include <sys/time.h>
 + #include <unistd.h>
 + #include <stdlib.h>
 Index: files/patch-man::Makefile.am
 ===================================================================
 RCS file: files/patch-man::Makefile.am
 diff -N files/patch-man::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::Makefile.am	16 Dec 2001 00:39:22 -0000
 @@ -0,0 +1,15 @@
 +
 +$FreeBSD$
 +
 +--- man/Makefile.am.orig	Mon Oct 22 01:33:11 2001
 ++++ man/Makefile.am	Fri Nov 23 10:49:15 2001
 +@@ -1,5 +1,5 @@
 +-#  This is a little weird because fam.1m is generated from fam.1m.in
 ++#  This is a little weird because fam.8 is generated from fam.8.in
 + #  at the end of the configure script.
 +-man_MANS = fam.1m fam.3x
 +-EXTRA_DIST = fam.1m.in fam.3x
 +-CLEANFILES = fam.1m
 ++man_MANS = fam.8 fam.3
 ++EXTRA_DIST = fam.8.in fam.3
 ++CLEANFILES = fam.8
 Index: files/patch-man::fam.1m.in
 ===================================================================
 RCS file: files/patch-man::fam.1m.in
 diff -N files/patch-man::fam.1m.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::fam.1m.in	17 Dec 2001 03:40:19 -0000
 @@ -0,0 +1,106 @@
 +
 +$FreeBSD$
 +
 +--- man/fam.1m.in.orig	Mon Oct 22 01:33:11 2001
 ++++ man/fam.1m.in	Sun Dec 16 21:37:47 2001
 +@@ -1,6 +1,6 @@
 +-.\"##  fam.1m.in
 ++.\"##  fam.8.in
 + .\"##
 +-.\"##  When configure.in generates fam.1m, lines starting with .\"##
 ++.\"##  When configure.in generates fam.8, lines starting with .\"##
 + .\"##  should be removed; when building on IRIX, lines starting with
 + .\"##  .\"IRIX should have that part removed (uncommenting the rest
 + .\"##  of the line).
 +@@ -9,13 +9,13 @@
 + .\"##  separate files.
 + .\"##
 + .nr X
 +-.if \nX=0 .ds x} fam 1M "Silicon Graphics" "\&"
 ++.if \nX=0 .ds x} fam 8 "Silicon Graphics" "\&"
 + .TH \*(x}
 + .SH NAME
 + fam \- file alteration monitor
 + .SH SYNOPSIS
 + .nf
 +-\f3/usr/etc/fam\f1 [ \f3\-f\f1 | \f3\-v\f1 | \f3\-d\f1 ] [ \f3\-l\f1 | \c
 ++\f3fam\f1 [ \f3\-f\f1 | \f3\-v\f1 | \f3\-d\f1 ] [ \f3\-l\f1 | \c
 + \f3\-t\f1 \f2NFS_polling_interval\f1 ] 
 + 	[ \f3\-T\f1 \f2idle_timeout\f1 ] [ \f3\-p\f1 \c
 + \f2program\f3.\f2version\f1 ] [ \f3\-L\f1 ] [ \f3-C\f1 ]
 +@@ -24,22 +24,13 @@
 + .SH DESCRIPTION
 + \f2fam\f1 is a server that tracks changes to the filesystem and
 + relays these changes to interested applications.
 +-Applications such as
 +-\f2fm\f1(1G) and \f2mailbox\f1(1) present an up-to-date view of the filesystem.
 +-In the absence of \f2fam\f1, these applications and others like them
 +-are forced to poll the filesystem to detect changes.
 +-\f2fam\f1 is
 +-more efficient.
 +-.P
 + Applications can request \f2fam\f1 to monitor any files or directories in
 + any filesystem.
 + When \f2fam\f1 detects changes to monitored files, it notifies
 + the appropriate application.
 + The FAM API provides a programmatic interface to \f2fam\f1; see
 +-.IR fam (3X).
 ++.IR fam (3).
 + .P
 +-\f2fam\f1 is informed of filesystem changes as they happen by the
 +-kernel through the \f2imon\f1(7M) pseudo device driver.
 + If asked to
 + monitor files on an NFS mounted filesystem, \f2fam\f1 tries to use
 + \f2fam\f1 on the NFS server to monitor files.
 +@@ -47,9 +38,9 @@
 + contact a remote \f2fam\f1, it polls the files instead.
 + \f2fam\f1 also polls special files.
 + .P
 +-Normally, \f2fam\f1 is started by \f2inetd\f1(1M).
 ++Normally, \f2fam\f1 is started by \f2inetd\f1(8).
 + It is registered with
 +-\f2portmap\f1(1M) as performing the sgi_fam service.
 ++\f2%%PORTMAP%%\f1(8) as performing the sgi_fam service.
 + .SH OPTIONS
 + .TP 26
 + \f3\-l\f1
 +@@ -131,6 +122,16 @@
 + service remote requests without attempting to perform the verification.  If
 + the \f2local_only\f1 configuration option or \f3-L\f1 command-line option is
 + used, \f2xtab_verification\f1 has no effect.
 ++.TP
 ++\f3idle_timeout\f1
 ++The number of seconds to wait for a new connection before
 ++quitting.  Setting this value to \f20\f1 will make fam wait
 ++indefinitely for new connections.  Can be overridden by the \f3-T\f1
 ++option.  Defaults to 5 seconds.
 ++.TP
 ++\f3nfs_polling_interval\f1
 ++The number of seconds between polling nfs servers.  This value can be
 ++overridden by the \f3-t\f1 command-line option.  Defaults to 5 seconds.
 + .\"##
 + .\"##  This stuff is removed because the MAC and SAT stuff isn't implemented.
 + .\"##  If you put this back, add sysconf(1) to the SEE ALSO section.
 +@@ -166,8 +167,7 @@
 + \f2Note that fam never opens the files it's monitoring\f1, and cannot
 + be used by a rogue client to read the contents of any file on the system.
 + \f2fam\f1 only gives out the names of monitored files, and only monitors files
 +-which the client can
 +-.IR stat (1M).
 ++which the client can stat.
 + Users can stat a file without having read permission on it as long as
 + they have search permission on the directory containing it.
 + .\"IRIX .SH COMPATIBILITY
 +@@ -196,9 +196,7 @@
 + XXX_FAM_CONF
 + .SH "SEE ALSO"
 + .\"IRIX fm(1G),
 +-inetd(1M),
 ++fam(3),
 ++inetd(8),
 + .\"IRIX mailbox(1),
 +-portmap(1M),
 +-fam(3X),
 +-imon(7M),
 +-stat(1M).
 ++%%PORTMAP%%(8).
 Index: files/patch-man::fam.3x
 ===================================================================
 RCS file: files/patch-man::fam.3x
 diff -N files/patch-man::fam.3x
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::fam.3x	16 Dec 2001 00:39:55 -0000
 @@ -0,0 +1,41 @@
 +
 +$FreeBSD$
 +
 +--- man/fam.3x.orig	Mon Oct 22 01:33:11 2001
 ++++ man/fam.3x	Fri Nov 23 10:51:07 2001
 +@@ -1,9 +1,9 @@
 + '\"macro stdmacro
 +-.if n .pH g3x.fam @(#)fam	30.3 of 1/19/86
 ++.if n .pH g3.fam @(#)fam	30.3 of 1/19/86
 + .nr X
 +-.if \nX=0 .ds x} FAM 3X "Specialized Libraries" "\&"
 +-.if \nX=1 .ds x} FAM 3X "Specialized Libraries"
 +-.if \nX=2 .ds x} FAM 3X "" "\&"
 ++.if \nX=0 .ds x} FAM 3 "Specialized Libraries" "\&"
 ++.if \nX=1 .ds x} FAM 3 "Specialized Libraries"
 ++.if \nX=2 .ds x} FAM 3 "" "\&"
 + .if \nX=3 .ds x} FAM "" "" "\&"
 + .TH \*(x}
 + .SH NAME
 +@@ -65,10 +65,9 @@
 + .PP
 + .SH DESCRIPTION
 + \fIFAM\fP monitors files and directories, notifying interested
 +-applications of changes.  Routines for communicating with the fam(1M)
 ++applications of changes.  Routines for communicating with the fam(8)
 + server process are found in ``libfam.a'', which is loaded if the
 +-option ``-lfam'' is used with cc(1) or ld(1).  The library
 +-``libC.a'' (``-lC'') must also be specified.
 ++option ``-lfam'' is used with cc(1) or ld(1).
 + .PP
 + An application calls routines described here to establish a list of
 + files for \fIfam \fPto monitor.  \fIFam \fPgenerates events on a socket to
 +@@ -282,7 +281,7 @@
 + 
 + 
 + .SH SEE ALSO
 +-fam(1M).
 ++fam(8).
 + .SH BUGS
 + The FAMMoved event is not currently supported.
 + .PP
 Index: files/patch-support::Makefile.am
 ===================================================================
 RCS file: files/patch-support::Makefile.am
 diff -N files/patch-support::Makefile.am
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-support::Makefile.am	16 Dec 2001 00:40:07 -0000
 @@ -0,0 +1,11 @@
 +
 +$FreeBSD$
 +
 +--- support/Makefile.am.orig	Mon Oct 22 01:33:11 2001
 ++++ support/Makefile.am	Sat Dec 15 18:14:16 2001
 +@@ -12,4 +12,4 @@
 + libsupport_a_LIBADD       = @snprintf_o@ @foo_o@
 + 
 + CLEANFILES += @MKDEPFILE@ ii_files/*.ii
 +-sinclude @MKDEPFILE@
 ++#sinclude @MKDEPFILE@

From: Jeremy Norris <ishmael27x@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/32231: Update port devel/fam
Date: Mon, 17 Dec 2001 22:19:42 -0600

 Please hold off on this update, FAM maintainer at SGI has announced intentions
 to release a new version (2.6.7) by the end of this week. It should hopefully
 include many of the patches in my previous updates.
 
 Jeremy

From: Jeremy Norris <ishmael27x@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/32231: Update port devel/fam
Date: Thu, 20 Dec 2001 20:07:20 -0600

 Please now use this diff. A complete rundown of changes follows:
 
 Update to new version, 2.6.7.
 Change categories from devel to sysutils (this is a better home for fam).
 (Note that this requires a repo-copy.)
 Update MAINTAINER address.
 Change pkg-message to be more useful.
 Don't install rc.d startup script, as running through inetd is more preferr=
 ed.
 Change pkg-descr slightly.
 Remove patch-freebsd, and instead break it into individual patch files (thi=
 s is
 more correct according to Porters Handbook).
 Don't USE_AUTOMAKE. Instead patch all auto-bin generated files.
 Change manpages to install in more correct location.
 Move fam from ${PREFIX}/bin to ${PREFIX}/sbin (since it is a daemon).
 Add patch from Mark Miller posted to fam mailing list implementing options =
 to
 fam.conf corresponding to -t and -T command line options (this should be
 integrated in future 2.7 release).
 Change manpages to better reflect reality on FreeBSD.
 
 Note: hopefully, many of these patches will be integrated into the next rel=
 ease
 2.7.
 
 Jeremy
 
 
 Index: Makefile
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/ports/devel/fam/Makefile,v
 retrieving revision 1.1
 diff -u -r1.1 Makefile
 --- Makefile	31 Mar 2001 02:45:55 -0000	1.1
 +++ Makefile	21 Dec 2001 01:46:08 -0000
 @@ -6,24 +6,38 @@
  #
 =20
  PORTNAME=3D	fam
 -PORTVERSION=3D	2.6.4
 -CATEGORIES=3D	devel
 +PORTVERSION=3D	2.6.7
 +CATEGORIES=3D	sysutils
  MASTER_SITES=3D	ftp://oss.sgi.com/projects/fam/download/
 -DISTNAME=3D	${PORTNAME}-oss-${PORTVERSION}
 =20
 -MAINTAINER=3D	ishmael27@home.com
 +MAINTAINER=3D	ishmael27x@yahoo.com
 =20
 -USE_AUTOMAKE=3D	yes
  USE_LIBTOOL=3D	yes
 -USE_GMAKE=3D	yes
 -PATCH_STRIP=3D	-p1
 +PKGMESSAGE=3D	${WRKDIR}/.MESSAGE
  INSTALLS_SHLIB=3D	yes
 +MAN3=3D		fam.3
 +MAN8=3D		fam.8
 =20
 -MAN1=3D		fam.1m
 -MAN3=3D		fam.3x
 +.if exists(/usr/sbin/rpcbind)
 +PORTMAP=3D	rpcbind
 +.else
 +PORTMAP=3D	portmap
 +.endif
 +
 +pre-configure:
 +	@${MV} ${WRKSRC}/man/fam.1m.in ${WRKSRC}/man/fam.8.in
 +	@${MV} ${WRKSRC}/man/fam.3x ${WRKSRC}/man/fam.3
 +
 +post-configure:
 +	@${MV} ${WRKSRC}/fam/fam.conf ${WRKSRC}/fam/fam.conf.sample
 +	@${PERL} -pi -e 's|%%PORTMAP%%|${PORTMAP}|g' ${WRKSRC}/man/fam.8
 =20
  post-install:
 -	@${INSTALL_SCRIPT} -m 751 ${FILESDIR}/fam.sh.sample ${PREFIX}/etc/rc.d/fa=
 m.sh.sample
 +	@if [ ! -f ${PREFIX}/etc/fam.conf ]; then \
 +		${CP} -p ${PREFIX}/etc/fam.conf.sample ${PREFIX}/etc/fam.conf; \
 +	fi
 +	@${SED} -e 's|%%PORTMAP%%|${PORTMAP}|g' -e 's|%%PREFIX%%|${PREFIX}|g' \
 +		${PKGDIR}/pkg-message >${PKGMESSAGE}
  	@${CAT} ${PKGMESSAGE}
 =20
  .include <bsd.port.mk>
 Index: distinfo
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/ports/devel/fam/distinfo,v
 retrieving revision 1.1
 diff -u -r1.1 distinfo
 --- distinfo	31 Mar 2001 02:45:55 -0000	1.1
 +++ distinfo	21 Dec 2001 01:46:43 -0000
 @@ -1 +1 @@
 -MD5 (fam-oss-2.6.4.tar.gz) =3D d060919b3d9ede61a8b68eae1ded53ce
 +MD5 (fam-2.6.7.tar.gz) =3D 7607f96b6fb145e728cefbb1d48229c5
 Index: pkg-descr
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/ports/devel/fam/pkg-descr,v
 retrieving revision 1.1
 diff -u -r1.1 pkg-descr
 --- pkg-descr	31 Mar 2001 02:45:55 -0000	1.1
 +++ pkg-descr	16 Dec 2001 17:42:15 -0000
 @@ -1,4 +1,5 @@
 -FAM, the File Alteration Monitor, provides an API which applications can u=
 se
 -to be notified when specific files or directories are changed.
 +FAM, the File Alteration Monitor, provides a daemon and an API which
 +applications can use to be notified when specific files or directories are
 +changed.
 =20
  WWW: http://oss.sgi.com/projects/fam/
 Index: pkg-message
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/ports/devel/fam/pkg-message,v
 retrieving revision 1.1
 diff -u -r1.1 pkg-message
 --- pkg-message	31 Mar 2001 02:45:55 -0000	1.1
 +++ pkg-message	25 Nov 2001 23:13:59 -0000
 @@ -1,8 +1,17 @@
 -************************************************************************
 =20
 -In order to run this port, please add the following line to /etc/rpc if
 -it is not already there:
 +To run FAM, please check and perform the following:
 =20
 +1. Be sure that the following line is in /etc/rpc
  sgi_fam		391002
 =20
 -************************************************************************
 +2. Be sure that %%PORTMAP%%(8) is running.
 +You probably will want to add the following line to /etc/rc.conf
 +portmap_enable=3D"YES"
 +
 +3. Be sure that the following line is in /etc/inetd.conf
 +sgi_fam/1-2	stream rpc/tcp wait root	%%PREFIX%%/sbin/fam	fam
 +
 +4. Be sure that inetd(8) is running.
 +You probably will want to add the following line to /etc/rc.conf
 +inetd_enable=3D"YES"
 +
 Index: pkg-plist
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/ports/devel/fam/pkg-plist,v
 retrieving revision 1.2
 diff -u -r1.2 pkg-plist
 --- pkg-plist	21 May 2001 07:13:05 -0000	1.2
 +++ pkg-plist	26 Nov 2001 00:20:53 -0000
 @@ -1,9 +1,9 @@
 -bin/fam
 -etc/fam.conf
 -etc/rc.d/fam.sh.sample
 +@comment $FreeBSD$
 +@unexec if cmp -s %D/etc/fam.conf %D/etc/fam.conf.sample; then rm -f %D/et=
 c/fam.conf; fi
 +etc/fam.conf.sample
 +@exec if [ ! -f %D/etc/fam.conf ]; then cp -p %D/%F %B/fam.conf; fi
  include/fam.h
 -lib/fam/editconf.perl
  lib/libfam.a
  lib/libfam.so
  lib/libfam.so.0
 -@dirrm lib/fam
 +sbin/fam
 Index: files/fam.sh.sample
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/fam.sh.sample
 diff -N files/fam.sh.sample
 --- files/fam.sh.sample	31 Mar 2001 02:45:55 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,20 +0,0 @@
 -#!/bin/sh
 -
 -if ! PREFIX=3D$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
 -    echo "$0: Cannot determine the PREFIX" >&2
 -    exit 1
 -fi
 -
 -case "$1" in
 -start)
 -	[ -x ${PREFIX}/bin/fam ] && ( ${PREFIX}/bin/fam & ) && echo -n ' fam'
 -	;;
 -stop)
 -	killall fam && echo -n ' fam'
 -	;;
 -*)
 -	echo "Usage: `basename $0` {start|stop}" >&2
 -	;;
 -esac
 -
 -exit 0
 Index: files/patch-Makefile.am
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-Makefile.am
 diff -N files/patch-Makefile.am
 --- files/patch-Makefile.am	31 Mar 2001 02:45:55 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,33 +0,0 @@
 ---- Makefile.am.orig	Fri May 19 23:46:31 2000
 -+++ Makefile.am	Mon Mar 19 11:51:05 2001
 -@@ -7,30 +7,3 @@
 - rpm: dist
 - 	@cd build && $(MAKE) $(AM_MAKEFLAGS) rpm
 -=20
 --#  We proceed even if these commands fail because this might be an install
 --#  into $DESTDIR by a non-root user.
 --install-exec-hook:
 --	-@if test "no$(LDCONFIG)" !=3D "no"; then \
 --##	    echo "Adding $(libdir) to ld.so.conf..."; \
 --	    $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \
 --	    exec $(LDCONFIG); \
 --	fi
 --##	@echo "Adding fam to rpc..."
 --	-@$(EDITCONF) rpc add 391002 "sgi_fam		391002"
 --##	@echo "Adding fam to inetd.conf..."
 --	-@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
 --	    "#  fam, the File Alteration Monitor, http://oss.sgi.com/projects/fa=
 m/" \
 --	    "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
 --	@echo "Restarting inetd..."
 --	-@killall -HUP inetd
 --
 --#  We don't remove $(libdir) from ld.so.conf here because we don't have
 --#  a way to tell whether we're the ones who added it, and other things
 --#  probably use it as well.
 --uninstall-local:
 --##	@echo "Removing fam from rpc..."
 --	-@$(EDITCONF) rpc remove 391002
 --##	@echo "Removing fam from inetd.conf..."
 --	-@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
 --	@echo "Restarting inetd..."
 --	-@killall -HUP inetd
 Index: files/patch-Makefile.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-Makefile.in
 diff -N files/patch-Makefile.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-Makefile.in	20 Dec 2001 13:39:03 -0000
 @@ -0,0 +1,178 @@
 +
 +$FreeBSD$
 +
 +--- Makefile.in.orig	Wed Dec 19 20:41:08 2001
 ++++ Makefile.in	Thu Dec 20 07:35:00 2001
 +@@ -1,6 +1,6 @@
 +-# Makefile.in generated automatically by automake 1.4 from Makefile.am
 ++# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 +=20
 +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 + # This Makefile.in is free software; the Free Software Foundation
 + # gives unlimited permission to copy and/or distribute it,
 + # with or without modifications, as long as this notice is preserved.
 +@@ -14,6 +14,9 @@
 + #  Since we're not always using gcc, we don't want to use dependency
 + #  tracking.  (It croaks non-GNU compilers.)  Seems like this should be
 + #  configurable through autoconf!
 ++#AUTOMAKE_OPTIONS=3Dno-dependencies
 ++
 ++#  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 +=20
 +=20
 + SHELL =3D @SHELL@
 +@@ -76,6 +79,7 @@
 + LDCONFIG =3D @LDCONFIG@
 + LIBTOOL =3D @LIBTOOL@
 + LN_S =3D @LN_S@
 ++MAINT =3D @MAINT@
 + MAKEINFO =3D @MAKEINFO@
 + MKDEPFILE =3D @MKDEPFILE@
 + OBJDUMP =3D @OBJDUMP@
 +@@ -86,9 +90,6 @@
 + foo_o =3D @foo_o@
 + snprintf_o =3D @snprintf_o@
 +=20
 +-AUTOMAKE_OPTIONS =3D no-dependencies
 +-
 +-#  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 + INCLUDES =3D @FAMPROTOINC@ -DCONFIG_ETC_CONFIG_PATH=3D\"@FAM_CONF@\"
 +=20
 + #  should this be set by the configure script?
 +@@ -96,7 +97,9 @@
 +=20
 + uninstallscriptdir =3D $(pkglibdir)
 +=20
 +-SUBDIRS =3D util include support libfam fam man test build
 ++CLEANFILES =3D=20
 ++
 ++SUBDIRS =3D include support libfam fam man
 +=20
 + EXTRA_DIST =3D common.am INSTALL.rpm
 + ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4
 +@@ -114,19 +117,19 @@
 + GZIP_ENV =3D --best
 + all: all-redirect
 + .SUFFIXES:
 +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M=
 4) $(top_srcdir)/common.am
 +-	cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/c=
 onfigure.in $(ACLOCAL_M4) $(top_srcdir)/common.am
 ++	cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile
 +=20
 + Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
 + 	cd $(top_builddir) \
 + 	  && CONFIG_FILES=3D$@ CONFIG_HEADERS=3D $(SHELL) ./config.status
 +=20
 +-$(ACLOCAL_M4):  configure.in=20
 ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in=20
 + 	cd $(srcdir) && $(ACLOCAL)
 +=20
 + config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 + 	$(SHELL) ./config.status --recheck
 +-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEP=
 ENDENCIES)
 ++$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOC=
 AL_M4) $(CONFIGURE_DEPENDENCIES)
 + 	cd $(srcdir) && $(AUTOCONF)
 +=20
 + config.h: stamp-h
 +@@ -139,7 +142,7 @@
 + 	  && CONFIG_FILES=3D CONFIG_HEADERS=3Dconfig.h \
 + 	     $(SHELL) ./config.status
 + 	@echo timestamp > stamp-h 2> /dev/null
 +-$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
 ++$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
 + 	@if test ! -f $@; then \
 + 		rm -f $(srcdir)/stamp-h.in; \
 + 		$(MAKE) $(srcdir)/stamp-h.in; \
 +@@ -193,7 +196,7 @@
 + 	dot_seen=3Dno; \
 + 	rev=3D''; list=3D'$(SUBDIRS)'; for subdir in $$list; do \
 + 	  rev=3D"$$subdir $$rev"; \
 +-	  test "$$subdir" =3D "." && dot_seen=3Dyes; \
 ++	  test "$$subdir" !=3D "." || dot_seen=3Dyes; \
 + 	done; \
 + 	test "$$dot_seen" =3D "no" && rev=3D". $$rev"; \
 + 	target=3D`echo $@ | sed s/-recursive//`; \
 +@@ -316,8 +319,6 @@
 + 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 +=20
 + install-exec-am:
 +-	@$(NORMAL_INSTALL)
 +-	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
 + install-exec: install-exec-recursive
 +=20
 + install-data-am:
 +@@ -326,7 +327,7 @@
 + install-am: all-am
 + 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 + install: install-recursive
 +-uninstall-am: uninstall-local
 ++uninstall-am:
 + uninstall: uninstall-recursive
 + all-am: Makefile config.h
 + all-redirect: all-recursive-am
 +@@ -339,6 +340,7 @@
 + mostlyclean-generic:
 +=20
 + clean-generic:
 ++	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 +=20
 + distclean-generic:
 + 	-rm -f Makefile $(CONFIG_CLEAN_FILES)
 +@@ -376,10 +378,9 @@
 + distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
 + dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
 + install-exec-am install-exec install-data-am install-data install-am \
 +-install uninstall-local uninstall-am uninstall all-redirect all-am all \
 +-installdirs-am installdirs mostlyclean-generic distclean-generic \
 +-clean-generic maintainer-clean-generic clean mostlyclean distclean \
 +-maintainer-clean
 ++install uninstall-am uninstall all-redirect all-am all installdirs-am \
 ++installdirs mostlyclean-generic distclean-generic clean-generic \
 ++maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 +=20
 +=20
 + rpm: dist
 +@@ -387,26 +388,26 @@
 +=20
 + #  We proceed even if these commands fail because this might be an install
 + #  into $DESTDIR by a non-root user.
 +-install-exec-hook:
 +-	-@if test "no$(LDCONFIG)" !=3D "no"; then \
 +-	    $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \
 +-	    exec $(LDCONFIG); \
 +-	fi
 +-	-@$(EDITCONF) rpc add 391002 "sgi_fam		391002"
 +-	-@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
 +-	    "#  fam, the File Alteration Monitor, http://oss.sgi.com/projects/fa=
 m/" \
 +-	    "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
 +-	@echo "Restarting inetd..."
 +-	-@killall -HUP inetd
 ++#install-exec-hook:
 ++#	-@if test "no$(LDCONFIG)" !=3D "no"; then \
 ++#	    $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir);=
  \
 ++#	    exec $(LDCONFIG); \
 ++#	fi
 ++#	-@$(EDITCONF) rpc add 391002 "sgi_fam		391002"
 ++#	-@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
 ++#	    "#  fam, the File Alteration Monitor, http://oss.sgi.com/projects/f=
 am/" \
 ++#	    "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
 ++#	@echo "Restarting inetd..."
 ++#	-@killall -HUP inetd
 +=20
 + #  We don't remove $(libdir) from ld.so.conf here because we don't have
 + #  a way to tell whether we're the ones who added it, and other things
 + #  probably use it as well.
 +-uninstall-local:
 +-	-@$(EDITCONF) rpc remove 391002
 +-	-@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
 +-	@echo "Restarting inetd..."
 +-	-@killall -HUP inetd
 ++#uninstall-local:
 ++#	-@$(EDITCONF) rpc remove 391002
 ++#	-@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
 ++#	@echo "Restarting inetd..."
 ++#	-@killall -HUP inetd
 +=20
 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
 + # Otherwise a system limit (for SysV at least) may be exceeded.
 Index: files/patch-config.h.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-config.h.in
 diff -N files/patch-config.h.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-config.h.in	20 Dec 2001 13:39:12 -0000
 @@ -0,0 +1,21 @@
 +
 +$FreeBSD$
 +
 +--- config.h.in.orig	Wed Dec 19 20:41:03 2001
 ++++ config.h.in	Thu Dec 20 07:30:50 2001
 +@@ -38,14 +38,7 @@
 + /*  Define if we have prmap_sgi_t  */
 + #undef HAVE_PRMAP_SGI_T
 +=20
 +-/* Define if we have MNTTYPE_NFS2 */
 +-#define HAVE_MNTTYPE_NFS2 0
 +-
 +-/* Define if we have MNTTYPE_NFS3 */
 +-#define HAVE_MNTTYPE_NFS3 0
 +-
 +-/* Define if we have MNTTYPE_CACHEFS */
 +-#define HAVE_MNTTYPE_CACHEFS 0
 ++#undef HAVE_MNTENT_H
 +=20
 + /*  Define if we have a prototype for bindresvport().  */
 + #undef HAVE_BINDRESVPORT_PROTO
 Index: files/patch-configure
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-configure
 diff -N files/patch-configure
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-configure	20 Dec 2001 13:39:21 -0000
 @@ -0,0 +1,1230 @@
 +
 +$FreeBSD$
 +
 +--- configure.orig	Wed Dec 19 20:41:13 2001
 ++++ configure	Thu Dec 20 07:30:45 2001
 +@@ -12,6 +12,9 @@
 + ac_default_prefix=3D/usr/local
 + # Any additions from configure.in:
 + ac_help=3D"$ac_help
 ++  --enable-maintainer-mode enable make rules and dependencies not useful
 ++                          (and sometimes confusing) to the casual install=
 er"
 ++ac_help=3D"$ac_help
 +   --with-CFLAGS=3D\"flags\"   set CFLAGS and CXXFLAGS to the given value"
 + ac_help=3D"$ac_help
 +   --enable-shared[=3DPKGS]  build shared libraries [default=3Dyes]"
 +@@ -40,6 +43,7 @@
 + program_transform_name=3Ds,x,x,
 + silent=3D
 + site=3D
 ++sitefile=3D
 + srcdir=3D
 + target=3DNONE
 + verbose=3D
 +@@ -154,6 +158,7 @@
 +   --help                  print this message
 +   --no-create             do not create output files
 +   --quiet, --silent       do not print \`checking...' messages
 ++  --site-file=3DFILE        use FILE as the site file
 +   --version               print the version of autoconf that created conf=
 igure
 + Directory and file names:
 +   --prefix=3DPREFIX         install architecture-independent files in PRE=
 FIX
 +@@ -324,6 +329,11 @@
 +   -site=3D* | --site=3D* | --sit=3D*)
 +     site=3D"$ac_optarg" ;;
 +=20
 ++  -site-file | --site-file | --site-fil | --site-fi | --site-f)
 ++    ac_prev=3Dsitefile ;;
 ++  -site-file=3D* | --site-file=3D* | --site-fil=3D* | --site-fi=3D* | --s=
 ite-f=3D*)
 ++    sitefile=3D"$ac_optarg" ;;
 ++
 +   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
 +     ac_prev=3Dsrcdir ;;
 +   -srcdir=3D* | --srcdir=3D* | --srcdi=3D* | --srcd=3D* | --src=3D* | --s=
 r=3D*)
 +@@ -489,12 +499,16 @@
 + srcdir=3D`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 +=20
 + # Prefer explicitly selected file to automatically selected ones.
 +-if test -z "$CONFIG_SITE"; then
 +-  if test "x$prefix" !=3D xNONE; then
 +-    CONFIG_SITE=3D"$prefix/share/config.site $prefix/etc/config.site"
 +-  else
 +-    CONFIG_SITE=3D"$ac_default_prefix/share/config.site $ac_default_prefi=
 x/etc/config.site"
 ++if test -z "$sitefile"; then
 ++  if test -z "$CONFIG_SITE"; then
 ++    if test "x$prefix" !=3D xNONE; then
 ++      CONFIG_SITE=3D"$prefix/share/config.site $prefix/etc/config.site"
 ++    else
 ++      CONFIG_SITE=3D"$ac_default_prefix/share/config.site $ac_default_pre=
 fix/etc/config.site"
 ++    fi
 +   fi
 ++else
 ++  CONFIG_SITE=3D"$sitefile"
 + fi
 + for ac_site_file in $CONFIG_SITE; do
 +   if test -r "$ac_site_file"; then
 +@@ -564,7 +578,7 @@
 + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 + # ./install, which can be erroneously created by make from ./install.sh.
 + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
 +-echo "configure:568: checking for a BSD compatible install" >&5
 ++echo "configure:582: checking for a BSD compatible install" >&5
 + if test -z "$INSTALL"; then
 + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 +@@ -617,7 +631,7 @@
 + test -z "$INSTALL_DATA" && INSTALL_DATA=3D'${INSTALL} -m 644'
 +=20
 + echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
 +-echo "configure:621: checking whether build environment is sane" >&5
 ++echo "configure:635: checking whether build environment is sane" >&5
 + # Just in case
 + sleep 1
 + echo timestamp > conftestfile
 +@@ -674,7 +688,7 @@
 + test "$program_transform_name" =3D "" && program_transform_name=3D"s,x,x,"
 +=20
 + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
 +-echo "configure:678: checking whether ${MAKE-make} sets \${MAKE}" >&5
 ++echo "configure:692: checking whether ${MAKE-make} sets \${MAKE}" >&5
 + set dummy ${MAKE-make}; ac_make=3D`echo "$2" | sed 'y%./+-%__p_%'`
 + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" =3D =
 set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 +@@ -720,7 +734,7 @@
 +=20
 + missing_dir=3D`cd $ac_aux_dir && pwd`
 + echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
 +-echo "configure:724: checking for working aclocal" >&5
 ++echo "configure:738: checking for working aclocal" >&5
 + # Run test in a subshell; some versions of sh will print an error if
 + # an executable is not found, even if stderr is redirected.
 + # Redirect stdin to placate older versions of autoconf.  Sigh.
 +@@ -733,7 +747,7 @@
 + fi
 +=20
 + echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
 +-echo "configure:737: checking for working autoconf" >&5
 ++echo "configure:751: checking for working autoconf" >&5
 + # Run test in a subshell; some versions of sh will print an error if
 + # an executable is not found, even if stderr is redirected.
 + # Redirect stdin to placate older versions of autoconf.  Sigh.
 +@@ -746,7 +760,7 @@
 + fi
 +=20
 + echo $ac_n "checking for working automake""... $ac_c" 1>&6
 +-echo "configure:750: checking for working automake" >&5
 ++echo "configure:764: checking for working automake" >&5
 + # Run test in a subshell; some versions of sh will print an error if
 + # an executable is not found, even if stderr is redirected.
 + # Redirect stdin to placate older versions of autoconf.  Sigh.
 +@@ -759,7 +773,7 @@
 + fi
 +=20
 + echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
 +-echo "configure:763: checking for working autoheader" >&5
 ++echo "configure:777: checking for working autoheader" >&5
 + # Run test in a subshell; some versions of sh will print an error if
 + # an executable is not found, even if stderr is redirected.
 + # Redirect stdin to placate older versions of autoconf.  Sigh.
 +@@ -772,7 +786,7 @@
 + fi
 +=20
 + echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
 +-echo "configure:776: checking for working makeinfo" >&5
 ++echo "configure:790: checking for working makeinfo" >&5
 + # Run test in a subshell; some versions of sh will print an error if
 + # an executable is not found, even if stderr is redirected.
 + # Redirect stdin to placate older versions of autoconf.  Sigh.
 +@@ -786,6 +800,30 @@
 +=20
 +=20
 +=20
 ++echo $ac_n "checking whether to enable maintainer-specific portions of Ma=
 kefiles""... $ac_c" 1>&6
 ++echo "configure:805: checking whether to enable maintainer-specific porti=
 ons of Makefiles" >&5
 ++    # Check whether --enable-maintainer-mode or --disable-maintainer-mode=
  was given.
 ++if test "${enable_maintainer_mode+set}" =3D set; then
 ++  enableval=3D"$enable_maintainer_mode"
 ++  USE_MAINTAINER_MODE=3D$enableval
 ++else
 ++  USE_MAINTAINER_MODE=3Dno
 ++fi
 ++
 ++  echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
 ++ =20
 ++
 ++if test $USE_MAINTAINER_MODE =3D yes; then
 ++  MAINTAINER_MODE_TRUE=3D
 ++  MAINTAINER_MODE_FALSE=3D'#'
 ++else
 ++  MAINTAINER_MODE_TRUE=3D'#'
 ++  MAINTAINER_MODE_FALSE=3D
 ++fi
 ++  MAINT=3D$MAINTAINER_MODE_TRUE
 ++ =20
 ++
 ++
 +=20
 +=20
 +=20
 +@@ -815,7 +853,7 @@
 +     # Extract the first word of "CC", so it can be a program name with ar=
 gs.
 + set dummy CC; ac_word=3D$2
 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 +-echo "configure:819: checking for $ac_word" >&5
 ++echo "configure:857: checking for $ac_word" >&5
 + if eval "test \"`echo '$''{'ac_cv_path_CXX'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -853,7 +891,7 @@
 + # Extract the first word of "$ac_prog", so it can be a program name with =
 args.
 + set dummy $ac_prog; ac_word=3D$2
 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 +-echo "configure:857: checking for $ac_word" >&5
 ++echo "configure:895: checking for $ac_word" >&5
 + if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -885,7 +923,7 @@
 +=20
 +=20
 + echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) w=
 orks""... $ac_c" 1>&6
 +-echo "configure:889: checking whether the C++ compiler ($CXX $CXXFLAGS $L=
 DFLAGS) works" >&5
 ++echo "configure:927: checking whether the C++ compiler ($CXX $CXXFLAGS $L=
 DFLAGS) works" >&5
 +=20
 + ac_ext=3DC
 + # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp option=
 s.
 +@@ -896,12 +934,12 @@
 +=20
 + cat > conftest.$ac_ext << EOF
 +=20
 +-#line 900 "configure"
 ++#line 938 "configure"
 + #include "confdefs.h"
 +=20
 + int main(){return(0);}
 + EOF
 +-if { (eval echo configure:905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; =
 } && test -s conftest${ac_exeext}; then
 ++if { (eval echo configure:943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; =
 } && test -s conftest${ac_exeext}; then
 +   ac_cv_prog_cxx_works=3Dyes
 +   # If we can't run a trivial program, we are probably using a cross comp=
 iler.
 +   if (./conftest; exit) 2>/dev/null; then
 +@@ -927,12 +965,12 @@
 +   { echo "configure: error: installation or configuration problem: C++ co=
 mpiler cannot create executables." 1>&2; exit 1; }
 + fi
 + echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) i=
 s a cross-compiler""... $ac_c" 1>&6
 +-echo "configure:931: checking whether the C++ compiler ($CXX $CXXFLAGS $L=
 DFLAGS) is a cross-compiler" >&5
 ++echo "configure:969: checking whether the C++ compiler ($CXX $CXXFLAGS $L=
 DFLAGS) is a cross-compiler" >&5
 + echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 + cross_compiling=3D$ac_cv_prog_cxx_cross
 +=20
 + echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
 +-echo "configure:936: checking whether we are using GNU C++" >&5
 ++echo "configure:974: checking whether we are using GNU C++" >&5
 + if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -941,7 +979,7 @@
 +   yes;
 + #endif
 + EOF
 +-if { ac_try=3D'${CXX-g++} -E conftest.C'; { (eval echo configure:945: \"$=
 ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 ++if { ac_try=3D'${CXX-g++} -E conftest.C'; { (eval echo configure:983: \"$=
 ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 +   ac_cv_prog_gxx=3Dyes
 + else
 +   ac_cv_prog_gxx=3Dno
 +@@ -960,7 +998,7 @@
 + ac_save_CXXFLAGS=3D"$CXXFLAGS"
 + CXXFLAGS=3D
 + echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
 +-echo "configure:964: checking whether ${CXX-g++} accepts -g" >&5
 ++echo "configure:1002: checking whether ${CXX-g++} accepts -g" >&5
 + if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -992,7 +1030,7 @@
 + fi
 +=20
 + echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
 +-echo "configure:996: checking how to run the C++ preprocessor" >&5
 ++echo "configure:1034: checking how to run the C++ preprocessor" >&5
 + if test -z "$CXXCPP"; then
 + if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 +@@ -1005,12 +1043,12 @@
 + cross_compiling=3D$ac_cv_prog_cxx_cross
 +   CXXCPP=3D"${CXX-g++} -E"
 +   cat > conftest.$ac_ext <<EOF
 +-#line 1009 "configure"
 ++#line 1047 "configure"
 + #include "confdefs.h"
 + #include <stdlib.h>
 + EOF
 + ac_try=3D"$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 +-{ (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ++{ (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 + ac_err=3D`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 + if test -z "$ac_err"; then
 +   :
 +@@ -1034,36 +1072,6 @@
 + CXXCPP=3D"$ac_cv_prog_CXXCPP"
 + echo "$ac_t""$CXXCPP" 1>&6
 +=20
 +-# Extract the first word of "ranlib", so it can be a program name with ar=
 gs.
 +-set dummy ranlib; ac_word=3D$2
 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 +-echo "configure:1041: checking for $ac_word" >&5
 +-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" =3D set"; then
 +-  echo $ac_n "(cached) $ac_c" 1>&6
 +-else
 +-  if test -n "$RANLIB"; then
 +-  ac_cv_prog_RANLIB=3D"$RANLIB" # Let the user override the test.
 +-else
 +-  IFS=3D"${IFS=3D 	}"; ac_save_ifs=3D"$IFS"; IFS=3D":"
 +-  ac_dummy=3D"$PATH"
 +-  for ac_dir in $ac_dummy; do
 +-    test -z "$ac_dir" && ac_dir=3D.
 +-    if test -f $ac_dir/$ac_word; then
 +-      ac_cv_prog_RANLIB=3D"ranlib"
 +-      break
 +-    fi
 +-  done
 +-  IFS=3D"$ac_save_ifs"
 +-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=3D":"
 +-fi
 +-fi
 +-RANLIB=3D"$ac_cv_prog_RANLIB"
 +-if test -n "$RANLIB"; then
 +-  echo "$ac_t""$RANLIB" 1>&6
 +-else
 +-  echo "$ac_t""no" 1>&6
 +-fi
 +-
 +=20
 + # Find a good install program.  We prefer a C program (faster),
 + # so one script is as good as another.  But avoid the broken or
 +@@ -1077,7 +1085,7 @@
 + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 + # ./install, which can be erroneously created by make from ./install.sh.
 + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
 +-echo "configure:1081: checking for a BSD compatible install" >&5
 ++echo "configure:1089: checking for a BSD compatible install" >&5
 + if test -z "$INSTALL"; then
 + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 +@@ -1130,7 +1138,7 @@
 + test -z "$INSTALL_DATA" && INSTALL_DATA=3D'${INSTALL} -m 644'
 +=20
 + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
 +-echo "configure:1134: checking whether ${MAKE-make} sets \${MAKE}" >&5
 ++echo "configure:1142: checking whether ${MAKE-make} sets \${MAKE}" >&5
 + set dummy ${MAKE-make}; ac_make=3D`echo "$2" | sed 'y%./+-%__p_%'`
 + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" =3D =
 set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 +@@ -1232,7 +1240,7 @@
 + fi
 +=20
 + echo $ac_n "checking host system type""... $ac_c" 1>&6
 +-echo "configure:1236: checking host system type" >&5
 ++echo "configure:1244: checking host system type" >&5
 +=20
 + host_alias=3D$host
 + case "$host_alias" in
 +@@ -1253,7 +1261,7 @@
 + echo "$ac_t""$host" 1>&6
 +=20
 + echo $ac_n "checking build system type""... $ac_c" 1>&6
 +-echo "configure:1257: checking build system type" >&5
 ++echo "configure:1265: checking build system type" >&5
 +=20
 + build_alias=3D$build
 + case "$build_alias" in
 +@@ -1270,10 +1278,40 @@
 + build_os=3D`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 + echo "$ac_t""$build" 1>&6
 +=20
 ++# Extract the first word of "ranlib", so it can be a program name with ar=
 gs.
 ++set dummy ranlib; ac_word=3D$2
 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 ++echo "configure:1285: checking for $ac_word" >&5
 ++if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" =3D set"; then
 ++  echo $ac_n "(cached) $ac_c" 1>&6
 ++else
 ++  if test -n "$RANLIB"; then
 ++  ac_cv_prog_RANLIB=3D"$RANLIB" # Let the user override the test.
 ++else
 ++  IFS=3D"${IFS=3D 	}"; ac_save_ifs=3D"$IFS"; IFS=3D":"
 ++  ac_dummy=3D"$PATH"
 ++  for ac_dir in $ac_dummy; do
 ++    test -z "$ac_dir" && ac_dir=3D.
 ++    if test -f $ac_dir/$ac_word; then
 ++      ac_cv_prog_RANLIB=3D"ranlib"
 ++      break
 ++    fi
 ++  done
 ++  IFS=3D"$ac_save_ifs"
 ++  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=3D":"
 ++fi
 ++fi
 ++RANLIB=3D"$ac_cv_prog_RANLIB"
 ++if test -n "$RANLIB"; then
 ++  echo "$ac_t""$RANLIB" 1>&6
 ++else
 ++  echo "$ac_t""no" 1>&6
 ++fi
 ++
 + # Extract the first word of "gcc", so it can be a program name with args.
 + set dummy gcc; ac_word=3D$2
 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 +-echo "configure:1277: checking for $ac_word" >&5
 ++echo "configure:1315: checking for $ac_word" >&5
 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -1303,7 +1341,7 @@
 +   # Extract the first word of "cc", so it can be a program name with args.
 + set dummy cc; ac_word=3D$2
 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 +-echo "configure:1307: checking for $ac_word" >&5
 ++echo "configure:1345: checking for $ac_word" >&5
 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -1354,7 +1392,7 @@
 +       # Extract the first word of "cl", so it can be a program name with =
 args.
 + set dummy cl; ac_word=3D$2
 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 +-echo "configure:1358: checking for $ac_word" >&5
 ++echo "configure:1396: checking for $ac_word" >&5
 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -1386,7 +1424,7 @@
 + fi
 +=20
 + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works"=
 "... $ac_c" 1>&6
 +-echo "configure:1390: checking whether the C compiler ($CC $CFLAGS $LDFLA=
 GS) works" >&5
 ++echo "configure:1428: checking whether the C compiler ($CC $CFLAGS $LDFLA=
 GS) works" >&5
 +=20
 + ac_ext=3Dc
 + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 +@@ -1397,12 +1435,12 @@
 +=20
 + cat > conftest.$ac_ext << EOF
 +=20
 +-#line 1401 "configure"
 ++#line 1439 "configure"
 + #include "confdefs.h"
 +=20
 + main(){return(0);}
 + EOF
 +-if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5;=
  } && test -s conftest${ac_exeext}; then
 ++if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5;=
  } && test -s conftest${ac_exeext}; then
 +   ac_cv_prog_cc_works=3Dyes
 +   # If we can't run a trivial program, we are probably using a cross comp=
 iler.
 +   if (./conftest; exit) 2>/dev/null; then
 +@@ -1428,12 +1466,12 @@
 +   { echo "configure: error: installation or configuration problem: C comp=
 iler cannot create executables." 1>&2; exit 1; }
 + fi
 + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a c=
 ross-compiler""... $ac_c" 1>&6
 +-echo "configure:1432: checking whether the C compiler ($CC $CFLAGS $LDFLA=
 GS) is a cross-compiler" >&5
 ++echo "configure:1470: checking whether the C compiler ($CC $CFLAGS $LDFLA=
 GS) is a cross-compiler" >&5
 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 + cross_compiling=3D$ac_cv_prog_cc_cross
 +=20
 + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
 +-echo "configure:1437: checking whether we are using GNU C" >&5
 ++echo "configure:1475: checking whether we are using GNU C" >&5
 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -1442,7 +1480,7 @@
 +   yes;
 + #endif
 + EOF
 +-if { ac_try=3D'${CC-cc} -E conftest.c'; { (eval echo configure:1446: \"$a=
 c_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 ++if { ac_try=3D'${CC-cc} -E conftest.c'; { (eval echo configure:1484: \"$a=
 c_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 +   ac_cv_prog_gcc=3Dyes
 + else
 +   ac_cv_prog_gcc=3Dno
 +@@ -1461,7 +1499,7 @@
 + ac_save_CFLAGS=3D"$CFLAGS"
 + CFLAGS=3D
 + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
 +-echo "configure:1465: checking whether ${CC-cc} accepts -g" >&5
 ++echo "configure:1503: checking whether ${CC-cc} accepts -g" >&5
 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -1504,7 +1542,7 @@
 + if test "$ac_cv_prog_gcc" =3D yes; then
 +   # Check if gcc -print-prog-name=3Dld gives a path.
 +   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
 +-echo "configure:1508: checking for ld used by GCC" >&5
 ++echo "configure:1546: checking for ld used by GCC" >&5
 +   ac_prog=3D`($CC -print-prog-name=3Dld) 2>&5`
 +   case "$ac_prog" in
 +     # Accept absolute paths.
 +@@ -1528,10 +1566,10 @@
 +   esac
 + elif test "$with_gnu_ld" =3D yes; then
 +   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
 +-echo "configure:1532: checking for GNU ld" >&5
 ++echo "configure:1570: checking for GNU ld" >&5
 + else
 +   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
 +-echo "configure:1535: checking for non-GNU ld" >&5
 ++echo "configure:1573: checking for non-GNU ld" >&5
 + fi
 + if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 +@@ -1566,7 +1604,7 @@
 + fi
 + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PA=
 TH" 1>&2; exit 1; }
 + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
 +-echo "configure:1570: checking if the linker ($LD) is GNU ld" >&5
 ++echo "configure:1608: checking if the linker ($LD) is GNU ld" >&5
 + if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -1582,7 +1620,7 @@
 +=20
 +=20
 + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
 +-echo "configure:1586: checking for BSD-compatible nm" >&5
 ++echo "configure:1624: checking for BSD-compatible nm" >&5
 + if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -1618,7 +1656,7 @@
 + echo "$ac_t""$NM" 1>&6
 +=20
 + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
 +-echo "configure:1622: checking whether ln -s works" >&5
 ++echo "configure:1660: checking whether ln -s works" >&5
 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -1645,12 +1683,7 @@
 + esac
 +=20
 + # Check for any special flags to pass to ltconfig.
 +-#
 +-# the following will cause an existing older ltconfig to fail, so
 +-# we ignore this at the expense of the cache file... Checking this=20
 +-# will just take longer ... bummer!
 +-#libtool_flags=3D"--cache-file=3D$cache_file"
 +-#
 ++libtool_flags=3D"--cache-file=3D$cache_file"
 + test "$enable_shared" =3D no && libtool_flags=3D"$libtool_flags --disable=
 -shared"
 + test "$enable_static" =3D no && libtool_flags=3D"$libtool_flags --disable=
 -static"
 + test "$enable_fast_install" =3D no && libtool_flags=3D"$libtool_flags --d=
 isable-fast-install"
 +@@ -1672,8 +1705,8 @@
 + case "$lt_target" in
 + *-*-irix6*)
 +   # Find out which ABI we are using.
 +-  echo '#line 1676 "configure"' > conftest.$ac_ext
 +-  if { (eval echo configure:1677: \"$ac_compile\") 1>&5; (eval $ac_compil=
 e) 2>&5; }; then
 ++  echo '#line 1709 "configure"' > conftest.$ac_ext
 ++  if { (eval echo configure:1710: \"$ac_compile\") 1>&5; (eval $ac_compil=
 e) 2>&5; }; then
 +     case "`/usr/bin/file conftest.o`" in
 +     *32-bit*)
 +       LD=3D"${LD-ld} -32"
 +@@ -1694,19 +1727,19 @@
 +   SAVE_CFLAGS=3D"$CFLAGS"
 +   CFLAGS=3D"$CFLAGS -belf"
 +   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
 +-echo "configure:1698: checking whether the C compiler needs -belf" >&5
 ++echo "configure:1731: checking whether the C compiler needs -belf" >&5
 + if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 1703 "configure"
 ++#line 1736 "configure"
 + #include "confdefs.h"
 +=20
 + int main() {
 +=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5;=
  } && test -s conftest${ac_exeext}; then
 ++if { (eval echo configure:1743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5;=
  } && test -s conftest${ac_exeext}; then
 +   rm -rf conftest*
 +   lt_cv_cc_needs_belf=3Dyes
 + else
 +@@ -1810,7 +1843,7 @@
 + # Extract the first word of "tar", so it can be a program name with args.
 + set dummy tar; ac_word=3D$2
 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 +-echo "configure:1814: checking for $ac_word" >&5
 ++echo "configure:1847: checking for $ac_word" >&5
 + if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -1846,7 +1879,7 @@
 + # Extract the first word of "ldconfig", so it can be a program name with =
 args.
 + set dummy ldconfig; ac_word=3D$2
 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 +-echo "configure:1850: checking for $ac_word" >&5
 ++echo "configure:1883: checking for $ac_word" >&5
 + if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -1881,6 +1914,43 @@
 +=20
 +=20
 +=20
 ++ac_safe=3D`echo "mntent.h" | sed 'y%./+-%__p_%'`
 ++echo $ac_n "checking for mntent.h""... $ac_c" 1>&6
 ++echo "configure:1920: checking for mntent.h" >&5
 ++if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" =3D set"; then
 ++  echo $ac_n "(cached) $ac_c" 1>&6
 ++else
 ++  cat > conftest.$ac_ext <<EOF
 ++#line 1925 "configure"
 ++#include "confdefs.h"
 ++#include <mntent.h>
 ++EOF
 ++ac_try=3D"$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 ++{ (eval echo configure:1930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ++ac_err=3D`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 ++if test -z "$ac_err"; then
 ++  rm -rf conftest*
 ++  eval "ac_cv_header_$ac_safe=3Dyes"
 ++else
 ++  echo "$ac_err" >&5
 ++  echo "configure: failed program was:" >&5
 ++  cat conftest.$ac_ext >&5
 ++  rm -rf conftest*
 ++  eval "ac_cv_header_$ac_safe=3Dno"
 ++fi
 ++rm -f conftest*
 ++fi
 ++if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" =3D yes"; then
 ++  echo "$ac_t""yes" 1>&6
 ++  cat >> confdefs.h <<\EOF
 ++#define HAVE_MNTENT_H 1
 ++EOF
 ++
 ++else
 ++  echo "$ac_t""no" 1>&6
 ++fi
 ++
 ++
 + if test `uname` =3D 'IRIX' || test `uname` =3D 'IRIX64'; then
 +     have_imon=3Dyes
 +     cat >> confdefs.h <<\EOF
 +@@ -1889,7 +1959,7 @@
 +=20
 +     IMON_FUNCS=3DIMonIrix
 +                     cat > conftest.$ac_ext <<EOF
 +-#line 1893 "configure"
 ++#line 1963 "configure"
 + #include "confdefs.h"
 + #include <sys/imon.h>
 + EOF
 +@@ -1907,17 +1977,17 @@
 + if test "$have_imon" !=3D "yes"; then
 +     ac_safe=3D`echo "linux/imon.h" | sed 'y%./+-%__p_%'`
 + echo $ac_n "checking for linux/imon.h""... $ac_c" 1>&6
 +-echo "configure:1911: checking for linux/imon.h" >&5
 ++echo "configure:1981: checking for linux/imon.h" >&5
 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 1916 "configure"
 ++#line 1986 "configure"
 + #include "confdefs.h"
 + #include <linux/imon.h>
 + EOF
 + ac_try=3D"$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 +-{ (eval echo configure:1921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ++{ (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 + ac_err=3D`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 + if test -z "$ac_err"; then
 +   rm -rf conftest*
 +@@ -1959,17 +2029,17 @@
 +=20
 + ac_safe=3D`echo "sys/statvfs.h" | sed 'y%./+-%__p_%'`
 + echo $ac_n "checking for sys/statvfs.h""... $ac_c" 1>&6
 +-echo "configure:1963: checking for sys/statvfs.h" >&5
 ++echo "configure:2033: checking for sys/statvfs.h" >&5
 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 1968 "configure"
 ++#line 2038 "configure"
 + #include "confdefs.h"
 + #include <sys/statvfs.h>
 + EOF
 + ac_try=3D"$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 +-{ (eval echo configure:1973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ++{ (eval echo configure:2043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 + ac_err=3D`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 + if test -z "$ac_err"; then
 +   rm -rf conftest*
 +@@ -1999,17 +2069,17 @@
 +=20
 + ac_safe=3D`echo "sys/syssgi.h" | sed 'y%./+-%__p_%'`
 + echo $ac_n "checking for sys/syssgi.h""... $ac_c" 1>&6
 +-echo "configure:2003: checking for sys/syssgi.h" >&5
 ++echo "configure:2073: checking for sys/syssgi.h" >&5
 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2008 "configure"
 ++#line 2078 "configure"
 + #include "confdefs.h"
 + #include <sys/syssgi.h>
 + EOF
 + ac_try=3D"$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 +-{ (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ++{ (eval echo configure:2083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 + ac_err=3D`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 + if test -z "$ac_err"; then
 +   rm -rf conftest*
 +@@ -2039,17 +2109,17 @@
 +=20
 + ac_safe=3D`echo "sys/fs/nfs_clnt.h" | sed 'y%./+-%__p_%'`
 + echo $ac_n "checking for sys/fs/nfs_clnt.h""... $ac_c" 1>&6
 +-echo "configure:2043: checking for sys/fs/nfs_clnt.h" >&5
 ++echo "configure:2113: checking for sys/fs/nfs_clnt.h" >&5
 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2048 "configure"
 ++#line 2118 "configure"
 + #include "confdefs.h"
 + #include <sys/fs/nfs_clnt.h>
 + EOF
 + ac_try=3D"$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 +-{ (eval echo configure:2053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ++{ (eval echo configure:2123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 + ac_err=3D`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 + if test -z "$ac_err"; then
 +   rm -rf conftest*
 +@@ -2087,16 +2157,16 @@
 + fi
 +=20
 + echo $ac_n "checking SGI_NOHANG""... $ac_c" 1>&6
 +-echo "configure:2091: checking SGI_NOHANG" >&5
 ++echo "configure:2161: checking SGI_NOHANG" >&5
 + cat > conftest.$ac_ext <<EOF
 +-#line 2093 "configure"
 ++#line 2163 "configure"
 + #include "confdefs.h"
 + #include <sys/syssgi.h>
 + int main() {
 + int i =3D SGI_NOHANG;=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:2100: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 ++if { (eval echo configure:2170: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +   rm -rf conftest*
 +   have_sgi_nohang=3Dyes
 + else
 +@@ -2120,12 +2190,12 @@
 + echo "$ac_t""$have_sgi_nohang" 1>&6
 +=20
 + echo $ac_n "checking for _daemonize""... $ac_c" 1>&6
 +-echo "configure:2124: checking for _daemonize" >&5
 ++echo "configure:2194: checking for _daemonize" >&5
 + if eval "test \"`echo '$''{'ac_cv_func__daemonize'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2129 "configure"
 ++#line 2199 "configure"
 + #include "confdefs.h"
 + /* System header to define __stub macros and hopefully few prototypes,
 +     which can conflict with char _daemonize(); below.  */
 +@@ -2151,7 +2221,7 @@
 +=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5;=
  } && test -s conftest${ac_exeext}; then
 ++if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5;=
  } && test -s conftest${ac_exeext}; then
 +   rm -rf conftest*
 +   eval "ac_cv_func__daemonize=3Dyes"
 + else
 +@@ -2179,7 +2249,7 @@
 +=20
 +=20
 + echo $ac_n "checking getgrmember""... $ac_c" 1>&6
 +-echo "configure:2183: checking getgrmember" >&5
 ++echo "configure:2253: checking getgrmember" >&5
 + if eval "test \"`echo '$''{'fam_cv_have_getgrmember'+set}'`\" =3D set"; t=
 hen
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -2187,7 +2257,7 @@
 +   fam_cv_have_getgrmember=3Dno
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2191 "configure"
 ++#line 2261 "configure"
 + #include "confdefs.h"
 + #ifdef __cplusplus
 + extern "C" void exit(int);
 +@@ -2197,7 +2267,7 @@
 + int main(void) { getgrmember(NULL, NULL, 0, 0); return 0; }
 +=20
 + EOF
 +-if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5;=
  } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 ++if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5;=
  } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 + then
 +   fam_cv_have_getgrmember=3Dyes
 + else
 +@@ -2230,19 +2300,19 @@
 +=20
 +=20
 + echo $ac_n "checking for stat.st_fstype string""... $ac_c" 1>&6
 +-echo "configure:2234: checking for stat.st_fstype string" >&5
 ++echo "configure:2304: checking for stat.st_fstype string" >&5
 + if eval "test \"`echo '$''{'fam_cv_stat_st_fstype_is_string'+set}'`\" =3D=
  set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2239 "configure"
 ++#line 2309 "configure"
 + #include "confdefs.h"
 + #include <sys/stat.h>
 + int main() {
 + struct stat st; char *s =3D st.st_fstype;=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:2246: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 ++if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +   rm -rf conftest*
 +   fam_cv_stat_st_fstype_is_string=3Dyes
 + else
 +@@ -2268,19 +2338,19 @@
 + fi
 +=20
 + echo $ac_n "checking for stat.st_ctim.tv_nsec (nanoseconds)""... $ac_c" 1=
 >&6
 +-echo "configure:2272: checking for stat.st_ctim.tv_nsec (nanoseconds)" >&5
 ++echo "configure:2342: checking for stat.st_ctim.tv_nsec (nanoseconds)" >&5
 + if eval "test \"`echo '$''{'fam_cv_stat_st_ctim_tv_nsec'+set}'`\" =3D set=
 "; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2277 "configure"
 ++#line 2347 "configure"
 + #include "confdefs.h"
 + #include <sys/stat.h>
 + int main() {
 + struct stat st; st.st_ctim.tv_nsec =3D 0;=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:2284: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 ++if { (eval echo configure:2354: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +   rm -rf conftest*
 +   fam_cv_stat_st_ctim_tv_nsec=3Dyes
 + else
 +@@ -2302,9 +2372,9 @@
 +=20
 +=20
 + echo $ac_n "checking for mountlist struct""... $ac_c" 1>&6
 +-echo "configure:2306: checking for mountlist struct" >&5
 ++echo "configure:2376: checking for mountlist struct" >&5
 + cat > conftest.$ac_ext <<EOF
 +-#line 2308 "configure"
 ++#line 2378 "configure"
 + #include "confdefs.h"
 +=20
 + typedef int fhandle_t;
 +@@ -2315,7 +2385,7 @@
 + mountlist ml; char *h =3D ml.ml_name;=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:2319: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 ++if { (eval echo configure:2389: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +   rm -rf conftest*
 +   have_mountlist_struct=3Dyes
 + else
 +@@ -2342,16 +2412,16 @@
 +=20
 +=20
 +     echo $ac_n "checking for mountlist pointer""... $ac_c" 1>&6
 +-echo "configure:2346: checking for mountlist pointer" >&5
 ++echo "configure:2416: checking for mountlist pointer" >&5
 +     cat > conftest.$ac_ext <<EOF
 +-#line 2348 "configure"
 ++#line 2418 "configure"
 + #include "confdefs.h"
 + #include <rpcsvc/mount.h>
 + int main() {
 + mountlist ml; char *h =3D ml->ml_hostname;=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:2355: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 ++if { (eval echo configure:2425: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +   rm -rf conftest*
 +   have_mountlist_ptr=3Dyes
 + else
 +@@ -2382,141 +2452,20 @@
 +=20
 +=20
 +=20
 +-    echo $ac_n "checking mntent.h for MNTTYPE_NFS""... $ac_c" 1>&6
 +-echo "configure:2387: checking mntent.h for MNTTYPE_NFS" >&5
 +-    cat > conftest.$ac_ext <<EOF
 +-#line 2389 "configure"
 +-#include "confdefs.h"
 +-#include <mntent.h>
 +-int main() {
 +-const char *foo =3D MNTTYPE_NFS;
 +-; return 0; }
 +-EOF
 +-if { (eval echo configure:2396: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +-  rm -rf conftest*
 +-  fam_have_decl_in_mntent=3Dyes
 +-else
 +-  echo "configure: failed program was:" >&5
 +-  cat conftest.$ac_ext >&5
 +-  rm -rf conftest*
 +-  fam_have_decl_in_mntent=3Dno
 +-fi
 +-rm -f conftest*
 +-    echo "$ac_t""$fam_have_decl_in_mntent" 1>&6
 +-    if test "$fam_have_decl_in_mntent" =3D "yes"; then
 +-	:
 +-    else=09
 +-	{ echo "configure: error: Didn't find MNTTYPE_NFS in mntent.h" 1>&2; exi=
 t 1; }
 +-    fi
 +-
 +-
 +-    echo $ac_n "checking mntent.h for MNTTYPE_NFS2""... $ac_c" 1>&6
 +-echo "configure:2415: checking mntent.h for MNTTYPE_NFS2" >&5
 +-    cat > conftest.$ac_ext <<EOF
 +-#line 2417 "configure"
 +-#include "confdefs.h"
 +-#include <mntent.h>
 +-int main() {
 +-const char *foo =3D MNTTYPE_NFS2;
 +-; return 0; }
 +-EOF
 +-if { (eval echo configure:2424: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +-  rm -rf conftest*
 +-  fam_have_decl_in_mntent=3Dyes
 +-else
 +-  echo "configure: failed program was:" >&5
 +-  cat conftest.$ac_ext >&5
 +-  rm -rf conftest*
 +-  fam_have_decl_in_mntent=3Dno
 +-fi
 +-rm -f conftest*
 +-    echo "$ac_t""$fam_have_decl_in_mntent" 1>&6
 +-    if test "$fam_have_decl_in_mntent" =3D "yes"; then
 +-	cat >> confdefs.h <<\EOF
 +-#define HAVE_MNTTYPE_NFS2 1
 +-EOF
 +-
 +-    else=09
 +-	:
 +-    fi
 +-
 +-
 +-    echo $ac_n "checking mntent.h for MNTTYPE_NFS3""... $ac_c" 1>&6
 +-echo "configure:2446: checking mntent.h for MNTTYPE_NFS3" >&5
 +-    cat > conftest.$ac_ext <<EOF
 +-#line 2448 "configure"
 +-#include "confdefs.h"
 +-#include <mntent.h>
 +-int main() {
 +-const char *foo =3D MNTTYPE_NFS3;
 +-; return 0; }
 +-EOF
 +-if { (eval echo configure:2455: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +-  rm -rf conftest*
 +-  fam_have_decl_in_mntent=3Dyes
 +-else
 +-  echo "configure: failed program was:" >&5
 +-  cat conftest.$ac_ext >&5
 +-  rm -rf conftest*
 +-  fam_have_decl_in_mntent=3Dno
 +-fi
 +-rm -f conftest*
 +-    echo "$ac_t""$fam_have_decl_in_mntent" 1>&6
 +-    if test "$fam_have_decl_in_mntent" =3D "yes"; then
 +-	cat >> confdefs.h <<\EOF
 +-#define HAVE_MNTTYPE_NFS3 1
 +-EOF
 +-
 +-    else=09
 +-	:
 +-    fi
 +-
 +-
 +-    echo $ac_n "checking mntent.h for MNTTYPE_CACHEFS""... $ac_c" 1>&6
 +-echo "configure:2477: checking mntent.h for MNTTYPE_CACHEFS" >&5
 +-    cat > conftest.$ac_ext <<EOF
 +-#line 2479 "configure"
 +-#include "confdefs.h"
 +-#include <mntent.h>
 +-int main() {
 +-const char *foo =3D MNTTYPE_CACHEFS;
 +-; return 0; }
 +-EOF
 +-if { (eval echo configure:2486: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +-  rm -rf conftest*
 +-  fam_have_decl_in_mntent=3Dyes
 +-else
 +-  echo "configure: failed program was:" >&5
 +-  cat conftest.$ac_ext >&5
 +-  rm -rf conftest*
 +-  fam_have_decl_in_mntent=3Dno
 +-fi
 +-rm -f conftest*
 +-    echo "$ac_t""$fam_have_decl_in_mntent" 1>&6
 +-    if test "$fam_have_decl_in_mntent" =3D "yes"; then
 +-	cat >> confdefs.h <<\EOF
 +-#define HAVE_MNTTYPE_CACHEFS 1
 +-EOF
 +-
 +-    else=09
 +-	:
 +-    fi
 +-
 +-
 + echo $ac_n "checking netinet/in.h for bindresvport()""... $ac_c" 1>&6
 +-echo "configure:2508: checking netinet/in.h for bindresvport()" >&5
 ++echo "configure:2457: checking netinet/in.h for bindresvport()" >&5
 + if eval "test \"`echo '$''{'fam_cv_bindresvport_in_in_h'+set}'`\" =3D set=
 "; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2513 "configure"
 ++#line 2462 "configure"
 + #include "confdefs.h"
 + #include <netinet/in.h>
 + int main() {
 + int p =3D 0; struct sockaddr_in s; bindresvport(p, &s);=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:2520: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 ++if { (eval echo configure:2469: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +   rm -rf conftest*
 +   fam_cv_bindresvport_in_in_h=3Dyes
 + else
 +@@ -2542,19 +2491,19 @@
 + fi
 +=20
 + echo $ac_n "checking for prmap_sgi_t""... $ac_c" 1>&6
 +-echo "configure:2546: checking for prmap_sgi_t" >&5
 ++echo "configure:2495: checking for prmap_sgi_t" >&5
 + if eval "test \"`echo '$''{'fam_cv_have_prmap_sgi_t'+set}'`\" =3D set"; t=
 hen
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2551 "configure"
 ++#line 2500 "configure"
 + #include "confdefs.h"
 + #include <sys/procfs.h>
 + int main() {
 + prmap_sgi_t f; f.pr_lockcnt =3D 0;=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:2558: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 ++if { (eval echo configure:2507: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +   rm -rf conftest*
 +   fam_cv_have_prmap_sgi_t=3Dyes
 + else
 +@@ -2580,12 +2529,12 @@
 + fi
 +=20
 + echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
 +-echo "configure:2584: checking for socklen_t" >&5
 ++echo "configure:2533: checking for socklen_t" >&5
 + if eval "test \"`echo '$''{'fam_cv_have_socklen_t'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2589 "configure"
 ++#line 2538 "configure"
 + #include "confdefs.h"
 + #include <sys/types.h>
 + #include <sys/socket.h>
 +@@ -2593,7 +2542,7 @@
 + socklen_t len; struct sockaddr s; accept(0, &s, &len);=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:2597: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 ++if { (eval echo configure:2546: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +   rm -rf conftest*
 +   fam_cv_have_socklen_t=3Dyes
 + else
 +@@ -2619,19 +2568,19 @@
 + fi
 +=20
 + echo $ac_n "checking for built-in bool""... $ac_c" 1>&6
 +-echo "configure:2623: checking for built-in bool" >&5
 ++echo "configure:2572: checking for built-in bool" >&5
 + if eval "test \"`echo '$''{'fam_cv_have_bool'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2628 "configure"
 ++#line 2577 "configure"
 + #include "confdefs.h"
 +=20
 + int main() {
 + bool foo =3D true; if(foo) foo =3D false;=20
 + ; return 0; }
 + EOF
 +-if { (eval echo configure:2635: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 ++if { (eval echo configure:2584: \"$ac_compile\") 1>&5; (eval $ac_compile)=
  2>&5; }; then
 +   rm -rf conftest*
 +   fam_cv_have_bool=3Dyes
 + else
 +@@ -2658,7 +2607,7 @@
 +=20
 +=20
 + echo $ac_n "checking for C++ namespace support""... $ac_c" 1>&6
 +-echo "configure:2662: checking for C++ namespace support" >&5
 ++echo "configure:2611: checking for C++ namespace support" >&5
 + if eval "test \"`echo '$''{'fam_cv_have_namespace'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -2666,14 +2615,14 @@
 +   fam_cv_have_namespace=3Dno
 + else
 +   cat > conftest.$ac_ext <<EOF
 +-#line 2670 "configure"
 ++#line 2619 "configure"
 + #include "confdefs.h"
 + #ifdef __cplusplus
 + extern "C" void exit(int);
 + #endif
 + namespace foo { int bar(void) { return 0; } } int main(void) { return foo=
 ::bar(); }=20
 + EOF
 +-if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5;=
  } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 ++if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5;=
  } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 + then
 +   fam_cv_have_namespace=3Dyes
 + else
 +@@ -2714,7 +2663,7 @@
 + # Extract the first word of "echo", so it can be a program name with args.
 + set dummy echo; ac_word=3D$2
 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 +-echo "configure:2718: checking for $ac_word" >&5
 ++echo "configure:2667: checking for $ac_word" >&5
 + if eval "test \"`echo '$''{'ac_cv_path_ECHO'+set}'`\" =3D set"; then
 +   echo $ac_n "(cached) $ac_c" 1>&6
 + else
 +@@ -2747,7 +2696,7 @@
 + fi
 +=20
 + echo $ac_n "checking for echo -e flag""... $ac_c" 1>&6
 +-echo "configure:2751: checking for echo -e flag" >&5
 ++echo "configure:2700: checking for echo -e flag" >&5
 + if test "`$ECHO -e foo`" =3D 'foo'; then
 +     ECHO=3D"$ECHO -e"
 + fi
 +@@ -2872,19 +2821,14 @@
 + ac_given_INSTALL=3D"$INSTALL"
 +=20
 + trap 'rm -fr `echo "Makefile=20
 +-    build/Makefile
 +-    build/rpm/Makefile
 +-    build/rpm/rpm.spec
 +     fam/Makefile
 +     fam/fam.conf
 +     include/Makefile
 +     libfam/Makefile
 +     man/Makefile
 +-    man/fam.1m
 ++    man/fam.8
 +     support/Makefile
 +     test/Makefile
 +-    util/Makefile
 +-    util/editconf/Makefile
 +  config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 + EOF
 + cat >> $CONFIG_STATUS <<EOF
 +@@ -2928,11 +2872,13 @@
 + s%@AUTOHEADER@%$AUTOHEADER%g
 + s%@MAKEINFO@%$MAKEINFO%g
 + s%@SET_MAKE@%$SET_MAKE%g
 ++s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
 ++s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
 ++s%@MAINT@%$MAINT%g
 + s%@FAMPROTOINC@%$FAMPROTOINC%g
 + s%@FAM_CONF@%$FAM_CONF%g
 + s%@CXX@%$CXX%g
 + s%@CXXCPP@%$CXXCPP%g
 +-s%@RANLIB@%$RANLIB%g
 + s%@host@%$host%g
 + s%@host_alias@%$host_alias%g
 + s%@host_cpu@%$host_cpu%g
 +@@ -2943,6 +2889,7 @@
 + s%@build_cpu@%$build_cpu%g
 + s%@build_vendor@%$build_vendor%g
 + s%@build_os@%$build_os%g
 ++s%@RANLIB@%$RANLIB%g
 + s%@CC@%$CC%g
 + s%@LN_S@%$LN_S%g
 + s%@LIBTOOL@%$LIBTOOL%g
 +@@ -2995,19 +2942,14 @@
 + cat >> $CONFIG_STATUS <<EOF
 +=20
 + CONFIG_FILES=3D\${CONFIG_FILES-"Makefile=20
 +-    build/Makefile
 +-    build/rpm/Makefile
 +-    build/rpm/rpm.spec
 +     fam/Makefile
 +     fam/fam.conf
 +     include/Makefile
 +     libfam/Makefile
 +     man/Makefile
 +-    man/fam.1m
 ++    man/fam.8
 +     support/Makefile
 +     test/Makefile
 +-    util/Makefile
 +-    util/editconf/Makefile
 + "}
 + EOF
 + cat >> $CONFIG_STATUS <<\EOF
 +@@ -3186,7 +3128,7 @@
 + test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
 +=20
 + if test `uname` =3D 'IRIX' || test `uname` =3D 'IRIX64'; then
 +-    TMPFILE=3Dconfigure.tmp
 ++    TMPFILE=3Dconfigure.temp
 +     for f in $CONFIG_FILES; do
 +         if test `basename $f` !=3D 'Makefile'; then
 + #            echo "skipping        $f"
 +@@ -3205,7 +3147,7 @@
 + fi
 +=20
 +=20
 +-    TMPFILE=3Dconfigure.tmp
 ++    TMPFILE=3Dconfigure.temp
 +     for f in $CONFIG_FILES; do
 +         if test `basename $f` !=3D 'fam.conf'; then
 +             continue
 +@@ -3221,9 +3163,9 @@
 +     done
 +=20
 +=20
 +-    TMPFILE=3Dconfigure.tmp
 ++    TMPFILE=3Dconfigure.temp
 +     for f in $CONFIG_FILES; do
 +-        if test `basename $f` !=3D 'fam.1m'; then
 ++        if test `basename $f` !=3D 'fam.8'; then
 +             continue
 +         fi
 +         echo "replacing XXX_FAM_CONF with $FAM_CONF and removing maintain=
 er comments in $f"
 +@@ -3250,7 +3192,7 @@
 + test "$no_create" =3D yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || ex=
 it 1
 +=20
 +=20
 +-if test "$have_imon" !=3D 'yes'; then
 ++if test `uname` =3D Linux && "$have_imon" !=3D 'yes'; then
 +     cat << EOF
 +=20
 +   ******************************************************************
 Index: files/patch-fam::Client.h
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::Client.h
 diff -N files/patch-fam::Client.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Client.h	16 Dec 2001 00:34:15 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- fam/Client.h.orig	Fri May 19 23:46:31 2000
 ++++ fam/Client.h	Sun Oct  7 15:22:17 2001
 +@@ -23,6 +23,7 @@
 + #ifndef Client_included
 + #define Client_included
 +=20
 ++#include <sys/types.h>
 + #include <netinet/in.h>  // for in_addr
 +=20
 + #include "Activity.h"
 Index: files/patch-fam::Directory.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::Directory.c++
 diff -N files/patch-fam::Directory.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Directory.c++	17 Dec 2001 00:08:54 -0000
 @@ -0,0 +1,16 @@
 +
 +$FreeBSD$
 +
 +--- fam/Directory.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Directory.c++	Sun Dec 16 18:06:34 2001
 +@@ -26,7 +26,9 @@
 + #include <errno.h>
 + #include <string.h>
 + #include <stdio.h>
 +-#include <sys/dir.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/dir.h>
 ++#endif
 + #include <sys/stat.h>
 + #include <sys/wait.h>
 + #include <unistd.h>
 Index: files/patch-fam::DirectoryScanner.h
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::DirectoryScanner.h
 diff -N files/patch-fam::DirectoryScanner.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::DirectoryScanner.h	17 Dec 2001 00:09:02 -0000
 @@ -0,0 +1,19 @@
 +
 +$FreeBSD$
 +
 +--- fam/DirectoryScanner.h.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/DirectoryScanner.h	Sun Dec 16 18:07:45 2001
 +@@ -27,7 +27,12 @@
 +=20
 + #include <stddef.h>
 + #include <sys/types.h>
 +-#include <sys/dir.h>
 ++#if defined(__FreeBSD__)
 ++#  include <dirent.h>
 ++#  define direct dirent
 ++#else
 ++#  include <sys/dir.h>
 ++#endif
 +=20
 + #include "Event.h"
 +=20
 Index: files/patch-fam::FileSystem.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::FileSystem.c++
 diff -N files/patch-fam::FileSystem.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::FileSystem.c++	16 Dec 2001 00:34:31 -0000
 @@ -0,0 +1,14 @@
 +
 +$FreeBSD$
 +
 +--- fam/FileSystem.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/FileSystem.c++	Sun Oct  7 15:22:17 2001
 +@@ -22,7 +22,7 @@
 +=20
 + #include "FileSystem.h"
 +=20
 +-#include <mntent.h>
 ++#include "mntent.h"
 + #include <string.h>
 +=20
 + #include "Event.h"
 Index: files/patch-fam::FileSystemTable.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::FileSystemTable.c++
 diff -N files/patch-fam::FileSystemTable.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::FileSystemTable.c++	16 Dec 2001 00:34:49 -0000
 @@ -0,0 +1,28 @@
 +
 +$FreeBSD$
 +
 +--- fam/FileSystemTable.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/FileSystemTable.c++	Sun Oct  7 15:22:17 2001
 +@@ -21,9 +21,10 @@
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 +=20
 + #include <stddef.h>
 ++#include <stdio.h>
 + #include "FileSystemTable.h"
 +=20
 +-#include <mntent.h>
 ++#include "mntent.h"
 + #include <stdlib.h>
 + #include <string.h>
 +=20
 +@@ -255,7 +256,10 @@
 +     //  create_fs_by_name initializes our "root" member variable.
 +     if (!fs_by_name)
 +     {   create_fs_by_name();
 ++#if !defined(__FreeBSD__)
 ++	/* there is no mtab "file" in freebsd! */
 + 	mtab_watcher =3D new InternalClient(mtab_name, mtab_event_handler, NULL);
 ++#endif
 +     }
 +=20
 +     cr.become_user();
 Index: files/patch-fam::IMon.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::IMon.c++
 diff -N files/patch-fam::IMon.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::IMon.c++	16 Dec 2001 00:35:04 -0000
 @@ -0,0 +1,16 @@
 +
 +$FreeBSD$
 +
 +--- fam/IMon.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/IMon.c++	Sun Oct  7 15:22:17 2001
 +@@ -34,7 +34,9 @@
 + #endif
 + #endif
 +=20
 +-#include <sys/sysmacros.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/sysmacros.h>
 ++#endif
 + #include <unistd.h>
 +=20
 + #include "Interest.h"
 Index: files/patch-fam::Interest.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::Interest.c++
 diff -N files/patch-fam::Interest.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Interest.c++	20 Dec 2001 13:24:30 -0000
 @@ -0,0 +1,16 @@
 +
 +$FreeBSD$
 +
 +--- fam/Interest.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Interest.c++	Fri Dec 14 17:40:52 2001
 +@@ -25,7 +25,9 @@
 + #include <string.h>
 + #include <errno.h>
 + #include <sys/param.h>
 +-#include <sys/sysmacros.h>
 ++#if !defined(__FreeBSD__)
 ++#  include <sys/sysmacros.h>
 ++#endif
 +=20
 + #ifdef HAVE_IRIX_XTAB_VERIFICATION
 + #include <stdio.h>
 Index: files/patch-fam::InternalClient.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::InternalClient.c++
 diff -N files/patch-fam::InternalClient.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::InternalClient.c++	16 Dec 2001 00:36:27 -0000
 @@ -0,0 +1,15 @@
 +
 +$FreeBSD$
 +
 +--- fam/InternalClient.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/InternalClient.c++	Sun Oct  7 15:22:17 2001
 +@@ -35,8 +35,8 @@
 + {
 +     assert(filename);
 +     assert(h);
 +-    assert(filename[0] =3D=3D '/');
 +     Log::debug("%s watching %s", name(), filename);
 ++    assert(filename[0] =3D=3D '/');
 +     interest =3D new File(filename, this, Request(0), Cred::SuperUser);
 + }
 +=20
 Index: files/patch-fam::Listener.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::Listener.c++
 diff -N files/patch-fam::Listener.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Listener.c++	16 Dec 2001 00:36:40 -0000
 @@ -0,0 +1,59 @@
 +
 +$FreeBSD$
 +
 +--- fam/Listener.c++.orig	Mon Oct 22 01:33:10 2001
 ++++ fam/Listener.c++	Fri Nov 23 09:52:14 2001
 +@@ -22,6 +22,8 @@
 +=20
 + #include "Listener.h"
 +=20
 ++#include <stdio.h>
 ++#include <stdlib.h>
 + #include <assert.h>
 + #include <fcntl.h>
 + #include <sys/types.h>
 +@@ -205,7 +207,11 @@
 +     unsetenv("TMPDIR");
 +=20
 +     char *tmpfile =3D tempnam("/tmp", ".fam");
 ++#if defined(__FreeBSD__)
 ++    sockaddr_un sun =3D { sizeof(sockaddr_un), AF_UNIX, "" };
 ++#else
 +     sockaddr_un sun =3D { AF_UNIX, "" };
 ++#endif
 +     if(strlen(tmpfile) >=3D (sizeof(sun.sun_path) - 1))
 +     {
 +         Log::error("tmpnam() too long for sun_path (%d >=3D %d)!",
 +@@ -239,7 +245,7 @@
 +         return;
 +     }
 +=20
 +-    if (chown(sun.sun_path, uid, -1) !=3D 0)
 ++    if (chown(sun.sun_path, uid, (gid_t)-1) !=3D 0)
 +     {   Log::perror("localclient chown");
 + 	close(client_sock);
 +         return;
 +@@ -275,7 +281,11 @@
 +=20
 +     // Get the new socket.
 +=20
 ++#if defined(__FreeBSD__)
 ++    struct sockaddr_un sun =3D { sizeof(sockaddr_un), AF_UNIX, "" };
 ++#else
 +     struct sockaddr_un sun =3D { AF_UNIX, "" };
 ++#endif
 +     CONFIG_SOCKLEN_T sunlen =3D sizeof(sun);
 +     int client_fd =3D accept(ofd, (struct sockaddr *) &sun, &sunlen);
 +     if (client_fd < 0)
 +@@ -337,7 +347,11 @@
 + void
 + Listener::dirty_ugly_hack()
 + {
 ++#if defined(__FreeBSD__)
 ++    static sockaddr_un sun =3D { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fa=
 m_socket" };
 ++#else
 +     static sockaddr_un sun =3D { AF_UNIX, "/tmp/.fam_socket" };
 ++#endif
 +=20
 +     int sock =3D socket(PF_UNIX, SOCK_STREAM, 0);
 +     if (sock < 0)
 Index: files/patch-fam::Log.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::Log.c++
 diff -N files/patch-fam::Log.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Log.c++	16 Dec 2001 00:36:53 -0000
 @@ -0,0 +1,14 @@
 +
 +$FreeBSD$
 +
 +--- fam/Log.c++.orig	Fri May 19 23:46:31 2000
 ++++ fam/Log.c++	Sun Oct  7 15:22:17 2001
 +@@ -28,6 +28,8 @@
 + #include <stdlib.h>
 + #include <string.h>
 + #include <syslog.h>
 ++#include <sys/time.h>
 ++#include <sys/types.h>
 + #include <sys/resource.h>
 + #include <sys/stat.h>
 + #include <unistd.h>
 Index: files/patch-fam::Makefile.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::Makefile.in
 diff -N files/patch-fam::Makefile.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Makefile.in	20 Dec 2001 13:39:35 -0000
 @@ -0,0 +1,224 @@
 +
 +$FreeBSD$
 +
 +--- fam/Makefile.in.orig	Wed Dec 19 20:41:09 2001
 ++++ fam/Makefile.in	Thu Dec 20 07:30:58 2001
 +@@ -1,6 +1,6 @@
 +-# Makefile.in generated automatically by automake 1.4 from Makefile.am
 ++# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 +=20
 +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 + # This Makefile.in is free software; the Free Software Foundation
 + # gives unlimited permission to copy and/or distribute it,
 + # with or without modifications, as long as this notice is preserved.
 +@@ -14,6 +14,9 @@
 + #  Since we're not always using gcc, we don't want to use dependency
 + #  tracking.  (It croaks non-GNU compilers.)  Seems like this should be
 + #  configurable through autoconf!
 ++#AUTOMAKE_OPTIONS=3Dno-dependencies
 ++
 ++#  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 +=20
 +=20
 + SHELL =3D @SHELL@
 +@@ -76,6 +79,7 @@
 + LDCONFIG =3D @LDCONFIG@
 + LIBTOOL =3D @LIBTOOL@
 + LN_S =3D @LN_S@
 ++MAINT =3D @MAINT@
 + MAKEINFO =3D @MAKEINFO@
 + MKDEPFILE =3D @MKDEPFILE@
 + OBJDUMP =3D @OBJDUMP@
 +@@ -86,9 +90,6 @@
 + foo_o =3D @foo_o@
 + snprintf_o =3D @snprintf_o@
 +=20
 +-AUTOMAKE_OPTIONS =3D no-dependencies
 +-
 +-#  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 + INCLUDES =3D @FAMPROTOINC@ -DCONFIG_ETC_CONFIG_PATH=3D\"@FAM_CONF@\"
 +=20
 + #  should this be set by the configure script?
 +@@ -96,21 +97,21 @@
 +=20
 + uninstallscriptdir =3D $(pkglibdir)
 +=20
 +-bin_PROGRAMS =3D fam
 +-sysconf_DATA =3D fam.conf
 ++CLEANFILES =3D  @MKDEPFILE@ ii_files/*.ii
 ++
 ++sbin_PROGRAMS =3D fam
 ++sysconf_DATA =3D fam.conf.sample
 +=20
 +-fam_SOURCES =3D    Activity.c++   Activity.h   Client.c++   Client.h   Cl=
 ientConnection.c++   ClientConnection.h   ClientInterest.c++   ClientIntere=
 st.h   Cred.c++   Cred.h   DirEntry.c++   DirEntry.h   Directory.c++   Dire=
 ctory.h   DirectoryScanner.c++   DirectoryScanner.h   Event.c++   Event.h  =
  File.c++   File.h   FileSystem.c++   FileSystem.h   FileSystemTable.c++   =
 FileSystemTable.h   IMon.c++   IMon.h   Interest.c++   Interest.h   Interna=
 lClient.c++   InternalClient.h   Listener.c++   Listener.h   LocalClient.c+=
 +   LocalClient.h   LocalFileSystem.c++   LocalFileSystem.h   Log.c++   Log=
 .h   MxClient.c++   MxClient.h   NFSFileSystem.c++   NFSFileSystem.h   NetC=
 onnection.c++   NetConnection.h   Pollster.c++   Pollster.h   Request.h   R=
 equestMap.h   RPC_TCP_Connector.c++   RPC_TCP_Connector.h   Scanner.c++   S=
 canner.h   Scheduler.c++   Scheduler.h   ServerConnection.c++   ServerConne=
 ction.h   ServerHost.c++   ServerHost.h   ServerHostRef.c++   ServerHostRef=
 .h   Set.h   SmallTable.h   StringTable.h   TCP_Client.c++   TCP_Client.h  =
  main.c++   timeval.c++   timeval.h   @IMON_FUNCS@.c++
 ++fam_SOURCES =3D    Activity.c++   Activity.h   Client.c++   Client.h   Cl=
 ientConnection.c++   ClientConnection.h   ClientInterest.c++   ClientIntere=
 st.h   Cred.c++   Cred.h   DirEntry.c++   DirEntry.h   Directory.c++   Dire=
 ctory.h   DirectoryScanner.c++   DirectoryScanner.h   Event.c++   Event.h  =
  File.c++   File.h   FileSystem.c++   FileSystem.h   FileSystemTable.c++   =
 FileSystemTable.h   IMon.c++   IMon.h   Interest.c++   Interest.h   Interna=
 lClient.c++   InternalClient.h   Listener.c++   Listener.h   LocalClient.c+=
 +   LocalClient.h   LocalFileSystem.c++   LocalFileSystem.h   Log.c++   Log=
 .h   MxClient.c++   MxClient.h   NFSFileSystem.c++   NFSFileSystem.h   NetC=
 onnection.c++   NetConnection.h   Pollster.c++   Pollster.h   Request.h   R=
 equestMap.h   RPC_TCP_Connector.c++   RPC_TCP_Connector.h   Scanner.c++   S=
 canner.h   Scheduler.c++   Scheduler.h   ServerConnection.c++   ServerConne=
 ction.h   ServerHost.c++   ServerHost.h   ServerHostRef.c++   ServerHostRef=
 .h   Set.h   SmallTable.h   StringTable.h   TCP_Client.c++   TCP_Client.h  =
  main.c++   timeval.c++   timeval.h   mntent_compat.c++   @IMON_FUNCS@.c++
 +=20
 +=20
 + EXTRA_fam_SOURCES =3D IMonIrix.c++ IMonLinux.c++ IMonNone.c++
 +=20
 + fam_LDADD =3D -lrpcsvc $(top_srcdir)/support/libsupport.a
 +-
 +-CLEANFILES =3D  @MKDEPFILE@ ii_files/*.ii
 + mkinstalldirs =3D $(SHELL) $(top_srcdir)/mkinstalldirs
 + CONFIG_HEADER =3D ../config.h
 + CONFIG_CLEAN_FILES =3D  fam.conf
 +-PROGRAMS =3D  $(bin_PROGRAMS)
 ++PROGRAMS =3D  $(sbin_PROGRAMS)
 +=20
 +=20
 + DEFS =3D @DEFS@ -I. -I$(srcdir) -I..
 +@@ -123,7 +124,7 @@
 + Listener.o LocalClient.o LocalFileSystem.o Log.o MxClient.o \
 + NFSFileSystem.o NetConnection.o Pollster.o RPC_TCP_Connector.o \
 + Scanner.o Scheduler.o ServerConnection.o ServerHost.o ServerHostRef.o \
 +-TCP_Client.o main.o timeval.o @IMON_FUNCS@.o
 ++TCP_Client.o main.o timeval.o mntent_compat.o @IMON_FUNCS@.o
 + fam_DEPENDENCIES =3D  $(top_srcdir)/support/libsupport.a
 + fam_LDFLAGS =3D=20
 + CXXFLAGS =3D @CXXFLAGS@
 +@@ -150,8 +151,8 @@
 + all: all-redirect
 + .SUFFIXES:
 + .SUFFIXES: .S .c .c++ .lo .o .s
 +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M=
 4) $(top_srcdir)/common.am
 +-	cd $(top_srcdir) && $(AUTOMAKE) --gnu fam/Makefile
 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/c=
 onfigure.in $(ACLOCAL_M4) $(top_srcdir)/common.am
 ++	cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps fam/Makefile
 +=20
 + Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
 + 	cd $(top_builddir) \
 +@@ -160,29 +161,29 @@
 + fam.conf: $(top_builddir)/config.status fam.conf.in
 + 	cd $(top_builddir) && CONFIG_FILES=3D$(subdir)/$@ CONFIG_HEADERS=3D $(SH=
 ELL) ./config.status
 +=20
 +-mostlyclean-binPROGRAMS:
 ++mostlyclean-sbinPROGRAMS:
 +=20
 +-clean-binPROGRAMS:
 +-	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 ++clean-sbinPROGRAMS:
 ++	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
 +=20
 +-distclean-binPROGRAMS:
 ++distclean-sbinPROGRAMS:
 +=20
 +-maintainer-clean-binPROGRAMS:
 ++maintainer-clean-sbinPROGRAMS:
 +=20
 +-install-binPROGRAMS: $(bin_PROGRAMS)
 ++install-sbinPROGRAMS: $(sbin_PROGRAMS)
 + 	@$(NORMAL_INSTALL)
 +-	$(mkinstalldirs) $(DESTDIR)$(bindir)
 +-	@list=3D'$(bin_PROGRAMS)'; for p in $$list; do \
 ++	$(mkinstalldirs) $(DESTDIR)$(sbindir)
 ++	@list=3D'$(sbin_PROGRAMS)'; for p in $$list; do \
 + 	  if test -f $$p; then \
 +-	    echo " $(LIBTOOL)  --mode=3Dinstall $(INSTALL_PROGRAM) $$p $(DESTDIR=
 )$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(E=
 XEEXT)/'`"; \
 +-	    $(LIBTOOL)  --mode=3Dinstall $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bind=
 ir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/=
 '`; \
 ++	    echo " $(LIBTOOL)  --mode=3Dinstall $(INSTALL_PROGRAM) $$p $(DESTDIR=
 )$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(=
 EXEEXT)/'`"; \
 ++	    $(LIBTOOL)  --mode=3Dinstall $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbin=
 dir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)=
 /'`; \
 + 	  else :; fi; \
 + 	done
 +=20
 +-uninstall-binPROGRAMS:
 ++uninstall-sbinPROGRAMS:
 + 	@$(NORMAL_UNINSTALL)
 +-	list=3D'$(bin_PROGRAMS)'; for p in $$list; do \
 +-	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(trans=
 form)'|sed 's/$$/$(EXEEXT)/'`; \
 ++	list=3D'$(sbin_PROGRAMS)'; for p in $$list; do \
 ++	  rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(tran=
 sform)'|sed 's/$$/$(EXEEXT)/'`; \
 + 	done
 +=20
 + .c.o:
 +@@ -302,7 +303,7 @@
 + check: check-am
 + installcheck-am:
 + installcheck: installcheck-am
 +-install-exec-am: install-binPROGRAMS install-sysconfDATA
 ++install-exec-am: install-sbinPROGRAMS install-sysconfDATA
 + install-exec: install-exec-am
 +=20
 + install-data-am:
 +@@ -311,14 +312,14 @@
 + install-am: all-am
 + 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 + install: install-am
 +-uninstall-am: uninstall-binPROGRAMS uninstall-sysconfDATA
 ++uninstall-am: uninstall-sbinPROGRAMS uninstall-sysconfDATA
 + uninstall: uninstall-am
 + all-am: Makefile $(PROGRAMS) $(DATA)
 + all-redirect: all-am
 + install-strip:
 + 	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=3D-s install
 + installdirs:
 +-	$(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir)
 ++	$(mkinstalldirs)  $(DESTDIR)$(sbindir) $(DESTDIR)$(sysconfdir)
 +=20
 +=20
 + mostlyclean-generic:
 +@@ -331,24 +332,25 @@
 + 	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
 +=20
 + maintainer-clean-generic:
 +-mostlyclean-am:  mostlyclean-binPROGRAMS mostlyclean-compile \
 ++mostlyclean-am:  mostlyclean-sbinPROGRAMS mostlyclean-compile \
 + 		mostlyclean-libtool mostlyclean-tags \
 + 		mostlyclean-generic
 +=20
 + mostlyclean: mostlyclean-am
 +=20
 +-clean-am:  clean-binPROGRAMS clean-compile clean-libtool clean-tags \
 ++clean-am:  clean-sbinPROGRAMS clean-compile clean-libtool clean-tags \
 + 		clean-generic mostlyclean-am
 +=20
 + clean: clean-am
 +=20
 +-distclean-am:  distclean-binPROGRAMS distclean-compile distclean-libtool \
 +-		distclean-tags distclean-generic clean-am
 ++distclean-am:  distclean-sbinPROGRAMS distclean-compile \
 ++		distclean-libtool distclean-tags distclean-generic \
 ++		clean-am
 + 	-rm -f libtool
 +=20
 + distclean: distclean-am
 +=20
 +-maintainer-clean-am:  maintainer-clean-binPROGRAMS \
 ++maintainer-clean-am:  maintainer-clean-sbinPROGRAMS \
 + 		maintainer-clean-compile maintainer-clean-libtool \
 + 		maintainer-clean-tags maintainer-clean-generic \
 + 		distclean-am
 +@@ -357,20 +359,20 @@
 +=20
 + maintainer-clean: maintainer-clean-am
 +=20
 +-.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
 +-maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
 +-mostlyclean-compile distclean-compile clean-compile \
 +-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
 +-clean-libtool maintainer-clean-libtool uninstall-sysconfDATA \
 +-install-sysconfDATA tags mostlyclean-tags distclean-tags clean-tags \
 +-maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
 +-installcheck-am installcheck install-exec-am install-exec \
 +-install-data-am install-data install-am install uninstall-am uninstall \
 +-all-redirect all-am all installdirs mostlyclean-generic \
 +-distclean-generic clean-generic maintainer-clean-generic clean \
 +-mostlyclean distclean maintainer-clean
 ++.PHONY: mostlyclean-sbinPROGRAMS distclean-sbinPROGRAMS \
 ++clean-sbinPROGRAMS maintainer-clean-sbinPROGRAMS uninstall-sbinPROGRAMS \
 ++install-sbinPROGRAMS mostlyclean-compile distclean-compile \
 ++clean-compile maintainer-clean-compile mostlyclean-libtool \
 ++distclean-libtool clean-libtool maintainer-clean-libtool \
 ++uninstall-sysconfDATA install-sysconfDATA tags mostlyclean-tags \
 ++distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
 ++dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
 ++install-exec install-data-am install-data install-am install \
 ++uninstall-am uninstall all-redirect all-am all installdirs \
 ++mostlyclean-generic distclean-generic clean-generic \
 ++maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 +=20
 +-sinclude @MKDEPFILE@
 ++#sinclude @MKDEPFILE@
 +=20
 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
 + # Otherwise a system limit (for SysV at least) may be exceeded.
 Index: files/patch-fam::Scheduler.h
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::Scheduler.h
 diff -N files/patch-fam::Scheduler.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::Scheduler.h	16 Dec 2001 00:37:41 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- fam/Scheduler.h.orig	Fri May 19 23:46:32 2000
 ++++ fam/Scheduler.h	Sun Oct  7 15:22:17 2001
 +@@ -24,6 +24,7 @@
 + #define Scheduler_included
 +=20
 + #include <sys/time.h>
 ++#include <string.h>
 +=20
 + #include "Boolean.h"
 +=20
 Index: files/patch-fam::StringTable.h
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::StringTable.h
 diff -N files/patch-fam::StringTable.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::StringTable.h	16 Dec 2001 00:37:55 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- fam/StringTable.h.orig	Fri May 19 23:46:32 2000
 ++++ fam/StringTable.h	Sun Oct  7 15:22:17 2001
 +@@ -25,6 +25,7 @@
 +=20
 + #include <assert.h>
 + #include <string.h>
 ++#include "mntent.h"
 +=20
 + //  A StringTable maps C strings onto values.  It is a cheap O(n)
 + //  implementation, suitable only for small tables that are
 Index: files/patch-fam::fam.conf.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::fam.conf.in
 diff -N files/patch-fam::fam.conf.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::fam.conf.in	17 Dec 2001 03:39:54 -0000
 @@ -0,0 +1,33 @@
 +
 +$FreeBSD$
 +
 +--- fam/fam.conf.in.orig	Mon Oct 22 01:33:11 2001
 ++++ fam/fam.conf.in	Sun Dec 16 21:37:47 2001
 +@@ -6,7 +6,7 @@
 + #  fam.conf
 + #
 + #  For more information on the configuration options below, see the
 +-#  fam(1M) man page.
 ++#  fam(8) man page.
 +=20
 + #
 + #  insecure_compatibility disables authentication.  This causes
 +@@ -38,6 +38,18 @@
 + #  exported to the hosts.
 + #
 + xtab_verification =3D true
 ++
 ++#
 ++#  idle_timeout sets the number of seconds fam will wait for new
 ++#  connections before quitting.  A value of zero will cause fam to
 ++#  wait indefinitely.  This will be overridden by the command-line option
 ++#  -T.  The default is 5
 ++idle_timeout =3D 5
 ++
 ++#
 ++#  Set the interval for polling files to nfs_polling_interval seconds.
 ++#  The default is 6 seconds.  Overridden by -t.
 ++nfs_polling_interval =3D 6
 +=20
 + ##  This is removed because the HAVE_MAC and HAVE_AUDIT stuff is not done.
 + ###
 Index: files/patch-fam::main.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::main.c++
 diff -N files/patch-fam::main.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::main.c++	20 Dec 2001 13:26:44 -0000
 @@ -0,0 +1,55 @@
 +
 +$FreeBSD$
 +
 +--- fam/main.c++.orig	Mon Oct 22 01:33:11 2001
 ++++ fam/main.c++	Sun Dec 16 21:37:47 2001
 +@@ -64,6 +64,8 @@
 + #define CFG_LOCAL_ONLY "local_only"
 + #define CFG_XTAB_VERIFICATION "xtab_verification"
 + #define CFG_UNTRUSTED_USER "untrusted_user"
 ++#define CFG_IDLE_TIMEOUT "idle_timeout"
 ++#define CFG_NFS_POLLING_INTERVAL "nfs_polling_interval"
 + static void parse_config(config_opts &opts);
 + static void parse_config_line(config_opts &opts, int line,
 +                               const char *k, const char *v);
 +@@ -339,6 +341,9 @@
 + static void
 + parse_config_line(config_opts &opts, int lineno, const char *key, const c=
 har *val)
 + {
 ++    char* p;
 ++    int secs;
 ++
 +     if(!strcmp(key, CFG_UNTRUSTED_USER))
 +     {
 +         if (!opts.untrusted_user) opts.untrusted_user =3D strdup(val);
 +@@ -359,6 +364,30 @@
 +                        CFG_INSECURE_COMPAT " is set",
 +                        opts.config_file, lineno, key);
 +         }
 ++    }
 ++    else if(!strcmp(key, CFG_IDLE_TIMEOUT))
 ++    {
 ++        secs =3D strtoul(val, &p, 10);
 ++        if (*p)
 ++	{ =20
 ++  	    Log::error("config file %s line %d: value for %s "=20
 ++		       "must be an integer.  Ignoring.",
 ++		       opts.config_file, lineno, key);
 ++	}
 ++	else=20
 ++	{
 ++	    opts.activity_timeout =3D secs;
 ++	}
 ++    }
 ++    else if(!strcmp(key, CFG_NFS_POLLING_INTERVAL))
 ++    {
 ++        secs =3D strtoul(val, &p, 10);
 ++        if (*p || secs =3D=3D 0)
 ++  	    Log::error("config file %s line %d: value for %s "=20
 ++		       "must be a non-zero integer.  Ignoring.",
 ++		       opts.config_file, lineno, key);
 ++	else
 ++	    opts.pollster_interval =3D secs;
 +     }
 +     else if(!strcmp(key, CFG_INSECURE_COMPAT))
 +     {
 Index: files/patch-fam::mntent.h
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::mntent.h
 diff -N files/patch-fam::mntent.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::mntent.h	16 Dec 2001 00:38:24 -0000
 @@ -0,0 +1,62 @@
 +
 +$FreeBSD$
 +
 +--- fam/mntent.h.orig	Sun Oct  7 15:22:17 2001
 ++++ fam/mntent.h	Sun Oct  7 15:22:17 2001
 +@@ -0,0 +1,56 @@
 ++/*
 ++ *  mntent
 ++ *  mntent.h - compatability header for FreeBSD
 ++ *
 ++ *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
 ++ *  All rights reserved.
 ++ *
 ++ * 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.
 ++ *
 ++ * 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 PUR=
 POSE
 ++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIAB=
 LE
 ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUEN=
 TIAL
 ++ * 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, ST=
 RICT
 ++ * 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.
 ++ */
 ++
 ++#if defined(HAVE_MNTENT_H)
 ++#include <mntent.h>
 ++#else
 ++#ifndef _MNTENT_H
 ++#define _MNTENT_H
 ++#include <stdio.h>
 ++
 ++#define MOUNTED "dummy"
 ++
 ++#define MNTTYPE_NFS "nfs"
 ++
 ++struct mntent {
 ++	char *mnt_fsname;
 ++	char *mnt_dir;
 ++	char *mnt_type;
 ++	char *mnt_opts;
 ++	int mnt_freq;
 ++	int mnt_passno;
 ++};
 ++
 ++#define setmntent(x,y) ((FILE *)0x1)
 ++struct mntent *getmntent __P ((FILE *fp));
 ++char *hasmntopt __P ((const struct mntent *mnt, const char *option));
 ++#define endmntent(x) ((int)1)
 ++
 ++#endif /* _MNTENT_H */
 ++#endif /* HAVE_MNTENT_H */
 Index: files/patch-fam::mntent_compat.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-fam::mntent_compat.c++
 diff -N files/patch-fam::mntent_compat.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-fam::mntent_compat.c++	16 Dec 2001 00:38:39 -0000
 @@ -0,0 +1,157 @@
 +
 +$FreeBSD$
 +
 +--- fam/mntent_compat.c++.orig	Sun Oct  7 15:22:17 2001
 ++++ fam/mntent_compat.c++	Sun Oct  7 15:22:17 2001
 +@@ -0,0 +1,151 @@
 ++/*
 ++ * Copyright (c) 1980, 1989, 1993, 1994
 ++ *      The Regents of the University of California.  All rights reserved.
 ++ * Copyright (c) 2001
 ++ *      David Rufino <daverufino@btinternet.com>
 ++ *
 ++ * 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 softwa=
 re
 ++ *    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 softwa=
 re
 ++ *    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 PUR=
 POSE
 ++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIAB=
 LE
 ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUEN=
 TIAL
 ++ * 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, ST=
 RICT
 ++ * 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 <stdlib.h>
 ++#include <string.h>
 ++#include <sys/param.h>
 ++#include <sys/ucred.h>
 ++#include <sys/mount.h>
 ++
 ++static int pos =3D -1;
 ++static int mntsize =3D -1;
 ++static struct mntent _mntent;
 ++
 ++char *
 ++hasmntopt (const struct mntent *mnt, const char *option)
 ++{
 ++        int found;
 ++        char *opt, *optbuf;
 ++
 ++        optbuf =3D strdup(mnt->mnt_opts);
 ++        found =3D 0;
 ++        for (opt =3D optbuf; (opt =3D strtok(opt, " ")) !=3D NULL; opt =
 =3D NULL) {
 ++                if (!strcasecmp(opt, option)) {
 ++			opt =3D 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 =3D=3D NULL || *s1 =3D=3D '\0')
 ++                return s0;
 ++        if (s0 && *s0) {
 ++                i =3D strlen(s0) + strlen(s1) + 1 + 1;
 ++                if ((cp =3D (char *)malloc(i)) =3D=3D NULL)
 ++			return (NULL);
 ++                (void)snprintf(cp, i, "%s %s", s0, s1);
 ++        } else
 ++                cp =3D strdup(s1);
 ++
 ++        if (s0)
 ++                free(s0);
 ++        return (cp);
 ++}
 ++
 ++
 ++static char *
 ++flags2opts (int flags)
 ++{
 ++        char *res;
 ++        res =3D NULL;
 ++        res =3D catopt(res, (flags & MNT_RDONLY) ? "ro" : "rw");
 ++        if (flags & MNT_SYNCHRONOUS)    res =3D catopt(res, "sync");
 ++        if (flags & MNT_NOEXEC)         res =3D catopt(res, "noexec");
 ++        if (flags & MNT_NOSUID)         res =3D catopt(res, "nosuid");
 ++        if (flags & MNT_NODEV)          res =3D catopt(res, "nodev");
 ++        if (flags & MNT_UNION)          res =3D catopt(res, "union");
 ++        if (flags & MNT_ASYNC)          res =3D catopt(res, "async");
 ++        if (flags & MNT_NOATIME)        res =3D catopt(res, "noatime");
 ++        if (flags & MNT_NOCLUSTERR)     res =3D catopt(res, "noclusterr");
 ++        if (flags & MNT_NOCLUSTERW)     res =3D catopt(res, "noclusterw");
 ++        if (flags & MNT_NOSYMFOLLOW)    res =3D catopt(res, "nosymfollow"=
 );
 ++        if (flags & MNT_SUIDDIR)        res =3D catopt(res, "suiddir");
 ++
 ++        return res;
 ++}
 ++
 ++static struct mntent *
 ++statfs_to_mntent (struct statfs *mntbuf)
 ++{
 ++	static char opts_buf[40], *tmp;
 ++=09
 ++	_mntent.mnt_fsname =3D mntbuf->f_mntfromname;
 ++	_mntent.mnt_dir =3D mntbuf->f_mntonname;
 ++	_mntent.mnt_type =3D mntbuf->f_fstypename;
 ++	tmp =3D flags2opts (mntbuf->f_flags);
 ++	if (tmp) {
 ++		opts_buf[sizeof(opts_buf)-1] =3D '\0';
 ++		strncpy (opts_buf, tmp, sizeof(opts_buf)-1);
 ++		free (tmp);
 ++	} else {
 ++		*opts_buf =3D '\0';
 ++	}
 ++	_mntent.mnt_opts =3D opts_buf;=09
 ++	_mntent.mnt_freq =3D _mntent.mnt_passno =3D 0;
 ++	return (&_mntent);
 ++}
 ++
 ++struct mntent *
 ++getmntent (FILE *fp)
 ++{
 ++	struct statfs *mntbuf;
 ++
 ++	if (pos =3D=3D -1 || mntsize =3D=3D -1)
 ++		mntsize =3D getmntinfo (&mntbuf, MNT_NOWAIT);
 ++
 ++	++pos;
 ++	if (pos =3D=3D mntsize) {
 ++		pos =3D mntsize =3D -1;
 ++		return (NULL);
 ++	}
 ++
 ++	return (statfs_to_mntent (&mntbuf[pos]));
 ++}
 ++
 ++#endif /* HAVE_MNTENT_H */
 Index: files/patch-freebsd
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-freebsd
 diff -N files/patch-freebsd
 --- files/patch-freebsd	31 Mar 2001 02:45:55 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,490 +0,0 @@
 -diff -urN fam-oss-2.6.4/config.h.in fam-oss-2.6.4-freebsd/config.h.in
 ---- fam-oss-2.6.4/config.h.in	Sat May 20 05:50:17 2000
 -+++ fam-oss-2.6.4-freebsd/config.h.in	Sun Mar 18 00:02:38 2001
 -@@ -12,6 +12,8 @@
 - /*  Define if the system has imon and IMONIOC_ ioctl flags.  */
 - #undef HAVE_IMON
 -=20
 -+#undef HAVE_MNTENT_H
 -+
 - /*  Define if the system has the struct revokdi and the IMONIOC_REVOKDI
 - **  ioctl flag.  (IRIX 5.3 doesn't.)
 - */
 -diff -urN fam-oss-2.6.4/configure.in fam-oss-2.6.4-freebsd/configure.in
 ---- fam-oss-2.6.4/configure.in	Sat May 20 06:23:17 2000
 -+++ fam-oss-2.6.4-freebsd/configure.in	Sun Mar 18 00:36:29 2001
 -@@ -95,6 +95,8 @@
 - dnl AC_HEADER_SYS_WAIT
 - dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
 -=20
 -+AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
 -+
 - dnl
 - dnl  See if imon is available; if so, is it IRIX or Linux?
 - dnl
 -@@ -299,10 +301,10 @@
 - dnl If we don't have MNTTYPE_NFS , we croak.
 - dnl
 -=20
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in =
 mntent.h))
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 --FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 --FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS=
  in mntent.h))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
 -+dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
 -=20
 - dnl
 - dnl  Test for bindresvport() prototype.
 -diff -urN fam-oss-2.6.4/fam/Client.h fam-oss-2.6.4-freebsd/fam/Client.h
 ---- fam-oss-2.6.4/fam/Client.h	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Client.h	Sat Mar 17 00:14:35 2001
 -@@ -23,6 +23,7 @@
 - #ifndef Client_included
 - #define Client_included
 -=20
 -+#include <sys/types.h>
 - #include <netinet/in.h>  // for in_addr
 -=20
 - #include "Activity.h"
 -diff -urN fam-oss-2.6.4/fam/FileSystem.c++ fam-oss-2.6.4-freebsd/fam/FileS=
 ystem.c++
 ---- fam-oss-2.6.4/fam/FileSystem.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++	Sat Mar 17 13:18:10 2001
 -@@ -22,7 +22,7 @@
 -=20
 - #include "FileSystem.h"
 -=20
 --#include <mntent.h>
 -+#include "mntent.h"
 - #include <string.h>
 -=20
 - #include "Event.h"
 -diff -urN fam-oss-2.6.4/fam/FileSystemTable.c++ fam-oss-2.6.4-freebsd/fam/=
 FileSystemTable.c++
 ---- fam-oss-2.6.4/fam/FileSystemTable.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++	Sat Mar 17 23:44:17 2001
 -@@ -21,9 +21,10 @@
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 -=20
 - #include <stddef.h>
 -+#include <stdio.h>
 - #include "FileSystemTable.h"
 -=20
 --#include <mntent.h>
 -+#include "mntent.h"
 - #include <stdlib.h>
 - #include <string.h>
 -=20
 -@@ -255,7 +256,10 @@
 -     //  create_fs_by_name initializes our "root" member variable.
 -     if (!fs_by_name)
 -     {   create_fs_by_name();
 -+#if !defined(__FreeBSD__)
 -+	/* there is no mtab "file" in freebsd! */
 - 	mtab_watcher =3D new InternalClient(mtab_name, mtab_event_handler, NULL);
 -+#endif
 -     }
 -=20
 -     cr.become_user();
 -diff -urN fam-oss-2.6.4/fam/IMon.c++ fam-oss-2.6.4-freebsd/fam/IMon.c++
 ---- fam-oss-2.6.4/fam/IMon.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/IMon.c++	Sat Mar 17 14:06:17 2001
 -@@ -34,7 +34,9 @@
 - #endif
 - #endif
 -=20
 --#include <sys/sysmacros.h>
 -+#if !defined(__FreeBSD__)
 -+#  include <sys/sysmacros.h>
 -+#endif
 - #include <unistd.h>
 -=20
 - #include "Interest.h"
 -diff -urN fam-oss-2.6.4/fam/Interest.c++ fam-oss-2.6.4-freebsd/fam/Interes=
 t.c++
 ---- fam-oss-2.6.4/fam/Interest.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Interest.c++	Sat Mar 17 14:06:37 2001
 -@@ -25,7 +25,9 @@
 - #include <string.h>
 - #include <errno.h>
 - #include <sys/param.h>
 --#include <sys/sysmacros.h>
 -+#if !defined(__FreeBSD__)
 -+#  include <sys/sysmacros.h>
 -+#endif
 -=20
 - #ifdef HAVE_IRIX_XTAB_VERIFICATION
 - #include <stdio.h>
 -diff -urN fam-oss-2.6.4/fam/InternalClient.c++ fam-oss-2.6.4-freebsd/fam/I=
 nternalClient.c++
 ---- fam-oss-2.6.4/fam/InternalClient.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++	Sat Mar 17 23:20:15 2001
 -@@ -35,8 +35,8 @@
 - {
 -     assert(filename);
 -     assert(h);
 --    assert(filename[0] =3D=3D '/');
 -     Log::debug("%s watching %s", name(), filename);
 -+    assert(filename[0] =3D=3D '/');
 -     interest =3D new File(filename, this, Request(0), Cred::SuperUser);
 - }
 -=20
 -diff -urN fam-oss-2.6.4/fam/Listener.c++ fam-oss-2.6.4-freebsd/fam/Listene=
 r.c++
 ---- fam-oss-2.6.4/fam/Listener.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Listener.c++	Sat Mar 17 14:12:57 2001
 -@@ -22,6 +22,8 @@
 -=20
 - #include "Listener.h"
 -=20
 -+#include <stdio.h>
 -+#include <stdlib.h>
 - #include <assert.h>
 - #include <fcntl.h>
 - #include <sys/types.h>
 -@@ -202,7 +204,11 @@
 -     //  requested user and pass the name back to the client.
 -=20
 -     char *tmpfile =3D tempnam("/tmp", ".fam");
 -+#if defined(__FreeBSD__)
 -+    sockaddr_un sun =3D { sizeof(sockaddr_un), AF_UNIX, "" };
 -+#else
 -     sockaddr_un sun =3D { AF_UNIX, "" };
 -+#endif
 -     if(strlen(tmpfile) >=3D (sizeof(sun.sun_path) - 1))
 -     {
 -         Log::error("tmpnam() too long for sun_path (%d >=3D %d)!",
 -@@ -235,7 +241,7 @@
 -         return;
 -     }
 -=20
 --    if (chown(sun.sun_path, uid, -1) !=3D 0)
 -+    if (chown(sun.sun_path, uid, (gid_t)-1) !=3D 0)
 -     {   Log::perror("localclient chown");
 - 	close(client_sock);
 -         return;
 -@@ -271,7 +277,11 @@
 -=20
 -     // Get the new socket.
 -=20
 -+#if defined(__FreeBSD__)
 -+    struct sockaddr_un sun =3D { sizeof(sockaddr_un), AF_UNIX, "" };
 -+#else
 -     struct sockaddr_un sun =3D { AF_UNIX, "" };
 -+#endif
 -     CONFIG_SOCKLEN_T sunlen =3D sizeof(sun);
 -     int client_fd =3D accept(ofd, (struct sockaddr *) &sun, &sunlen);
 -     if (client_fd < 0)
 -@@ -333,7 +343,11 @@
 - void
 - Listener::dirty_ugly_hack()
 - {
 -+#if defined(__FreeBSD__)
 -+    static sockaddr_un sun =3D { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fa=
 m_socket" };
 -+#else
 -     static sockaddr_un sun =3D { AF_UNIX, "/tmp/.fam_socket" };
 -+#endif
 -=20
 -     int sock =3D socket(PF_UNIX, SOCK_STREAM, 0);
 -     if (sock < 0)
 -diff -urN fam-oss-2.6.4/fam/Log.c++ fam-oss-2.6.4-freebsd/fam/Log.c++
 ---- fam-oss-2.6.4/fam/Log.c++	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Log.c++	Sat Mar 17 14:14:31 2001
 -@@ -28,6 +28,8 @@
 - #include <stdlib.h>
 - #include <string.h>
 - #include <syslog.h>
 -+#include <sys/time.h>
 -+#include <sys/types.h>
 - #include <sys/resource.h>
 - #include <sys/stat.h>
 - #include <unistd.h>
 -diff -urN fam-oss-2.6.4/fam/Makefile.am fam-oss-2.6.4-freebsd/fam/Makefile=
 .am
 ---- fam-oss-2.6.4/fam/Makefile.am	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Makefile.am	Sat Mar 17 18:12:17 2001
 -@@ -72,6 +72,7 @@
 -   main.c++ \
 -   timeval.c++ \
 -   timeval.h \
 -+  mntent_compat.c++ \
 -   @IMON_FUNCS@.c++
 -=20
 - EXTRA_fam_SOURCES =3D IMonIrix.c++ IMonLinux.c++ IMonNone.c++
 -diff -urN fam-oss-2.6.4/fam/Scheduler.h fam-oss-2.6.4-freebsd/fam/Schedule=
 r.h
 ---- fam-oss-2.6.4/fam/Scheduler.h	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/fam/Scheduler.h	Sat Mar 17 00:14:04 2001
 -@@ -24,6 +24,7 @@
 - #define Scheduler_included
 -=20
 - #include <sys/time.h>
 -+#include <string.h>
 -=20
 - #include "Boolean.h"
 -=20
 -diff -urN fam-oss-2.6.4/fam/StringTable.h fam-oss-2.6.4-freebsd/fam/String=
 Table.h
 ---- fam-oss-2.6.4/fam/StringTable.h	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/fam/StringTable.h	Sat Mar 17 18:05:38 2001
 -@@ -25,6 +25,7 @@
 -=20
 - #include <assert.h>
 - #include <string.h>
 -+#include "mntent.h"
 -=20
 - //  A StringTable maps C strings onto values.  It is a cheap O(n)
 - //  implementation, suitable only for small tables that are
 -diff -urN fam-oss-2.6.4/fam/mntent.h fam-oss-2.6.4-freebsd/fam/mntent.h
 ---- fam-oss-2.6.4/fam/mntent.h	Thu Jan  1 01:00:00 1970
 -+++ fam-oss-2.6.4-freebsd/fam/mntent.h	Sat Mar 17 18:11:08 2001
 -@@ -0,0 +1,56 @@
 -+/*
 -+ *  mntent
 -+ *  mntent.h - compatability header for FreeBSD
 -+ *
 -+ *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
 -+ *  All rights reserved.
 -+ *
 -+ * 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.
 -+ *
 -+ * 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 PUR=
 POSE
 -+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIAB=
 LE
 -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUEN=
 TIAL
 -+ * 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, ST=
 RICT
 -+ * 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.
 -+ */
 -+
 -+#if defined(HAVE_MNTENT_H)
 -+#include <mntent.h>
 -+#else
 -+#ifndef _MNTENT_H
 -+#define _MNTENT_H
 -+#include <stdio.h>
 -+
 -+#define MOUNTED "dummy"
 -+
 -+#define MNTTYPE_NFS "nfs"
 -+
 -+struct mntent {
 -+	char *mnt_fsname;
 -+	char *mnt_dir;
 -+	char *mnt_type;
 -+	char *mnt_opts;
 -+	int mnt_freq;
 -+	int mnt_passno;
 -+};
 -+
 -+#define setmntent(x,y) ((FILE *)0x1)
 -+struct mntent *getmntent __P ((FILE *fp));
 -+char *hasmntopt __P ((const struct mntent *mnt, const char *option));
 -+#define endmntent(x) ((int)1)
 -+
 -+#endif /* _MNTENT_H */
 -+#endif /* HAVE_MNTENT_H */
 -diff -urN fam-oss-2.6.4/fam/mntent_compat.c++ fam-oss-2.6.4-freebsd/fam/mn=
 tent_compat.c++
 ---- fam-oss-2.6.4/fam/mntent_compat.c++	Thu Jan  1 01:00:00 1970
 -+++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++	Sat Mar 17 23:48:07 2001
 -@@ -0,0 +1,151 @@
 -+/*
 -+ * Copyright (c) 1980, 1989, 1993, 1994
 -+ *      The Regents of the University of California.  All rights reserved.
 -+ * Copyright (c) 2001
 -+ *      David Rufino <daverufino@btinternet.com>
 -+ *
 -+ * 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 softwa=
 re
 -+ *    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 softwa=
 re
 -+ *    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 PUR=
 POSE
 -+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIAB=
 LE
 -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUEN=
 TIAL
 -+ * 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, ST=
 RICT
 -+ * 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 <stdlib.h>
 -+#include <string.h>
 -+#include <sys/param.h>
 -+#include <sys/ucred.h>
 -+#include <sys/mount.h>
 -+
 -+static int pos =3D -1;
 -+static int mntsize =3D -1;
 -+static struct mntent _mntent;
 -+
 -+char *
 -+hasmntopt (const struct mntent *mnt, const char *option)
 -+{
 -+        int found;
 -+        char *opt, *optbuf;
 -+
 -+        optbuf =3D strdup(mnt->mnt_opts);
 -+        found =3D 0;
 -+        for (opt =3D optbuf; (opt =3D strtok(opt, " ")) !=3D NULL; opt =
 =3D NULL) {
 -+                if (!strcasecmp(opt, option)) {
 -+			opt =3D 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 =3D=3D NULL || *s1 =3D=3D '\0')
 -+                return s0;
 -+        if (s0 && *s0) {
 -+                i =3D strlen(s0) + strlen(s1) + 1 + 1;
 -+                if ((cp =3D (char *)malloc(i)) =3D=3D NULL)
 -+			return (NULL);
 -+                (void)snprintf(cp, i, "%s %s", s0, s1);
 -+        } else
 -+                cp =3D strdup(s1);
 -+
 -+        if (s0)
 -+                free(s0);
 -+        return (cp);
 -+}
 -+
 -+
 -+static char *
 -+flags2opts (int flags)
 -+{
 -+        char *res;
 -+        res =3D NULL;
 -+        res =3D catopt(res, (flags & MNT_RDONLY) ? "ro" : "rw");
 -+        if (flags & MNT_SYNCHRONOUS)    res =3D catopt(res, "sync");
 -+        if (flags & MNT_NOEXEC)         res =3D catopt(res, "noexec");
 -+        if (flags & MNT_NOSUID)         res =3D catopt(res, "nosuid");
 -+        if (flags & MNT_NODEV)          res =3D catopt(res, "nodev");
 -+        if (flags & MNT_UNION)          res =3D catopt(res, "union");
 -+        if (flags & MNT_ASYNC)          res =3D catopt(res, "async");
 -+        if (flags & MNT_NOATIME)        res =3D catopt(res, "noatime");
 -+        if (flags & MNT_NOCLUSTERR)     res =3D catopt(res, "noclusterr");
 -+        if (flags & MNT_NOCLUSTERW)     res =3D catopt(res, "noclusterw");
 -+        if (flags & MNT_NOSYMFOLLOW)    res =3D catopt(res, "nosymfollow"=
 );
 -+        if (flags & MNT_SUIDDIR)        res =3D catopt(res, "suiddir");
 -+
 -+        return res;
 -+}
 -+
 -+static struct mntent *
 -+statfs_to_mntent (struct statfs *mntbuf)
 -+{
 -+	static char opts_buf[40], *tmp;
 -+=09
 -+	_mntent.mnt_fsname =3D mntbuf->f_mntfromname;
 -+	_mntent.mnt_dir =3D mntbuf->f_mntonname;
 -+	_mntent.mnt_type =3D mntbuf->f_fstypename;
 -+	tmp =3D flags2opts (mntbuf->f_flags);
 -+	if (tmp) {
 -+		opts_buf[sizeof(opts_buf)-1] =3D '\0';
 -+		strncpy (opts_buf, tmp, sizeof(opts_buf)-1);
 -+		free (tmp);
 -+	} else {
 -+		*opts_buf =3D '\0';
 -+	}
 -+	_mntent.mnt_opts =3D opts_buf;=09
 -+	_mntent.mnt_freq =3D _mntent.mnt_passno =3D 0;
 -+	return (&_mntent);
 -+}
 -+
 -+struct mntent *
 -+getmntent (FILE *fp)
 -+{
 -+	struct statfs *mntbuf;
 -+
 -+	if (pos =3D=3D -1 || mntsize =3D=3D -1)
 -+		mntsize =3D getmntinfo (&mntbuf, MNT_NOWAIT);
 -+
 -+	++pos;
 -+	if (pos =3D=3D mntsize) {
 -+		pos =3D mntsize =3D -1;
 -+		return (NULL);
 -+	}
 -+
 -+	return (statfs_to_mntent (&mntbuf[pos]));
 -+}
 -+
 -+#endif /* HAVE_MNTENT_H */
 -diff -urN fam-oss-2.6.4/libfam/Client.c++ fam-oss-2.6.4-freebsd/libfam/Cli=
 ent.c++
 ---- fam-oss-2.6.4/libfam/Client.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/libfam/Client.c++	Sat Mar 17 00:12:01 2001
 -@@ -20,6 +20,7 @@
 - //  with this program; if not, write the Free Software Foundation, Inc., =
 59
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 -=20
 -+#include <stdio.h>
 - #include <stdlib.h>
 - #include <unistd.h>
 - #include <netinet/in.h>
 -diff -urN fam-oss-2.6.4/libfam/fam.c++ fam-oss-2.6.4-freebsd/libfam/fam.c++
 ---- fam-oss-2.6.4/libfam/fam.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/libfam/fam.c++	Sat Mar 17 00:12:43 2001
 -@@ -21,6 +21,7 @@
 - //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 -=20
 - #include <sys/types.h>
 -+#include <rpc/rpc.h>
 - #include <sys/time.h>
 - #include <unistd.h>
 - #include <stdlib.h>
 -diff -urN fam-oss-2.6.4/test/test.c++ fam-oss-2.6.4-freebsd/test/test.c++
 ---- fam-oss-2.6.4/test/test.c++	Sat May 20 05:46:32 2000
 -+++ fam-oss-2.6.4-freebsd/test/test.c++	Sat Mar 17 18:39:23 2001
 -@@ -1,6 +1,7 @@
 - #include <sys/types.h>
 - #include <sys/time.h>
 - #include <stdio.h>
 -+#include <string.h>
 - #include <unistd.h>
 - #include <signal.h>
 - #include <errno.h>
 ---- fam-oss-2.6.4/acconfig.h	Sat May 20 05:46:31 2000
 -+++ fam-oss-2.6.4-freebsd/acconfig.h	Sun Mar 18 00:40:47 2001
 -@@ -44,6 +44,8 @@
 - **  Otherwise, we'll use MNTTYPE_NFS.  */
 - #undef HAVE_FSID_NFS2
 -=20
 -+#undef HAVE_MNTENT_H
 -+
 - /* Define if we have MNTTYPE_NFS2 */
 - #define HAVE_MNTTYPE_NFS2 0
 -=20
 Index: files/patch-include::Makefile.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-include::Makefile.in
 diff -N files/patch-include::Makefile.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-include::Makefile.in	20 Dec 2001 13:39:48 -0000
 @@ -0,0 +1,33 @@
 +
 +$FreeBSD$
 +
 +--- include/Makefile.in.orig	Wed Dec 19 20:41:48 2001
 ++++ include/Makefile.in	Thu Dec 20 07:30:58 2001
 +@@ -1,6 +1,6 @@
 +-# Makefile.in generated automatically by automake 1.4 from Makefile.am
 ++# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 +=20
 +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 + # This Makefile.in is free software; the Free Software Foundation
 + # gives unlimited permission to copy and/or distribute it,
 + # with or without modifications, as long as this notice is preserved.
 +@@ -71,6 +71,7 @@
 + LDCONFIG =3D @LDCONFIG@
 + LIBTOOL =3D @LIBTOOL@
 + LN_S =3D @LN_S@
 ++MAINT =3D @MAINT@
 + MAKEINFO =3D @MAKEINFO@
 + MKDEPFILE =3D @MKDEPFILE@
 + OBJDUMP =3D @OBJDUMP@
 +@@ -96,8 +97,8 @@
 + GZIP_ENV =3D --best
 + all: all-redirect
 + .SUFFIXES:
 +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M=
 4)=20
 +-	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps include/Makefile
 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/c=
 onfigure.in $(ACLOCAL_M4)=20
 ++	cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps include/Makefile
 +=20
 + Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
 + 	cd $(top_builddir) \
 Index: files/patch-libfam::Client.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-libfam::Client.c++
 diff -N files/patch-libfam::Client.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-libfam::Client.c++	16 Dec 2001 00:38:52 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- libfam/Client.c++.orig	Fri May 19 23:46:32 2000
 ++++ libfam/Client.c++	Sun Oct  7 15:22:17 2001
 +@@ -20,6 +20,7 @@
 + //  with this program; if not, write the Free Software Foundation, Inc., =
 59
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 +=20
 ++#include <stdio.h>
 + #include <stdlib.h>
 + #include <unistd.h>
 + #include <netinet/in.h>
 Index: files/patch-libfam::Makefile.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-libfam::Makefile.in
 diff -N files/patch-libfam::Makefile.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-libfam::Makefile.in	20 Dec 2001 13:39:59 -0000
 @@ -0,0 +1,71 @@
 +
 +$FreeBSD$
 +
 +--- libfam/Makefile.in.orig	Wed Dec 19 20:41:10 2001
 ++++ libfam/Makefile.in	Thu Dec 20 07:30:58 2001
 +@@ -1,6 +1,6 @@
 +-# Makefile.in generated automatically by automake 1.4 from Makefile.am
 ++# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 +=20
 +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 + # This Makefile.in is free software; the Free Software Foundation
 + # gives unlimited permission to copy and/or distribute it,
 + # with or without modifications, as long as this notice is preserved.
 +@@ -14,6 +14,9 @@
 + #  Since we're not always using gcc, we don't want to use dependency
 + #  tracking.  (It croaks non-GNU compilers.)  Seems like this should be
 + #  configurable through autoconf!
 ++#AUTOMAKE_OPTIONS=3Dno-dependencies
 ++
 ++#  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 +=20
 +=20
 + SHELL =3D @SHELL@
 +@@ -76,6 +79,7 @@
 + LDCONFIG =3D @LDCONFIG@
 + LIBTOOL =3D @LIBTOOL@
 + LN_S =3D @LN_S@
 ++MAINT =3D @MAINT@
 + MAKEINFO =3D @MAKEINFO@
 + MKDEPFILE =3D @MKDEPFILE@
 + OBJDUMP =3D @OBJDUMP@
 +@@ -86,9 +90,6 @@
 + foo_o =3D @foo_o@
 + snprintf_o =3D @snprintf_o@
 +=20
 +-AUTOMAKE_OPTIONS =3D no-dependencies
 +-
 +-#  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 + INCLUDES =3D @FAMPROTOINC@ -DCONFIG_ETC_CONFIG_PATH=3D\"@FAM_CONF@\"
 +=20
 + #  should this be set by the configure script?
 +@@ -96,6 +97,8 @@
 +=20
 + uninstallscriptdir =3D $(pkglibdir)
 +=20
 ++CLEANFILES =3D  ii_files/*.ii
 ++
 + lib_LTLIBRARIES =3D libfam.la
 +=20
 + libfam_la_SOURCES =3D    Client.c++   Client.h   fam.c++
 +@@ -104,8 +107,6 @@
 + libfam_la_LDFLAGS =3D -export-symbols fam.sym
 +=20
 + EXTRA_DIST =3D fam.sym
 +-
 +-CLEANFILES =3D  ii_files/*.ii
 + mkinstalldirs =3D $(SHELL) $(top_srcdir)/mkinstalldirs
 + CONFIG_HEADER =3D ../config.h
 + CONFIG_CLEAN_FILES =3D=20
 +@@ -140,8 +141,8 @@
 + all: all-redirect
 + .SUFFIXES:
 + .SUFFIXES: .S .c .c++ .lo .o .s
 +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M=
 4) $(top_srcdir)/common.am
 +-	cd $(top_srcdir) && $(AUTOMAKE) --gnu libfam/Makefile
 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/c=
 onfigure.in $(ACLOCAL_M4) $(top_srcdir)/common.am
 ++	cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps libfam/Makefile
 +=20
 + Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
 + 	cd $(top_builddir) \
 Index: files/patch-libfam::fam.c++
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-libfam::fam.c++
 diff -N files/patch-libfam::fam.c++
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-libfam::fam.c++	16 Dec 2001 00:39:05 -0000
 @@ -0,0 +1,13 @@
 +
 +$FreeBSD$
 +
 +--- libfam/fam.c++.orig	Fri May 19 23:46:32 2000
 ++++ libfam/fam.c++	Sun Oct  7 15:22:17 2001
 +@@ -21,6 +21,7 @@
 + //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
 +=20
 + #include <sys/types.h>
 ++#include <rpc/rpc.h>
 + #include <sys/time.h>
 + #include <unistd.h>
 + #include <stdlib.h>
 Index: files/patch-man::Makefile.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-man::Makefile.in
 diff -N files/patch-man::Makefile.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::Makefile.in	20 Dec 2001 13:40:09 -0000
 @@ -0,0 +1,187 @@
 +
 +$FreeBSD$
 +
 +--- man/Makefile.in.orig	Wed Dec 19 20:41:51 2001
 ++++ man/Makefile.in	Thu Dec 20 07:30:58 2001
 +@@ -1,6 +1,6 @@
 +-# Makefile.in generated automatically by automake 1.4 from Makefile.am
 ++# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 +=20
 +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 + # This Makefile.in is free software; the Free Software Foundation
 + # gives unlimited permission to copy and/or distribute it,
 + # with or without modifications, as long as this notice is preserved.
 +@@ -10,7 +10,7 @@
 + # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 + # PARTICULAR PURPOSE.
 +=20
 +-#  This is a little weird because fam.1m is generated from fam.1m.in
 ++#  This is a little weird because fam.8 is generated from fam.8.in
 + #  at the end of the configure script.
 +=20
 +=20
 +@@ -74,6 +74,7 @@
 + LDCONFIG =3D @LDCONFIG@
 + LIBTOOL =3D @LIBTOOL@
 + LN_S =3D @LN_S@
 ++MAINT =3D @MAINT@
 + MAKEINFO =3D @MAKEINFO@
 + MKDEPFILE =3D @MKDEPFILE@
 + OBJDUMP =3D @OBJDUMP@
 +@@ -84,18 +85,18 @@
 + foo_o =3D @foo_o@
 + snprintf_o =3D @snprintf_o@
 +=20
 +-man_MANS =3D fam.1m fam.3x
 +-EXTRA_DIST =3D fam.1m.in fam.3x
 +-CLEANFILES =3D fam.1m
 ++man_MANS =3D fam.8 fam.3
 ++EXTRA_DIST =3D fam.8.in fam.3
 ++CLEANFILES =3D fam.8
 + mkinstalldirs =3D $(SHELL) $(top_srcdir)/mkinstalldirs
 + CONFIG_HEADER =3D ../config.h
 +-CONFIG_CLEAN_FILES =3D  fam.1m
 +-man1dir =3D $(mandir)/man1
 ++CONFIG_CLEAN_FILES =3D  fam.8
 + man3dir =3D $(mandir)/man3
 ++man8dir =3D $(mandir)/man8
 + MANS =3D $(man_MANS)
 +=20
 + NROFF =3D nroff
 +-DIST_COMMON =3D  Makefile.am Makefile.in fam.1m.in
 ++DIST_COMMON =3D  Makefile.am Makefile.in fam.8.in
 +=20
 +=20
 + DISTFILES =3D $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DI=
 ST)
 +@@ -103,22 +104,22 @@
 + GZIP_ENV =3D --best
 + all: all-redirect
 + .SUFFIXES:
 +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M=
 4)=20
 +-	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps man/Makefile
 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/c=
 onfigure.in $(ACLOCAL_M4)=20
 ++	cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps man/Makefile
 +=20
 + Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
 + 	cd $(top_builddir) \
 + 	  && CONFIG_FILES=3D$(subdir)/$@ CONFIG_HEADERS=3D $(SHELL) ./config.sta=
 tus
 +=20
 +-fam.1m: $(top_builddir)/config.status fam.1m.in
 ++fam.8: $(top_builddir)/config.status fam.8.in
 + 	cd $(top_builddir) && CONFIG_FILES=3D$(subdir)/$@ CONFIG_HEADERS=3D $(SH=
 ELL) ./config.status
 +=20
 +-install-man1:
 +-	$(mkinstalldirs) $(DESTDIR)$(man1dir)
 +-	@list=3D'$(man1_MANS)'; \
 ++install-man3:
 ++	$(mkinstalldirs) $(DESTDIR)$(man3dir)
 ++	@list=3D'$(man3_MANS)'; \
 + 	l2=3D'$(man_MANS)'; for i in $$l2; do \
 + 	  case "$$i" in \
 +-	    *.1*) list=3D"$$list $$i" ;; \
 ++	    *.3*) list=3D"$$list $$i" ;; \
 + 	  esac; \
 + 	done; \
 + 	for i in $$list; do \
 +@@ -127,31 +128,31 @@
 + 	  ext=3D`echo $$i | sed -e 's/^.*\\.//'`; \
 + 	  inst=3D`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
 + 	  inst=3D`echo $$inst | sed '$(transform)'`.$$ext; \
 +-	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
 +-	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
 ++	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst"; \
 ++	  $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst; \
 + 	done
 +=20
 +-uninstall-man1:
 +-	@list=3D'$(man1_MANS)'; \
 ++uninstall-man3:
 ++	@list=3D'$(man3_MANS)'; \
 + 	l2=3D'$(man_MANS)'; for i in $$l2; do \
 + 	  case "$$i" in \
 +-	    *.1*) list=3D"$$list $$i" ;; \
 ++	    *.3*) list=3D"$$list $$i" ;; \
 + 	  esac; \
 + 	done; \
 + 	for i in $$list; do \
 + 	  ext=3D`echo $$i | sed -e 's/^.*\\.//'`; \
 + 	  inst=3D`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
 + 	  inst=3D`echo $$inst | sed '$(transform)'`.$$ext; \
 +-	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
 +-	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
 ++	  echo " rm -f $(DESTDIR)$(man3dir)/$$inst"; \
 ++	  rm -f $(DESTDIR)$(man3dir)/$$inst; \
 + 	done
 +=20
 +-install-man3:
 +-	$(mkinstalldirs) $(DESTDIR)$(man3dir)
 +-	@list=3D'$(man3_MANS)'; \
 ++install-man8:
 ++	$(mkinstalldirs) $(DESTDIR)$(man8dir)
 ++	@list=3D'$(man8_MANS)'; \
 + 	l2=3D'$(man_MANS)'; for i in $$l2; do \
 + 	  case "$$i" in \
 +-	    *.3*) list=3D"$$list $$i" ;; \
 ++	    *.8*) list=3D"$$list $$i" ;; \
 + 	  esac; \
 + 	done; \
 + 	for i in $$list; do \
 +@@ -160,30 +161,30 @@
 + 	  ext=3D`echo $$i | sed -e 's/^.*\\.//'`; \
 + 	  inst=3D`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
 + 	  inst=3D`echo $$inst | sed '$(transform)'`.$$ext; \
 +-	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst"; \
 +-	  $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst; \
 ++	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \
 ++	  $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
 + 	done
 +=20
 +-uninstall-man3:
 +-	@list=3D'$(man3_MANS)'; \
 ++uninstall-man8:
 ++	@list=3D'$(man8_MANS)'; \
 + 	l2=3D'$(man_MANS)'; for i in $$l2; do \
 + 	  case "$$i" in \
 +-	    *.3*) list=3D"$$list $$i" ;; \
 ++	    *.8*) list=3D"$$list $$i" ;; \
 + 	  esac; \
 + 	done; \
 + 	for i in $$list; do \
 + 	  ext=3D`echo $$i | sed -e 's/^.*\\.//'`; \
 + 	  inst=3D`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
 + 	  inst=3D`echo $$inst | sed '$(transform)'`.$$ext; \
 +-	  echo " rm -f $(DESTDIR)$(man3dir)/$$inst"; \
 +-	  rm -f $(DESTDIR)$(man3dir)/$$inst; \
 ++	  echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \
 ++	  rm -f $(DESTDIR)$(man8dir)/$$inst; \
 + 	done
 + install-man: $(MANS)
 + 	@$(NORMAL_INSTALL)
 +-	$(MAKE) $(AM_MAKEFLAGS) install-man1 install-man3
 ++	$(MAKE) $(AM_MAKEFLAGS) install-man3 install-man8
 + uninstall-man:
 + 	@$(NORMAL_UNINSTALL)
 +-	$(MAKE) $(AM_MAKEFLAGS) uninstall-man1 uninstall-man3
 ++	$(MAKE) $(AM_MAKEFLAGS) uninstall-man3 uninstall-man8
 + tags: TAGS
 + TAGS:
 +=20
 +@@ -227,7 +228,7 @@
 + install-strip:
 + 	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=3D-s install
 + installdirs:
 +-	$(mkinstalldirs)  $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man3
 ++	$(mkinstalldirs)  $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(mandir)/man8
 +=20
 +=20
 + mostlyclean-generic:
 +@@ -259,7 +260,7 @@
 +=20
 + maintainer-clean: maintainer-clean-am
 +=20
 +-.PHONY: install-man1 uninstall-man1 install-man3 uninstall-man3 \
 ++.PHONY: install-man3 uninstall-man3 install-man8 uninstall-man8 \
 + install-man uninstall-man tags distdir info-am info dvi-am dvi check \
 + check-am installcheck-am installcheck install-exec-am install-exec \
 + install-data-am install-data install-am install uninstall-am uninstall \
 Index: files/patch-man::fam.1m.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-man::fam.1m.in
 diff -N files/patch-man::fam.1m.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::fam.1m.in	17 Dec 2001 03:40:19 -0000
 @@ -0,0 +1,106 @@
 +
 +$FreeBSD$
 +
 +--- man/fam.1m.in.orig	Mon Oct 22 01:33:11 2001
 ++++ man/fam.1m.in	Sun Dec 16 21:37:47 2001
 +@@ -1,6 +1,6 @@
 +-.\"##  fam.1m.in
 ++.\"##  fam.8.in
 + .\"##
 +-.\"##  When configure.in generates fam.1m, lines starting with .\"##
 ++.\"##  When configure.in generates fam.8, lines starting with .\"##
 + .\"##  should be removed; when building on IRIX, lines starting with
 + .\"##  .\"IRIX should have that part removed (uncommenting the rest
 + .\"##  of the line).
 +@@ -9,13 +9,13 @@
 + .\"##  separate files.
 + .\"##
 + .nr X
 +-.if \nX=3D0 .ds x} fam 1M "Silicon Graphics" "\&"
 ++.if \nX=3D0 .ds x} fam 8 "Silicon Graphics" "\&"
 + .TH \*(x}
 + .SH NAME
 + fam \- file alteration monitor
 + .SH SYNOPSIS
 + .nf
 +-\f3/usr/etc/fam\f1 [ \f3\-f\f1 | \f3\-v\f1 | \f3\-d\f1 ] [ \f3\-l\f1 | \c
 ++\f3fam\f1 [ \f3\-f\f1 | \f3\-v\f1 | \f3\-d\f1 ] [ \f3\-l\f1 | \c
 + \f3\-t\f1 \f2NFS_polling_interval\f1 ]=20
 + 	[ \f3\-T\f1 \f2idle_timeout\f1 ] [ \f3\-p\f1 \c
 + \f2program\f3.\f2version\f1 ] [ \f3\-L\f1 ] [ \f3-C\f1 ]
 +@@ -24,22 +24,13 @@
 + .SH DESCRIPTION
 + \f2fam\f1 is a server that tracks changes to the filesystem and
 + relays these changes to interested applications.
 +-Applications such as
 +-\f2fm\f1(1G) and \f2mailbox\f1(1) present an up-to-date view of the files=
 ystem.
 +-In the absence of \f2fam\f1, these applications and others like them
 +-are forced to poll the filesystem to detect changes.
 +-\f2fam\f1 is
 +-more efficient.
 +-.P
 + Applications can request \f2fam\f1 to monitor any files or directories in
 + any filesystem.
 + When \f2fam\f1 detects changes to monitored files, it notifies
 + the appropriate application.
 + The FAM API provides a programmatic interface to \f2fam\f1; see
 +-.IR fam (3X).
 ++.IR fam (3).
 + .P
 +-\f2fam\f1 is informed of filesystem changes as they happen by the
 +-kernel through the \f2imon\f1(7M) pseudo device driver.
 + If asked to
 + monitor files on an NFS mounted filesystem, \f2fam\f1 tries to use
 + \f2fam\f1 on the NFS server to monitor files.
 +@@ -47,9 +38,9 @@
 + contact a remote \f2fam\f1, it polls the files instead.
 + \f2fam\f1 also polls special files.
 + .P
 +-Normally, \f2fam\f1 is started by \f2inetd\f1(1M).
 ++Normally, \f2fam\f1 is started by \f2inetd\f1(8).
 + It is registered with
 +-\f2portmap\f1(1M) as performing the sgi_fam service.
 ++\f2%%PORTMAP%%\f1(8) as performing the sgi_fam service.
 + .SH OPTIONS
 + .TP 26
 + \f3\-l\f1
 +@@ -131,6 +122,16 @@
 + service remote requests without attempting to perform the verification.  =
 If
 + the \f2local_only\f1 configuration option or \f3-L\f1 command-line option=
  is
 + used, \f2xtab_verification\f1 has no effect.
 ++.TP
 ++\f3idle_timeout\f1
 ++The number of seconds to wait for a new connection before
 ++quitting.  Setting this value to \f20\f1 will make fam wait
 ++indefinitely for new connections.  Can be overridden by the \f3-T\f1
 ++option.  Defaults to 5 seconds.
 ++.TP
 ++\f3nfs_polling_interval\f1
 ++The number of seconds between polling nfs servers.  This value can be
 ++overridden by the \f3-t\f1 command-line option.  Defaults to 5 seconds.
 + .\"##
 + .\"##  This stuff is removed because the MAC and SAT stuff isn't implemen=
 ted.
 + .\"##  If you put this back, add sysconf(1) to the SEE ALSO section.
 +@@ -166,8 +167,7 @@
 + \f2Note that fam never opens the files it's monitoring\f1, and cannot
 + be used by a rogue client to read the contents of any file on the system.
 + \f2fam\f1 only gives out the names of monitored files, and only monitors =
 files
 +-which the client can
 +-.IR stat (1M).
 ++which the client can stat.
 + Users can stat a file without having read permission on it as long as
 + they have search permission on the directory containing it.
 + .\"IRIX .SH COMPATIBILITY
 +@@ -196,9 +196,7 @@
 + XXX_FAM_CONF
 + .SH "SEE ALSO"
 + .\"IRIX fm(1G),
 +-inetd(1M),
 ++fam(3),
 ++inetd(8),
 + .\"IRIX mailbox(1),
 +-portmap(1M),
 +-fam(3X),
 +-imon(7M),
 +-stat(1M).
 ++%%PORTMAP%%(8).
 Index: files/patch-man::fam.3x
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-man::fam.3x
 diff -N files/patch-man::fam.3x
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-man::fam.3x	16 Dec 2001 00:39:55 -0000
 @@ -0,0 +1,41 @@
 +
 +$FreeBSD$
 +
 +--- man/fam.3x.orig	Mon Oct 22 01:33:11 2001
 ++++ man/fam.3x	Fri Nov 23 10:51:07 2001
 +@@ -1,9 +1,9 @@
 + '\"macro stdmacro
 +-.if n .pH g3x.fam @(#)fam	30.3 of 1/19/86
 ++.if n .pH g3.fam @(#)fam	30.3 of 1/19/86
 + .nr X
 +-.if \nX=3D0 .ds x} FAM 3X "Specialized Libraries" "\&"
 +-.if \nX=3D1 .ds x} FAM 3X "Specialized Libraries"
 +-.if \nX=3D2 .ds x} FAM 3X "" "\&"
 ++.if \nX=3D0 .ds x} FAM 3 "Specialized Libraries" "\&"
 ++.if \nX=3D1 .ds x} FAM 3 "Specialized Libraries"
 ++.if \nX=3D2 .ds x} FAM 3 "" "\&"
 + .if \nX=3D3 .ds x} FAM "" "" "\&"
 + .TH \*(x}
 + .SH NAME
 +@@ -65,10 +65,9 @@
 + .PP
 + .SH DESCRIPTION
 + \fIFAM\fP monitors files and directories, notifying interested
 +-applications of changes.  Routines for communicating with the fam(1M)
 ++applications of changes.  Routines for communicating with the fam(8)
 + server process are found in ``libfam.a'', which is loaded if the
 +-option ``-lfam'' is used with cc(1) or ld(1).  The library
 +-``libC.a'' (``-lC'') must also be specified.
 ++option ``-lfam'' is used with cc(1) or ld(1).
 + .PP
 + An application calls routines described here to establish a list of
 + files for \fIfam \fPto monitor.  \fIFam \fPgenerates events on a socket to
 +@@ -282,7 +281,7 @@
 +=20
 +=20
 + .SH SEE ALSO
 +-fam(1M).
 ++fam(8).
 + .SH BUGS
 + The FAMMoved event is not currently supported.
 + .PP
 Index: files/patch-support::Makefile.in
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: files/patch-support::Makefile.in
 diff -N files/patch-support::Makefile.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-support::Makefile.in	20 Dec 2001 13:40:17 -0000
 @@ -0,0 +1,80 @@
 +
 +$FreeBSD$
 +
 +--- support/Makefile.in.orig	Wed Dec 19 20:41:10 2001
 ++++ support/Makefile.in	Thu Dec 20 07:30:58 2001
 +@@ -1,6 +1,6 @@
 +-# Makefile.in generated automatically by automake 1.4 from Makefile.am
 ++# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 +=20
 +-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 ++# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 + # This Makefile.in is free software; the Free Software Foundation
 + # gives unlimited permission to copy and/or distribute it,
 + # with or without modifications, as long as this notice is preserved.
 +@@ -14,6 +14,9 @@
 + #  Since we're not always using gcc, we don't want to use dependency
 + #  tracking.  (It croaks non-GNU compilers.)  Seems like this should be
 + #  configurable through autoconf!
 ++#AUTOMAKE_OPTIONS=3Dno-dependencies
 ++
 ++#  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 +=20
 +=20
 + SHELL =3D @SHELL@
 +@@ -76,6 +79,7 @@
 + LDCONFIG =3D @LDCONFIG@
 + LIBTOOL =3D @LIBTOOL@
 + LN_S =3D @LN_S@
 ++MAINT =3D @MAINT@
 + MAKEINFO =3D @MAKEINFO@
 + MKDEPFILE =3D @MKDEPFILE@
 + OBJDUMP =3D @OBJDUMP@
 +@@ -86,9 +90,6 @@
 + foo_o =3D @foo_o@
 + snprintf_o =3D @snprintf_o@
 +=20
 +-AUTOMAKE_OPTIONS =3D no-dependencies
 +-
 +-#  why couldn't CONFIG_ETC_CONFIG_PATH be defined in config.h???
 + INCLUDES =3D @FAMPROTOINC@ -DCONFIG_ETC_CONFIG_PATH=3D\"@FAM_CONF@\"
 +=20
 + #  should this be set by the configure script?
 +@@ -96,6 +97,8 @@
 +=20
 + uninstallscriptdir =3D $(pkglibdir)
 +=20
 ++CLEANFILES =3D  @MKDEPFILE@ ii_files/*.ii
 ++
 + noinst_LIBRARIES =3D libsupport.a
 +=20
 + libsupport_a_SOURCES =3D dummy.c++
 +@@ -106,8 +109,6 @@
 + #  let me define it myself, so I have to fight with it.
 + libsupport_a_DEPENDENCIES =3D @snprintf_o@ @foo_o@
 + libsupport_a_LIBADD =3D @snprintf_o@ @foo_o@
 +-
 +-CLEANFILES =3D  @MKDEPFILE@ ii_files/*.ii
 + mkinstalldirs =3D $(SHELL) $(top_srcdir)/mkinstalldirs
 + CONFIG_HEADER =3D ../config.h
 + CONFIG_CLEAN_FILES =3D=20
 +@@ -137,8 +138,8 @@
 + all: all-redirect
 + .SUFFIXES:
 + .SUFFIXES: .S .c .c++ .lo .o .s
 +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M=
 4) $(top_srcdir)/common.am
 +-	cd $(top_srcdir) && $(AUTOMAKE) --gnu support/Makefile
 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/c=
 onfigure.in $(ACLOCAL_M4) $(top_srcdir)/common.am
 ++	cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps support/Makefile
 +=20
 + Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
 + 	cd $(top_builddir) \
 +@@ -320,7 +321,7 @@
 + mostlyclean-generic distclean-generic clean-generic \
 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 +=20
 +-sinclude @MKDEPFILE@
 ++#sinclude @MKDEPFILE@
 +=20
 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
 + # Otherwise a system limit (for SysV at least) may be exceeded.

From: Jeremy Norris <ishmael27x@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/32231: Update port devel/fam
Date: Sun, 27 Jan 2002 15:26:36 -0600

 Could this get committed?
 I sent the final updated patch on Dec 16, 2001. FAM author wonders why this
 port stays at old version for so long.
 I drop the repo-copy request if that will get it updated quicker.
 
 Jeremy

From: Jeremy Norris <ishmael27x@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/32231: Update port devel/fam
Date: Tue, 26 Feb 2002 20:06:46 -0600

 Yet another reminder...
 
 On Sun, Jan 27, 2002 at 01:30:02PM -0800, Jeremy Norris wrote:
 > The following reply was made to PR ports/32231; it has been noted by GNATS.
 > 
 > From: Jeremy Norris <ishmael27x@yahoo.com>
 > To: FreeBSD-gnats-submit@FreeBSD.org
 > Cc:  
 > Subject: Re: ports/32231: Update port devel/fam
 > Date: Sun, 27 Jan 2002 15:26:36 -0600
 > 
 >  Could this get committed?
 >  I sent the final updated patch on Dec 16, 2001. FAM author wonders why this
 >  port stays at old version for so long.
 >  I drop the repo-copy request if that will get it updated quicker.
 >  
 >  Jeremy
 > 
 > To Unsubscribe: send mail to majordomo@FreeBSD.org
 > with "unsubscribe freebsd-ports" in the body of the message
State-Changed-From-To: analyzed->closed 
State-Changed-By: ade 
State-Changed-When: Sat Apr 13 11:03:12 PDT 2002 
State-Changed-Why:  
Timeout in analyzed (3 months).  In addition, as indicated in the audit 
trail, since these are extensive patches, they should be submitted to 
the software author for inclusion in a new release - at that time, please 
resubmit a new port. 


Responsible-Changed-From-To: freebsd-ports->ade 
Responsible-Changed-By: ade 
Responsible-Changed-When: Sat Apr 13 11:03:12 PDT 2002 
Responsible-Changed-Why:  
My fault[tm] 

http://www.freebsd.org/cgi/query-pr.cgi?pr=32231 
>Unformatted:
