diff options
author | atatat <atatat@pkgsrc.org> | 2005-01-17 14:54:01 +0000 |
---|---|---|
committer | atatat <atatat@pkgsrc.org> | 2005-01-17 14:54:01 +0000 |
commit | 3d81b0b52580fe55cff55ea914ee0a8c849b81ae (patch) | |
tree | 1a792056e233f5471abb4a6fcc023190e65f7487 /sysutils/lsof | |
parent | 6142cc813c1d8537688acf08db90494123b62e21 (diff) | |
download | pkgsrc-3d81b0b52580fe55cff55ea914ee0a8c849b81ae.tar.gz |
Upgrade to lsof version 4.74, thereby getting rid of most of the
accumulated patches. Changes related to or affecting NetBSD (or
pkgsrc) from the 00DIST file:
4.74 January 17, 2005
...
Updated lsof for NetBSD 2.99.10 and tested it on a
system provided by Andrew Brown <atatat@atatdot.net>.
...
Added BSDI, FreeBSD, NetBSD and OpenBSD support for the
*effnlink member of the inode structure. This makes
the lsof LTnlink test run faster on all modified
dialects and correctly on OpenBSD.
Added ptyfs support for NetBSD, using modifications
provided by Andrew Brown.
Changed the netbsd Configure stanza to look by default
for system header files in both /usr/include and
/usr/src. (The NETBSD_SYS environment variable can
still be used to select an alternate for /usr/src.)
...
Diffstat (limited to 'sysutils/lsof')
-rw-r--r-- | sysutils/lsof/Makefile | 5 | ||||
-rw-r--r-- | sysutils/lsof/distinfo | 15 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-aa | 34 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ab | 136 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ac | 928 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ad | 25 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ae | 213 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-af | 21 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ag | 31 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ah | 45 |
10 files changed, 7 insertions, 1446 deletions
diff --git a/sysutils/lsof/Makefile b/sysutils/lsof/Makefile index 3d94879ebcd..c955713a32f 100644 --- a/sysutils/lsof/Makefile +++ b/sysutils/lsof/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.80 2004/11/30 02:02:13 atatat Exp $ +# $NetBSD: Makefile,v 1.81 2005/01/17 14:54:01 atatat Exp $ # -DISTNAME= lsof_4.73 -PKGREVISION= 1 +DISTNAME= lsof_4.74 PKGNAME= ${DISTNAME:S/_/-/} CATEGORIES= sysutils MASTER_SITES= ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ \ diff --git a/sysutils/lsof/distinfo b/sysutils/lsof/distinfo index 75e707ec5a1..65914901011 100644 --- a/sysutils/lsof/distinfo +++ b/sysutils/lsof/distinfo @@ -1,12 +1,5 @@ -$NetBSD: distinfo,v 1.48 2004/12/18 05:30:33 atatat Exp $ +$NetBSD: distinfo,v 1.49 2005/01/17 14:54:01 atatat Exp $ -SHA1 (lsof_4.73.tar.bz2) = 3e8112f854fc83f5e5dfdc9271c8d27d31aefc6c -Size (lsof_4.73.tar.bz2) = 725530 bytes -SHA1 (patch-aa) = 4878381537330258e9270c9d198d49a426283fab -SHA1 (patch-ab) = 96c7ec1b1b710b10182da370c0c13e741d4687d8 -SHA1 (patch-ac) = b844e10f4df066bb65bfc644bd387f0d13935726 -SHA1 (patch-ad) = 49f3d0899e8055815c8b25d304281f83e7b1a98d -SHA1 (patch-ae) = ee3a1ec6e7ac95a92d8f5cc1c76569cc22cb167d -SHA1 (patch-af) = 0a5ca7b243be925cba841b1358427e86b65ccde1 -SHA1 (patch-ag) = 06a5a07cf550136c8b58f82d4aa0f75d85378db0 -SHA1 (patch-ah) = 35dc2b9ec90a1f418d3cd103b951db46df19bf3c +SHA1 (lsof_4.74.tar.bz2) = eed401b9d32bc009be48359ffb3bcdea119570d6 +Size (lsof_4.74.tar.bz2) = 732392 bytes +SHA1 (patch-aa) = 332eb1ac95d86023dde66d1b99b9335c8f54b81f diff --git a/sysutils/lsof/patches/patch-aa b/sysutils/lsof/patches/patch-aa index b8d1eb2b209..b5cd0062dd9 100644 --- a/sysutils/lsof/patches/patch-aa +++ b/sysutils/lsof/patches/patch-aa @@ -1,15 +1,10 @@ -$NetBSD: patch-aa,v 1.24 2004/11/28 22:39:07 atatat Exp $ +$NetBSD: patch-aa,v 1.25 2005/01/17 14:54:01 atatat Exp $ If LSOF_MORE_SECURE is non-zero, compile lsof with security, and only let unprivileged (non-root) users view their own open files. Set LSOF_LESS_SECURE_SOCKETS to non-zero in order to allow non-root users to see open sockets, even when LSOF_MORE_SECURE is set. -Also, incorporate a patch from the author that widens the NETBSDV -definition to account for new current versioning system, properly -handles the sys/bufq.h mess, adds a bit more to procfs support, and -adds ptyfs support. - --- dialects/n+obsd/machine.h.orig 2004-10-17 17:55:27.000000000 -0400 +++ dialects/n+obsd/machine.h @@ -383,7 +383,9 @@ @@ -34,30 +29,3 @@ adds ptyfs support. /* -@@ -407,9 +411,9 @@ - - #define HASSETLOCALE 1 - --# if defined(NETBSDV) && NETBSDV>=1060 -+# if defined(NETBSDV) && NETBSDV>=1006000 - #define HASWIDECHAR 1 --# endif /* defined(NETBSDV) && NETBSDV>=1060*/ -+# endif /* defined(NETBSDV) && NETBSDV>=1006000 */ - - /* #define WIDECHARINCL <wchar.h> */ - -@@ -529,11 +533,11 @@ - /* #define USE_LIB_READMNT 1 rmnt.c */ - /* #define USE_LIB_REGEX 1 regex.c */ - --# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) -+# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) - #define USE_LIB_RNMH 1 /* rnmh.c */ --# else /* (defined(OPENBSDV) && OPENBSDV<2010) && (defined(NETBSDV) && NETBSDV<1020) */ -+# else /* (defined(OPENBSDV) && OPENBSDV<2010) && (defined(NETBSDV) && NETBSDV<1002000) */ - #define USE_LIB_RNAM 1 /* rnam.c */ --# endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */ -+# endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ - - /* #define USE_LIB_RNCH 1 rnch.c */ - /* #define USE_LIB_SNPF 1 snpf.c */ diff --git a/sysutils/lsof/patches/patch-ab b/sysutils/lsof/patches/patch-ab deleted file mode 100644 index 613f9da6291..00000000000 --- a/sysutils/lsof/patches/patch-ab +++ /dev/null @@ -1,136 +0,0 @@ -$NetBSD: patch-ab,v 1.32 2004/11/30 02:02:13 atatat Exp $ - -Incorporate a patch from the author that widens the NETBSDV definition -to account for new current versioning system, properly handles the -sys/bufq.h mess, adds a bit more to procfs support, and adds ptyfs -support. - ---- dialects/n+obsd/dlsof.h.orig 2004-03-10 18:51:36.000000000 -0500 -+++ dialects/n+obsd/dlsof.h -@@ -98,9 +98,9 @@ struct uio; /* dummy for function protot - #include <rpc/types.h> - #include <sys/protosw.h> - --# if defined(NETBSDV) && NETBSDV>=1030 -+# if defined(NETBSDV) && NETBSDV>=1003000 - #define sockproto NETBSD_sockproto --# endif /* defined(NETBSDV) && NETBSDV>=1030 */ -+# endif /* defined(NETBSDV) && NETBSDV>=1003000 */ - - #include <sys/socket.h> - -@@ -145,9 +145,9 @@ struct nameidata; /* to satisfy a functi - #include <msdosfs/denode.h> - # endif /* defined(HASMSDOSFS) */ - --# if defined(NETBSDV) && NETBSDV>=1030 -+# if defined(NETBSDV) && NETBSDV>=1003000 - #undef sockproto --# endif /* defined(NETBSDV) && NETBSDV>=1030 */ -+# endif /* defined(NETBSDV) && NETBSDV>=1003000 */ - - #include <sys/socketvar.h> - #include <sys/un.h> -@@ -202,7 +202,7 @@ struct nameidata; /* to satisfy a functi - - #include <sys/vnode.h> - --# if defined(NETBSDV) && NETBSDV>=1030 -+# if defined(NETBSDV) && NETBSDV>=1003000 - /* - * Because late in the 1.3I NetBSD development cycle the sockproto structure - * was placed under _KERNEL in <sys/socket.h>, and because defining _KERNEL -@@ -217,7 +217,7 @@ struct sockproto { - u_short sp_family; - u_short sp_protocol; - }; --# endif /* defined(NETBSDV) && NETBSDV>=1030 */ -+# endif /* defined(NETBSDV) && NETBSDV>=1003000 */ - - #include <net/raw_cb.h> - #include <sys/domain.h> -@@ -245,6 +245,14 @@ struct sockproto { - #undef DIRENT_DIRBLKSIZ - # endif /*defined(DIRENT_BLKSIZ) */ - -+# if defined(HASBUFQ_H) -+# if defined(NETBSDV) && NETBSDV>=2099010 -+#define _KERNEL -+#include <sys/bufq.h> -+#undef _KERNEL -+# endif /* defined(NETBSDV) && NETBSDV>=2099010 */ -+#endif /* defined(HASBUFQ_H) */ -+ - #undef KERNEL - #include <ufs/mfs/mfsnode.h> - -@@ -331,9 +339,9 @@ struct sockproto { - - # if defined(HASNULLFS) - #define _KERNEL --# if defined(NETBSDV) && NETBSDV>=1050 && __NetBSD_Version__<106060000 -+# if defined(NETBSDV) && NETBSDV>=1005000 && __NetBSD_Version__<106060000 - #include "netexport.h" --# endif /* defined(NETBSDV) && NETBSDV>=1050 -+# endif /* defined(NETBSDV) && NETBSDV>=1005000 - && __NetBSD_Version__<106060000 */ - #include <miscfs/nullfs/null.h> - #undef _KERNEL -@@ -357,10 +365,26 @@ struct sockproto { - #define Pstatus PFSstatus - #define Pnote PFSnote - #define Pnotepg PFSnotepg -+# if defined(NetBSDV) -+# if NETBSDV>=2000000 -+#define Pfd PFSfd -+# endif /* NETBSDV>=2000000 */ -+# if NETBSDV>=1006000 -+#define Pmap PFSmap -+#define Pmaps PFSmaps -+# endif /* NETBSDV>=1006000 */ -+# endif /* defined(NetBSDV) */ - # endif /* defined(HASPROCFS_PFSROOT) */ - #include <machine/reg.h> - # endif /* defined(HASPROCFS) */ - -+# if defined(HASPTYFS) -+#define _KERNEL -+#include <fs/ptyfs/ptyfs.h> -+#include <miscfs/specfs/specdev.h> -+#undef _KERNEL -+# endif /* defined(HASPTYFS) */ -+ - #define KERNEL - #define _KERNEL - #include <sys/file.h> -@@ -515,9 +539,9 @@ struct sfile { - */ - - # if defined(HASNCACHE) --# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) -+# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) - #include <stddef.h> --#endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */ -+#endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ - - #include <sys/uio.h> - #include <sys/namei.h> -@@ -527,15 +551,15 @@ struct sfile { - #define NCACHE_NODEADDR nc_vp /* node address in NCACHE */ - #define NCACHE_PARADDR nc_dvp /* parent node address in NCACHE */ - --# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) -+# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) - #define NCACHE_NXT nc_hash.le_next /* link in NCACHE */ --# else /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */ -+# else /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ - # if defined(NetBSD1_0) && NetBSD<1994101 - #define NCACHE_NXT nc_nxt /* link in NCACHE */ - # else /* !defined(NetBSD1_0) || NetBSD>=1994101 */ - #define NCACHE_NXT nc_lru.tqe_next /* link in NCACHE */ - # endif /* defined(NetBSD1_0) && NetBSD<1994101 */ --# endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */ -+# endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ - - # if defined(HASNCVPID) - #define NCACHE_PARID nc_dvpid /* parent node ID in NCACHE */ diff --git a/sysutils/lsof/patches/patch-ac b/sysutils/lsof/patches/patch-ac deleted file mode 100644 index 4882acf5666..00000000000 --- a/sysutils/lsof/patches/patch-ac +++ /dev/null @@ -1,928 +0,0 @@ -$NetBSD: patch-ac,v 1.21 2004/11/30 02:02:13 atatat Exp $ - -Incorporate a patch from the author that widens the NETBSDV definition -to account for new current versioning system, properly handles the -sys/bufq.h mess, adds a bit more to procfs support, and adds ptyfs -support. - ---- Configure.orig 2004-10-19 15:36:21.000000000 -0400 -+++ Configure -@@ -161,6 +161,7 @@ LSOF_TSTK64=0 - LSOF_TSTKMEM=1 - LSOF_TSTLFF="${LSOF_TSTSUBD}/config.ldflags" - LSOF_TSTLFLG="" -+LSOF_TSTVPATH=0 - LSOF_TSTXO="" - LSOF_TSTXOC="${LSOF_TSTSUBD}/config.xobj" - if test "X$LSOF_VERS" = "X" # { -@@ -2264,51 +2265,49 @@ return(0); } - # Validate the NetBSD version. - - case $LSOF_VSTR in # { -- 1.0*) -- LSOF_VERS="1000" -- ;; -- 1.1*) -- LSOF_VERS="1010" -- ;; - 1.2*) -- LSOF_VERS="1020" -+ LSOF_VERS="1002000" - ;; - 1.3*) -- LSOF_VERS="1030" -+ LSOF_VERS="1003000" - ;; - 1.4*) -- LSOF_VERS="1040" -+ LSOF_VERS="1004000" - ;; - 1.5*) - LSOF_TSTBIGF=" " -- LSOF_VERS="1050" -+ LSOF_VERS="1005000" - ;; - 1.6*) - LSOF_TSTBIGF=" " -- LSOF_VERS="1060" -+ LSOF_VERS="1006000" - ;; - 1*) -- LSOF_VERS=1060 -+ LSOF_VERS="1006000" - echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR" - echo "!!!WARNING!!! Configuring for NetBSD 1.6" - ;; - 2.0*) - LSOF_TSTBIGF=" " -- LSOF_VERS="2000" -+ LSOF_VERS="2000000" - ;; - 2.99.9) - LSOF_TSTBIGF=" " -- LSOF_VERS="2999" -+ LSOF_VERS="2099009" -+ ;; -+ 2.99.10) -+ LSOF_TSTBIGF=" " -+ LSOF_VERS="2099010" - ;; - 2*) -- LSOF_VERS=2000 -+ LSOF_VERS="2000000" - echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR" - echo "!!!WARNING!!! Configuring for NetBSD 2.0" - ;; - *) - echo "Unknown NetBSD release: $LSOF_VSTR" -- echo Assuming NetBSD 1.0 -- LSOF_VERS="1000" -+ echo Assuming NetBSD 1.6 -+ LSOF_VERS="1006000" - ;; - esac # } - fi # } -@@ -2316,7 +2315,7 @@ return(0); } - # Test for legal NetBSD version. - - case $LSOF_VERS in # { -- 1000|1010|1020|1030|1040|1050|1060|2000|2999) -+ 1002000|1003000|1004000|1005000|1006000|2000000|2099009|2099010) - ;; - *) - echo "Unknown NetBSD version: $LSOF_VERS" -@@ -2336,166 +2335,637 @@ return(0); } - fi # } - fi # } - LSOF_CFGF="$LSOF_CFGF $LSOF_TMP1" -- if test -r ${LSOF_INCLUDE}/nfs/nfsproto.h # { -+ if test -r ${LSOF_INCLUDE}/kvm.h # { -+ then -+ grep -q kvm_getproc2 ${LSOF_INCLUDE}/kvm.h -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASKVMGETPROC2" -+ fi # } -+ fi # } -+ -+ # Here begin the dual tests on header files that may be in $LSOF_INCLUDE -+ # or $NETBSD_SYS. -+ # -+ # Note that $LSOF_TMP1 holds an indicator of the need for -I$NETBSD_SYS. -+ # LSOF_TMP4 contains a temporary indicator of the use of $NETBSD_SYS. -+ -+ LSOF_TMP1=0 -+ if test "X$NETBSD_SYS" = "X" # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASNFSPROTO" -+ if test -d /usr/src # { -+ then -+ NETBSD_SYS="/usr/src/sys" -+ else -+ NETBSD_SYS=$LSOF_INCLUDE -+ fi # } - fi # } -- if test -r ${LSOF_INCLUDE}/netinet/ip6.h # { -+ LSOF_TMP2="nfs/nfsproto.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASNFSPROTO" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ LSOF_TMP2="netinet/ip6.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { - then - LSOF_CFGF="$LSOF_CFGF -DHASIPv6" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ else -+ LSOF_TMP2="netinet/in.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { -+ then -+ grep -q IPV6_INRIA_VERSION $LSOF_TMP3 -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASIPv6 -DHASINRIAIPv6" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ fi # } - fi # } -- LSOF_TMP1=0 -- if test "X$NETBSD_SYS" = "X" # { -+ LSOF_TMP2="miscfs/fdesc/fdesc.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { - then -- NETBSD_SYS=$LSOF_INCLUDE -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } - fi # } -- if test -r ${NETBSD_SYS}/miscfs/fdesc/fdesc.h # { -+ if test "X$LSOF_TMP3" != "X" # { - then -- grep -q Fctty ${NETBSD_SYS}/miscfs/fdesc/fdesc.h -+ grep -q Fctty $LSOF_TMP3 - if test $? -eq 0 # { - then - LSOF_CFGF="$LSOF_CFGF -DHASFDESCFS=1" - else - LSOF_CFGF="$LSOF_CFGF -DHASFDESCFS=2" - fi # } -- grep -q fd_link ${NETBSD_SYS}/miscfs/fdesc/fdesc.h -+ grep -q fd_link $LSOF_TMP3 - if test $? -eq 0 # { - then - LSOF_CFGF="$LSOF_CFGF -DHASFDLINK" - fi # } -- LSOF_TMP1=1 -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } - fi # } -- if test -r ${LSOF_INCLUDE}/sys/vnode.h # { -+ LSOF_TMP2="miscfs/nullfs/null.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { - then -- grep -q VT_LFS ${LSOF_INCLUDE}/sys/vnode.h -- if test $? -eq 0 # { -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASLFS" -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" - fi # } - fi # } -- if test -r ${LSOF_INCLUDE}/miscfs/nullfs/null.h # { -+ if test "X$LSOF_TMP3" != "X" # { - then - LSOF_CFGF="$LSOF_CFGF -DHASNULLFS" -- else -- if test -r ${NETBSD_SYS}/miscfs/nullfs/null.h # { -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASNULLFS" - LSOF_TMP1=1 - fi # } - fi # } -- if test -d ${NETBSD_SYS}/miscfs/procfs # { -+ LSOF_TMP2="miscfs/procfs" -+ if test -d ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -d ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { - then - LSOF_CFGF="$LSOF_CFGF -DHASPROCFS" -- LSOF_TMP1=1 -- grep -q PFSroot ${NETBSD_SYS}/miscfs/procfs/procfs.h -- if test $? -eq 0 # { -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ if test -r ${LSOF_TMP3}/procfs.h # { -+ then -+ grep -q PFSroot ${LSOF_TMP3}/procfs.h -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASPROCFS_PFSROOT" -+ fi # } -+ fi # } -+ fi # } -+ LSOF_TMP2="sys/bufq.h" -+ LSOF_NBSD_BUFQH=0 -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASBUFQ_H" -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASPROCFS_PFSROOT" -- fi # } -+ if test $NETBSD_SYS != $LSOF_INCLUDE # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASBUFQ_H" -+ LSOF_NBSD_BUFQH=1 -+ fi # } -+ fi # } -+ fi # } -+ LSOF_TMP2="isofs/cd9660" -+ if test -d ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -d ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } - fi # } -- if test -d ${NETBSD_SYS}/isofs/cd9660 # { -+ if test "X$LSOF_TMP3" != "X" # { - then - LSOF_CFGF="$LSOF_CFGF -DHAS9660FS=1" -- LSOF_TMP1=1 -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } - else -- if test -d ${NETBSD_SYS}/fs/cd9660 # { -+ LSOF_TMP2="fs/cd9660" -+ if test -d ${LSOF_INCLUDE}/$LSOF_TMP2 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHAS9660FS=2" -- LSOF_TMP1=1 -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -d ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHAS9660FS=1" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } - fi # } - fi # } -- if test -d ${NETBSD_SYS}/msdosfs # { -+ LSOF_TMP2="msdosfs" -+ if test -d ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -d ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { - then - LSOF_CFGF="$LSOF_CFGF -DHASMSDOSFS=1" -- LSOF_TMP1=1 -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } - else -- if test -d ${NETBSD_SYS}/fs/msdosfs # { -+ LSOF_TMP2="fs/msdosfs" -+ if test -d ${LSOF_INCLUDE}/$LSOF_TMP2 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASMSDOSFS=2" -- LSOF_TMP1=1 -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -d ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASMSDOSFS=2" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ fi # } -+ LSOF_TMP2="miscfs/kernfs/kernfs.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" - fi # } - fi # } -- if test -r ${NETBSD_SYS}/miscfs/kernfs/kernfs.h # { -+ if test "X$LSOF_TMP3" != "X" # { - then -- grep -q "kt_name;" ${NETBSD_SYS}/miscfs/kernfs/kernfs.h -+ grep -q "kt_name;" $LSOF_TMP3 - if test $? -eq 0 # { - then - LSOF_CFGF="$LSOF_CFGF -DHASKERNFS" -- LSOF_TMP1=1 -- grep -q "*kfs_kt;" ${NETBSD_SYS}/miscfs/kernfs/kernfs.h -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ grep -q "*kfs_kt;" $LSOF_TMP3 - if test $? -eq 0 # { - then - LSOF_CFGF="$LSOF_CFGF -DHASKERNFS_KFS_KT" - fi # } - fi # } - fi # } -- if test $LSOF_TMP1 -eq 1 -a "X$LSOF_INCLUDE" != "X$NETBSD_SYS" # { -+ LSOF_TMP2="sys/namei.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { - then -- LSOF_DINC="-I$LSOF_INCLUDE -I$NETBSD_SYS" -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } - fi # } -- if test -r ${LSOF_INCLUDE}/sys/namei.h -+ if test "X$LSOF_TMP3" != "X" # { - then -- grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h -+ grep -q nc_vpid $LSOF_TMP3 - if test $? -eq 0 # { - then - LSOF_CFGF="$LSOF_CFGF -DHASNCVPID" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } - fi # } - fi # } -- grep -q i_ffs_size ${LSOF_INCLUDE}/ufs/ufs/inode.h -- if test $? -eq 0 # { -+ LSOF_TMP2="ufs/ufs/inode.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASI_FFS" -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 - else -- grep -q i_ffs1_size ${LSOF_INCLUDE}/ufs/ufs/inode.h -- if test $? -eq 0 # { -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASI_FFS1" -- fi #} -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } - fi # } -- grep -q VT_EXT2FS ${LSOF_INCLUDE}/sys/vnode.h -- if test $? -eq 0 # { -+ if test "X$LSOF_TMP3" != "X" # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASEXT2FS" -- grep -q "*e2fs_din" ${LSOF_INCLUDE}/ufs/ufs/inode.h -+ grep -q i_ffs_size $LSOF_TMP3 - if test $? -eq 0 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASI_E2FS_PTR" -+ LSOF_CFGF="$LSOF_CFGF -DHASI_FFS" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ else -+ grep -q i_ffs1_size $LSOF_TMP3 -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASI_FFS1" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ fi # } -+ grep -q i_ffs_effnlink $LSOF_TMP3 -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASEFFNLINK=i_ffs_effnlink" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } - fi # } - fi # } -- if test -r ${LSOF_INCLUDE}/nfs/nfsnode.h # { -+ LSOF_TMP2="sys/vnode.h" -+ LSOF_NBSD_PTYFS=0 -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { - then -- grep -q "*n_vattr" ${LSOF_INCLUDE}/nfs/nfsnode.h -- if test $? -eq 0 # { -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASNFSVATTRP" -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" - fi # } - fi # } -- if test "X$NETBSD_UVM" = "X" # { -+ if test "XLSOF_TMP3" != "X" # { - then -- if test -r /etc/mk.conf # { -+ grep -q VT_EXT2FS $LSOF_TMP3 -+ if test $? -eq 0 # { - then -- grep -q "^UVM[ ]*=" /etc/mk.conf -- if test $? -eq 0 # { -+ LSOF_CFGF="$LSOF_CFGF -DHASEXT2FS" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ LSOF_TMP2="ufs/ufs/inode.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP5="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP6=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP5="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP6=1 -+ else -+ LSOF_TMP5="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP5" != "X" # { - then -- NETBSD_UVM="Y" -+ grep -q "*e2fs_din" $LSOF_TMP5 -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASI_E2FS_PTR" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=$LSOF_TMP6 -+ fi # } -+ fi # } - fi # } - fi # } -- if test "X$NETBSD_UVM" = "X" # { -+ grep -q VT_LFS $LSOF_TMP3 -+ if test $? -eq 0 # { - then -- if test -r ${LSOF_INCLUDE}/sys/vnode.h # { -+ LSOF_CFGF="$LSOF_CFGF -DHASLFS" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { - then -- grep -q UVM ${LSOF_INCLUDE}/sys/vnode.h -- if test $? -ne 0 # { -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ grep -q VT_PTYFS $LSOF_TMP3 -+ if test $? -eq 0 # { -+ then -+ LSOF_TMP2="fs/ptyfs/ptyfs.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASPTYFS" -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { - then -- egrep -q "v_uvm;|v_uobj;" ${LSOF_INCLUDE}/sys/vnode.h -- if test $? -eq 0 # { -+ if test $NETBSD_SYS != $LSOF_INCLUDE # { - then -- NETBSD_UVM="Y" -+ LSOF_CFGF="$LSOF_CFGF -DHASPTYFS" -+ LSOF_NBSD_PTYFS=1 - fi # } - fi # } - fi # } - fi # } -+ if test "X$NETBSD_UVM" = "X" # { -+ then -+ grep -q UVM $LSOF_TMP3 -+ if test $? -ne 0 # { -+ then -+ egrep -q "v_uvm;|v_uobj;" $LSOF_TMP3 -+ if test $? -eq 0 # { -+ then -+ NETBSD_UVM="Y" -+ fi # } -+ fi # } -+ fi # } -+ fi # } -+ LSOF_TMP2="nfs/nfsnode.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { -+ then -+ grep -q "*n_vattr" $LSOF_TMP3 -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASNFSVATTRP" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ fi # } -+ LSOF_TMP2="sys/lockf.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } - fi # } -+ if test "X$LSOF_TMP3" != "X" # { -+ then -+ grep -q vop_advlock_args $LSOF_TMP3 -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHAS_ADVLOCK_ARGS" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ grep -q lf_lwp $LSOF_TMP3 -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHAS_LF_LWP" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ fi # } -+ LSOF_TMP2="sys/lwp.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHAS_LWP_H" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ LSOF_TMP2="sys/filedesc.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { -+ then -+ grep -q "^struct cwdinfo {" $LSOF_TMP3 -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASCWDINFO" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ fi # } -+ LSOF_TMP2="sys/pipe.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ LSOF_TMP4=0 -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ LSOF_TMP4=1 -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHAS_SYS_PIPEH" -+ if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1 # { -+ then -+ LSOF_TMP1=1 -+ fi # } -+ fi # } -+ if test -r ${LSOF_INCLUDE}/sys/statvfs.h # { -+ then -+ grep -q '^struct statvfs {' ${LSOF_INCLUDE}/sys/statvfs.h -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASSTATVFS" -+ fi # } -+ fi # } -+ -+ # Here end the dual NetBSD tests for header files in $LSOF_INCLUDE or -+ # NETBSD_SYS. -+ # -+ # After this LSOF_TMP1 may be reused. -+ -+ if test $LSOF_TMP1 -eq 1 # { -+ then -+ LSOF_DINC="-I$LSOF_INCLUDE -I$NETBSD_SYS" -+ fi # } -+ -+ # Build special header files, as required. -+ - rm -rf dialects/n+obsd/include - if test "X$NETBSD_UVM" = "XY" -o "X$NETBSD_UVM" = "Xy" # { - then -@@ -2508,10 +2978,22 @@ return(0); } - LSOF_CFGF="$LSOF_CFGF -DHAS_UVM_INCL" - fi # } - fi # } -- if test -r ${LSOF_INCLUDE}/sys/mount.h # { -+ LSOF_TMP2="sys/mount.h" -+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2" -+ else -+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # { -+ then -+ LSOF_TMP3="${NETBSD_SYS}/$LSOF_TMP2" -+ else -+ LSOF_TMP3="" -+ fi # } -+ fi # } -+ if test "X$LSOF_TMP3" != "X" # { - then - -- # Build the netexport.h header file for NetBSD. -+ # Build a local NetBSD netexport.h header file. - - LSOF_TMP1=${LSOF_TMPC}.edscr - LSOF_TMP2=${LSOF_TMPC}.netcred -@@ -2553,59 +3035,48 @@ return(0); } - if test $? -ne 0 # { - then - LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include" -- fi -+ fi # } - fi # } -- if test -r ${LSOF_INCLUDE}/sys/lockf.h # { -+ if test $LSOF_NBSD_BUFQH -eq 1 # { - then -- grep vop_advlock_args ${LSOF_INCLUDE}/sys/lockf.h > /dev/null -- if test $? -eq 0 # { -+ -+ # Make a local copy of $NETBSD_SYS/sys/bufq.h. -+ -+ if test ! -d dialects/n+obsd/include # { - then -- LSOF_CFGF="$LSOF_CFGF -DHAS_ADVLOCK_ARGS" -+ mkdir dialects/n+obsd/include - fi # } -- grep lf_lwp ${LSOF_INCLUDE}/sys/lockf.h > /dev/null -- if test $? -eq 0 # { -+ if test ! -d dialects/n+obsd/include/sys # { - then -- LSOF_CFGF="$LSOF_CFGF -DHAS_LF_LWP" -+ mkdir dialects/n+obsd/include/sys - fi # } -- fi # } -- if test -r ${LSOF_INCLUDE}/sys/lwp.h # { -- then -- LSOF_CFGF="$LSOF_CFGF -DHAS_LWP_H" -- fi # } -- if test -r ${LSOF_INCLUDE}/netinet/in.h # { -- then -- grep IPV6_INRIA_VERSION ${LSOF_INCLUDE}/netinet/in.h > /dev/null -- if test $? -eq 0 # { -+ cp $NETBSD_SYS/sys/bufq.h dialects/n+obsd/include/sys -+ echo $LSOF_CFGF | grep /dialects/n+obsd/include > /dev/null 2>&1 -+ if test $? -ne 0 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASIPv6 -DHASINRIAIPv6" -+ LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include" - fi # } - fi # } -- if test -r ${LSOF_INCLUDE}/sys/filedesc.h # { -+ if test $LSOF_NBSD_PTYFS -eq 1 # { - then -- grep -q "^struct cwdinfo {" ${LSOF_INCLUDE}/sys/filedesc.h -- if test $? -eq 0 # { -+ -+ # Make a local copy of $NETBSD_SYS/sys/fs/ptyfs/. -+ -+ if test ! -d dialects/n+obsd/include # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASCWDINFO" -+ mkdir dialects/n+obsd/include - fi # } -- fi # } -- if test -r ${LSOF_INCLUDE}/sys/pipe.h # { -- then -- LSOF_CFGF="$LSOF_CFGF -DHAS_SYS_PIPEH" -- fi # } -- if test -r ${LSOF_INCLUDE}/sys/statvfs.h # { -- then -- grep -q '^struct statvfs {' ${LSOF_INCLUDE}/sys/statvfs.h -- if test $? -eq 0 # { -+ if test ! -d dialects/n+obsd/include/fs # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASSTATVFS" -+ mkdir dialects/n+obsd/include/fs - fi # } -- fi # } -- if test -r ${LSOF_INCLUDE}/kvm.h # { -- then -- grep -q kvm_getproc2 ${LSOF_INCLUDE}/kvm.h -- if test $? -eq 0 # { -+ rm -rf dialects/n+obsd/include/fs/ptyfs -+ mkdir dialects/n+obsd/include/fs/ptyfs -+ cp $NETBSD_SYS/fs/ptyfs/*.h dialects/n+obsd/include/fs/ptyfs -+ echo $LSOF_CFGF | grep /dialects/n+obsd/include > /dev/null 2>&1 -+ if test $? -ne 0 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASKVMGETPROC2" -+ LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include" - fi # } - fi # } - LSOF_CFGL="$LSOF_CFGL -lkvm" -@@ -2897,6 +3368,14 @@ return(0); } - fi # } - LSOF_CFGF="$LSOF_CFGF -DHASEXT2FS=$LSOF_TMP1" - fi # } -+ if test -r ${LSOF_INCLUDE}/ufs/ufs/inode.h # { -+ then -+ grep -q i_effnlink ${LSOF_INCLUDE}/ufs/ufs/inode.h -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASEFFNLINK=i_effnlink" -+ fi # } -+ fi # } - if test -r ${LSOF_INCLUDE}/sys/namei.h - then - grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h diff --git a/sysutils/lsof/patches/patch-ad b/sysutils/lsof/patches/patch-ad deleted file mode 100644 index 718f5f8e081..00000000000 --- a/sysutils/lsof/patches/patch-ad +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-ad,v 1.9 2004/11/28 22:39:07 atatat Exp $ - -Incorporate a patch from the author that widens the NETBSDV definition -to account for new current versioning system, properly handles the -sys/bufq.h mess, adds a bit more to procfs support, and adds ptyfs -support. - ---- dialects/n+obsd/dmnt.c.orig 2004-07-06 15:20:20.000000000 -0400 -+++ dialects/n+obsd/dmnt.c -@@ -36,6 +36,15 @@ static char *rcsid = "$Id: dmnt.c,v 1.10 - #endif - - -+#if defined(NETBSDV) && defined(HASSTATVFS) -+/* -+ * NetBSD needs the statvfs structure to be defined without the -+ * pre-definition of _KERNEL. -+ */ -+ -+#include <sys/statvfs.h> -+#endif /* defined(NETBSDV) && defined(HASSTATVFS) */ -+ - #include "lsof.h" - - diff --git a/sysutils/lsof/patches/patch-ae b/sysutils/lsof/patches/patch-ae deleted file mode 100644 index a66be8266b8..00000000000 --- a/sysutils/lsof/patches/patch-ae +++ /dev/null @@ -1,213 +0,0 @@ -$NetBSD: patch-ae,v 1.7 2004/12/18 05:30:33 atatat Exp $ - -Incorporate a patch from the author that widens the NETBSDV definition -to account for new current versioning system, properly handles the -sys/bufq.h mess, adds a bit more to procfs support, and adds ptyfs -support. - ---- dialects/n+obsd/dnode.c.orig 2004-07-06 15:20:23.000000000 -0400 -+++ dialects/n+obsd/dnode.c -@@ -188,7 +188,7 @@ process_node(va) - struct mfsnode m; - struct nfsnode n; - enum nodetype {NONODE, CDFSNODE, DOSNODE, EXT2NODE, FDESCNODE, INODE, -- KERNFSNODE, MFSNODE, NFSNODE, PFSNODE} nty; -+ KERNFSNODE, MFSNODE, NFSNODE, PFSNODE, PTYFSNODE} nty; - enum vtype type; - struct vnode *v, vb; - struct l_vfs *vfs; -@@ -262,6 +262,11 @@ process_node(va) - size_t sz; - #endif /* defined(HASPROCFS) */ - -+#if defined(HASPTYFS) -+ struct ptyfsnode pt; -+ struct specinfo si; -+#endif /* defined(HASPTYFS) */ -+ - #if defined(HASNULLFS) - - process_overlaid_node: -@@ -523,6 +528,19 @@ process_overlaid_node: - break; - #endif /* defined(HASPROCFS) */ - -+#if defined(HASPTYFS) -+ case VT_PTYFS: -+ if (!v->v_data -+ || kread((KA_T)v->v_data, (char *)&pt, sizeof(pt))) { -+ (void) snpf(Namech, Namechl, "can't read ptyfsnode at: %s", -+ print_kptr((KA_T)v->v_data, (char *)NULL, 0)); -+ enter_nm(Namech); -+ return; -+ } -+ nty = PTYFSNODE; -+ break; -+#endif /* defined(HASPTYFS) */ -+ - #if defined(HASEXT2FS) - case VT_EXT2FS: - #endif /* defined(HASEXT2FS) */ -@@ -769,6 +787,21 @@ process_overlaid_node: - case NFSNODE: - dev = NVATTR.va_fsid; - devs = 1; -+ -+#if defined(HASPTYFS) -+ case PTYFSNODE: -+ if (v->v_un.vu_specinfo -+ && !kread((KA_T)v->v_un.vu_specinfo, (char *)&si, sizeof(si))) { -+ rdev = si.si_rdev; -+ rdevs = 1; -+ } -+ if (vfs) { -+ dev = (dev_t)vfs->fsid.__fsid_val[0]; -+ devs = 1; -+ } -+ break; -+#endif /* defined(HASPTYFS) */ -+ - } - /* - * Obtain the inode number. -@@ -836,6 +869,20 @@ process_overlaid_node: - break; - #endif /* defined(HASPROCFS) */ - -+#if defined(HASPTYFS) -+ case PTYFSNODE: -+ if (pt.ptyfs_type == PTYFSptc) { -+ if (pt.ptyfs_fileno >= 0x3fffffff) -+ Lf->inode = (unsigned long)(pt.ptyfs_fileno & 0x3fffffff); -+ else -+ Lf->inode = (unsigned long)(pt.ptyfs_fileno - 1); -+ } -+ else -+ Lf->inode = (unsigned long)pt.ptyfs_fileno; -+ Lf->inp_ty = 1; -+ break; -+#endif /* defined(HASPTYFS) */ -+ - } - - /* -@@ -1009,27 +1052,26 @@ process_overlaid_node: - switch (nty) { - case INODE: - -+#if defined(HASEFFNLINK) -+ Lf->nlink = (long)i.HASEFFNLINK; -+#else /* !defined(HASEFFNLINK) */ - # if defined(HASI_FFS) - Lf->nlink = (long)i.i_ffs_nlink; -- Lf->nlink_def = 1; - # else /* !defined(HASI_FFS) */ - # if defined(HASI_FFS1) - if (ffs == 1) { -- if (u1s) { -+ if (u1s) - Lf->nlink = (long)u1.di_nlink; -- Lf->nlink_def = 1; -- } - } else if (ffs == 2) { -- if (u2s) { -+ if (u2s) - Lf->nlink = (long)u2.di_nlink; -- Lf->nlink_def = 1; -- } - } - # else /* !defined(HASI_FFS1) */ -+ - Lf->nlink = (long)i.i_nlink; -- Lf->nlink_def = 1; - # endif /* defined(HASI_FFS1) */ - # endif /* defined(HASI_FFS) */ -+#endif /* defined(HASEFFNLINK) */ - - Lf->nlink_def = 1; - break; -@@ -1152,7 +1194,8 @@ process_overlaid_node: - * ioctl(fd, TIOCNOTTY) files; - * /kern files - * memory node files; -- * /proc files. -+ * /proc files; -+ * ptyfs files. - */ - - if (type == VBAD) -@@ -1222,14 +1265,62 @@ process_overlaid_node: - (void) snpf(ep, sz, "/%d/notepg", p.pfs_pid); - ty = "PGID"; - break; -+ -+# if defined(Pfd) -+ case Pfd: -+ ep = endnm(&sz); -+ (void) snpf(ep, sz, "/%d/fd", p.pfs_pid); -+ ty = "PFD"; -+ break; -+# endif /* defined(Pfd) */ -+ -+# if defined(Pmap) -+ case Pmap: -+ ep = endnm(&sz); -+ (void) snpf(ep, sz, "/%d/map", p.pfs_pid); -+ ty = "PMAP"; -+ break; -+# endif /* defined(Pmap) */ -+ -+# if defined(Pmaps) -+ case Pmaps: -+ ep = endnm(&sz); -+ (void) snpf(ep, sz, "/%d/maps", p.pfs_pid); -+ ty = "PMPS"; -+ break; -+# endif /* defined(Pmaps) */ -+ - } - if (ty) - (void) snpf(Lf->type, sizeof(Lf->type), ty); -- if (Namech[0]) -- enter_nm(Namech); - } - #endif /* defined(HASPROCFS) */ - -+#if defined(HASPTYFS) -+ else if (nty == PTYFSNODE) { -+ (void) snpf(Namech, Namechl, "%s", Lf->fsdir); -+ Lf->nlink = 1; -+ Lf->nlink_def = 1; -+ switch (pt.ptyfs_type) { -+ case PTYFSpts: -+ ep = endnm(&sz); -+ (void) snpf(ep, sz, "/%lu", (unsigned long)pt.ptyfs_pty); -+ break; -+ case PTYFSptc: -+ ep = endnm(&sz); -+ (void) snpf(ep, sz, "/%lu (master)", -+ (unsigned long)pt.ptyfs_pty); -+ break; -+ case PTYFSroot: -+ Lf->sz = 512; -+ Lf->sz_def = 1; -+ break; -+ } -+ if (ty) -+ (void) snpf(Lf->type, sizeof(Lf->type), ty); -+ } -+#endif /* defined(HASPTYFS) */ -+ - #if defined(HASBLKDEV) - /* - * If this is a VBLK file and it's missing an inode number, try to -@@ -1283,7 +1374,9 @@ process_overlaid_node: - if (Sfile && is_file_named((char *)NULL, - ((type == VCHR) || (type == VBLK)) ? 1 - : 0)) -+ { - Lf->sf |= SELNM; -+ } - if (ns) - Namech[0] = '\0'; - } diff --git a/sysutils/lsof/patches/patch-af b/sysutils/lsof/patches/patch-af deleted file mode 100644 index 53744f21dde..00000000000 --- a/sysutils/lsof/patches/patch-af +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-af,v 1.4 2004/11/28 22:39:07 atatat Exp $ - -Incorporate a patch from the author that widens the NETBSDV definition -to account for new current versioning system, properly handles the -sys/bufq.h mess, adds a bit more to procfs support, and adds ptyfs -support. - ---- dialects/n+obsd/dsock.c.orig 2004-03-10 18:51:38.000000000 -0500 -+++ dialects/n+obsd/dsock.c -@@ -79,9 +79,9 @@ process_socket(sa) - #define UNPADDR_IN_MBUF - - #if defined(NETBSDV) --# if NETBSDV>=1040 -+# if NETBSDV>=1004000 - #undef UNPADDR_IN_MBUF --# endif /* NETBSDV>=1040 */ -+# endif /* NETBSDV>=1004000 */ - #endif /* defined(NETBSDV) */ - - #if defined(UNPADDR_IN_MBUF) diff --git a/sysutils/lsof/patches/patch-ag b/sysutils/lsof/patches/patch-ag deleted file mode 100644 index 536ffe201d2..00000000000 --- a/sysutils/lsof/patches/patch-ag +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-ag,v 1.1 2004/11/28 22:39:07 atatat Exp $ - -Incorporate a patch from the author that widens the NETBSDV definition -to account for new current versioning system, properly handles the -sys/bufq.h mess, adds a bit more to procfs support, and adds ptyfs -support. - ---- dialects/n+obsd/dstore.c.orig 2003-10-07 10:34:32.000000000 -0400 -+++ dialects/n+obsd/dstore.c -@@ -49,10 +49,10 @@ struct file *Cfp; /* current file's fil - - struct drive_Nl Drive_Nl[] = { - --#if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) -+#if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) - { X_NCACHE, "_nchashtbl", }, - { X_NCSIZE, "_nchash" }, --#else /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */ -+#else /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ - # if defined(NetBSD1_0) && NetBSD<1994101 - { X_NCACHE, "_nchhead", }, - # else /* !defined(NetBSD1_0) || NetBSD>=1994101 */ -@@ -60,7 +60,7 @@ struct drive_Nl Drive_Nl[] = { - # endif /* defined(NetBSD1_0) && NetBSD<1994101 */ - - { X_NCSIZE, "_numcache" }, --#endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */ -+#endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ - - { "pgshift", "_pgshift" }, - { "", "" }, diff --git a/sysutils/lsof/patches/patch-ah b/sysutils/lsof/patches/patch-ah deleted file mode 100644 index 1dc988172c8..00000000000 --- a/sysutils/lsof/patches/patch-ah +++ /dev/null @@ -1,45 +0,0 @@ -$NetBSD: patch-ah,v 1.1 2004/11/28 22:39:07 atatat Exp $ - -Incorporate a patch from the author that widens the NETBSDV definition -to account for new current versioning system, properly handles the -sys/bufq.h mess, adds a bit more to procfs support, and adds ptyfs -support. - ---- lsof.h.orig 2004-07-15 10:56:50.000000000 -0400 -+++ lsof.h -@@ -297,20 +297,21 @@ static struct utmp dummy_utmp; /* to ge - #define N_MPC 19 /* multiplexed device node */ - #define N_MVFS 20 /* multi-volume file system node (?) */ - #define N_NFS 21 /* NFS node */ --#define N_NM 22 /* named file system node */ --#define N_OBJF 23 /* objfs file system node */ --#define N_PCFS 24 /* PC file system node */ --#define N_PIPE 25 /* pipe device node */ --#define N_PROC 26 /* /proc node */ --#define N_PSEU 27 /* pseudofs node */ --#define N_SAMFS 28 /* Solaris SAM-FS */ --#define N_SOCK 29 /* sock_vnodeops node */ --#define N_SPEC 30 /* spec_vnodeops node */ --#define N_STREAM 31 /* stream node */ --#define N_TMP 32 /* tmpfs node */ --#define N_UFS 33 /* UNIX file system node */ --#define N_VXFS 34 /* Veritas file system node */ --#define N_XFS 35 /* XFS node */ -+#define N_NFS4 22 /* NFS version 4 node */ -+#define N_NM 23 /* named file system node */ -+#define N_OBJF 24 /* objfs file system node */ -+#define N_PCFS 25 /* PC file system node */ -+#define N_PIPE 26 /* pipe device node */ -+#define N_PROC 27 /* /proc node */ -+#define N_PSEU 28 /* pseudofs node */ -+#define N_SAMFS 29 /* Solaris SAM-FS */ -+#define N_SOCK 30 /* sock_vnodeops node */ -+#define N_SPEC 31 /* spec_vnodeops node */ -+#define N_STREAM 32 /* stream node */ -+#define N_TMP 33 /* tmpfs node */ -+#define N_UFS 34 /* UNIX file system node */ -+#define N_VXFS 35 /* Veritas file system node */ -+#define N_XFS 36 /* XFS node */ - - # if !defined(OFFDECDIG) - #define OFFDECDIG 8 /* maximum number of digits in the |