184 lines
4.3 KiB
Text
184 lines
4.3 KiB
Text
$NetBSD: patch-ag,v 1.11 2021/11/11 00:49:34 gutteridge Exp $
|
|
|
|
--- Configure.orig 2018-02-14 14:18:55.000000000 +0000
|
|
+++ Configure
|
|
@@ -3077,32 +3077,78 @@ return(0); }
|
|
echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
|
|
echo "!!!WARNING!!! Configuring for NetBSD 3.0"
|
|
;;
|
|
+ 4.0*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="4000000"
|
|
+ ;;
|
|
+ 4.99.*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="4099000"
|
|
+ ;;
|
|
+ 4*)
|
|
+ LSOF_VERS="4000000"
|
|
+ echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
|
|
+ echo "!!!WARNING!!! Configuring for NetBSD 4.0"
|
|
+ ;;
|
|
+ 5.[012]*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="5000000"
|
|
+ ;;
|
|
+ 5.99.*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="5099000"
|
|
+ ;;
|
|
+ 5*)
|
|
+ LSOF_VERS="5000000"
|
|
+ echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
|
|
+ echo "!!!WARNING!!! Configuring for NetBSD 5.0"
|
|
+ ;;
|
|
+ 6.[01]*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="6000000"
|
|
+ ;;
|
|
+ 6.99.*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="6099000"
|
|
+ ;;
|
|
+ 7.[01]*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="7000000"
|
|
+ ;;
|
|
+ 7.99.*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="7099000"
|
|
+ ;;
|
|
+ 8.[0123]*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="8000000"
|
|
+ ;;
|
|
+ 8.99.*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="8099000"
|
|
+ ;;
|
|
+ 9.[0123].*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="9000000"
|
|
+ ;;
|
|
+ 9.99.*)
|
|
+ LSOF_TSTBIGF=" "
|
|
+ LSOF_VERS="9099000"
|
|
+ ;;
|
|
*)
|
|
echo "Unknown NetBSD release: $LSOF_VSTR"
|
|
- echo Assuming NetBSD 1.6
|
|
- LSOF_VERS="1006000"
|
|
+ echo Assuming NetBSD 9.0
|
|
+ LSOF_VERS="9000000"
|
|
;;
|
|
esac # }
|
|
fi # }
|
|
|
|
- # Test for legal NetBSD version.
|
|
-
|
|
- case $LSOF_VERS in # {
|
|
- 1002000|1003000|1004000|1005000|1006000)
|
|
- ;;
|
|
- 2000000|2099009|2099010)
|
|
- ;;
|
|
- 3000000|3099000)
|
|
- ;;
|
|
- *)
|
|
- echo "Unknown NetBSD version: $LSOF_VERS"
|
|
- rm -f $LSOF_HLP
|
|
- exit 1
|
|
- ;;
|
|
- esac # }
|
|
LSOF_CFGF="$LSOF_CFGF -DNETBSDV=$LSOF_VERS"
|
|
LSOF_TMP1="-DN_UNIXV=/netbsd"
|
|
- if test -r ${LSOF_INCLUDE}/util.h # {
|
|
+ if test -r /dev/ksyms # {
|
|
+ then
|
|
+ LSOF_TMP1="-DN_UNIXV=/dev/ksyms"
|
|
+ elif test -r ${LSOF_INCLUDE}/util.h # {
|
|
then
|
|
grep -q getbootfile ${LSOF_INCLUDE}/util.h
|
|
if test $? -eq 0 # {
|
|
@@ -3501,6 +3547,7 @@ return(0); }
|
|
fi # }
|
|
LSOF_TMP2="sys/vnode.h"
|
|
LSOF_NBSD_PTYFS=0
|
|
+ LSOF_NBSD_TMPFS=0
|
|
if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
|
|
then
|
|
LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2"
|
|
@@ -3578,16 +3625,29 @@ return(0); }
|
|
fi # }
|
|
fi # }
|
|
fi # }
|
|
+ grep -q VT_TMPFS $LSOF_TMP3
|
|
+ if test $? -eq 0 # {
|
|
+ then
|
|
+ LSOF_TMP2="fs/tmpfs/tmpfs.h"
|
|
+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
|
|
+ then
|
|
+ LSOF_CFGF="$LSOF_CFGF -DHASTMPFS"
|
|
+ else
|
|
+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # {
|
|
+ then
|
|
+ if test $NETBSD_SYS != $LSOF_INCLUDE # {
|
|
+ then
|
|
+ LSOF_CFGF="$LSOF_CFGF -DHASTMPFS"
|
|
+ LSOF_NBSD_TMPFS=1
|
|
+ fi # }
|
|
+ fi # }
|
|
+ fi # }
|
|
+ fi # }
|
|
if test "X$NETBSD_UVM" = "X" # {
|
|
then
|
|
- grep -q UVM $LSOF_TMP3
|
|
- if test $? -ne 0 # {
|
|
+ if test -r ${LSOF_INCLUDE}/uvm # {
|
|
then
|
|
- egrep -q "v_uvm;|v_uobj;" $LSOF_TMP3
|
|
- if test $? -eq 0 # {
|
|
- then
|
|
- NETBSD_UVM="Y"
|
|
- fi # }
|
|
+ NETBSD_UVM="Y"
|
|
fi # }
|
|
fi # }
|
|
fi # }
|
|
@@ -3863,6 +3923,28 @@ return(0); }
|
|
LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
|
|
fi # }
|
|
fi # }
|
|
+ if test $LSOF_NBSD_TMPFS -eq 1 # {
|
|
+ then
|
|
+
|
|
+ # Make a local copy of $NETBSD_SYS/sys/fs/tmpfs/tmpfs.h.
|
|
+
|
|
+ if test ! -d dialects/n+obsd/include # {
|
|
+ then
|
|
+ mkdir dialects/n+obsd/include
|
|
+ fi # }
|
|
+ if test ! -d dialects/n+obsd/include/fs # {
|
|
+ then
|
|
+ mkdir dialects/n+obsd/include/fs
|
|
+ fi # }
|
|
+ rm -rf dialects/n+obsd/include/fs/tmpfs
|
|
+ mkdir dialects/n+obsd/include/fs/tmpfs
|
|
+ cp $NETBSD_SYS/fs/tmpfs/tmpfs.h dialects/n+obsd/include/fs/tmpfs
|
|
+ echo $LSOF_CFGF | grep /dialects/n+obsd/include > /dev/null 2>&1
|
|
+ if test $? -ne 0 # {
|
|
+ then
|
|
+ LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
|
|
+ fi # }
|
|
+ fi # }
|
|
LSOF_CFGL="$LSOF_CFGL -lkvm"
|
|
LSOF_DIALECT_DIR=n+obsd
|
|
;;
|
|
@@ -5607,7 +5689,7 @@ fi # }
|
|
echo "" >> $LSOF_MKFC
|
|
if test "X$LSOF_DEBUG" = "X" # {
|
|
then
|
|
- LSOF_DEBUG="-O"
|
|
+ LSOF_DEBUG=""
|
|
else
|
|
if test "X$LSOF_DEBUG" = "XNo-O" # {
|
|
then
|