Index: Configure
--- Configure.orig	2006-04-10 14:44:22.000000000 +0200
+++ Configure	2006-10-14 13:09:51.728206602 +0200
@@ -395,7 +395,7 @@
       fi	# }
     fi	# }
     LSOF_TGT="aix"
-    echo $LSOF_CC | grep gcc > /dev/null
+    $LSOF_CC --version | grep GCC > /dev/null
     if test $? -eq 0	# {
     then
 
@@ -539,7 +539,7 @@
 	LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/aix/aix5"
 	if test $LSOF_VERS -ge 5200	# {
 	then
-	  echo $LSOF_CC | grep gcc > /dev/null
+	  $LSOF_CC --version | grep GCC > /dev/null
 	  if test $? -eq 0	# {
 	  then
 
@@ -577,7 +577,7 @@
       # This is AIX >= 5 on ia64.
 
 	LSOF_TSTK64=1
-	echo $LSOF_CC | grep gcc > /dev/null
+	$LSOF_CC --version | grep GCC > /dev/null
 	if test $? -eq 0	# {
 	then
 
@@ -654,7 +654,7 @@
 	  fi	# }
 	  LSOF_TSTK64=1
 	  LSOF_TMP1=1
-	  echo $LSOF_CC | grep gcc > /dev/null
+	  $LSOF_CC --version | grep GCC > /dev/null
 	  if test $? -eq 0	# {
 	  then
 	    LSOF_CFGF="$LSOF_CFGF -maix64"
@@ -701,7 +701,7 @@
     fi	#}
     LSOF_CFGF="$LSOF_CFGF -DAIXV=$LSOF_VERS"
     LSOF_DIALECT_DIR=aix
-    echo $LSOF_CC | grep gcc > /dev/null
+    $LSOF_CC --version | grep GCC > /dev/null
     if test $? -eq 0 	# {
     then
 
@@ -1865,7 +1865,7 @@
 	fi	# }
       fi	# }
     fi	# }
-    echo $LSOF_CC | grep gcc > /dev/null
+    $LSOF_CC --version | grep GCC > /dev/null
     if test $? -eq 0	# {
     then
       LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'`
@@ -1989,7 +1989,7 @@
 	    echo "* NOTICE!  Configuring for 64 bit HP-UX *"
 	    echo "*                                       *"
 	    echo "*****************************************"
-	    echo $LSOF_CC | grep gcc > /dev/null
+	    $LSOF_CC --version | grep GCC > /dev/null
 	    if test $? -eq 0	# {
 	    then
 
@@ -2058,7 +2058,7 @@
 	  else
 	    LSOF_CFGF="$LSOF_CFGF -D_FILE_OFFSET_BITS=64"
 	    LSOF_CINFO="${LSOF_CINFO}, 32 bit HP-UX"
-	    echo $LSOF_CC | grep gcc > /dev/null
+	    $LSOF_CC --version | grep GCC > /dev/null
 	    if test $? -ne 0	# {
 	    then
 	      LSOF_CFGF="$LSOF_CFGF +DAportable"
@@ -3244,7 +3244,7 @@
 	LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'`
       fi	# }
     fi	# }
-    echo $LSOF_CC | grep gcc > /dev/null
+    $LSOF_CC --version | grep GCC > /dev/null
     if test $? -eq 0	# {
     then
       LSOF_CFGL="-w"
@@ -3881,6 +3881,9 @@
 	LSOF_TSTBIGF=" "
 	LSOF_TSTLFLG="-lsocket -lnsl"
 	LSOF_VERS="100000"
+	if [ ".`isainfo -k`" = .amd64 ]; then
+	    LSOF_CFGL="$LSOF_CFGL -lmp -lmd5 -lscf -ldoor -luutil"
+	fi
 	;;
       *)
 	echo Unknown Solaris version: $LSOF_VSTR
@@ -3959,7 +3962,7 @@
 	echo "main(){" >> ${LSOF_TMPC}.c
 	echo "enum prnodetype p=PR_GWINDOWS;}" >> ${LSOF_TMPC}.c
 	echo "Testing prdata.h for PR_GWINDOWS, using $LSOF_CC"
-	echo $LSOF_CC | grep gcc > /dev/null
+	$LSOF_CC --version | grep GCC > /dev/null
 	if test $? -eq 0	# {
 	then
 	  $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x  > /dev/null 2>&1
@@ -3984,7 +3987,7 @@
 	echo "main(){" >> ${LSOF_TMPC}.c
 	echo "enum prnodetype p=PR_LDT;}" >> ${LSOF_TMPC}.c
 	echo "Testing prdata.h for PR_LDT, using $LSOF_CC"
-	echo $LSOF_CC | grep gcc > /dev/null
+	$LSOF_CC --version | grep GCC > /dev/null
 	if test $? -eq 0	# {
 	then
 	  $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1
@@ -4014,7 +4017,7 @@
 	echo $SOLARIS_KERNBITS | grep 64 > /dev/null
 	if test $? -eq 0	# {
 	then
-	  echo $LSOF_CC | grep gcc > /dev/null
+	  $LSOF_CC --version | grep GCC > /dev/null
 	  if test $? -eq 0	# {
 	  then
 
@@ -4240,7 +4243,7 @@
       echo "main(){" >> ${LSOF_TMPC}.c
       echo "enum vtype p=VSOCK;}" >> ${LSOF_TMPC}.c
       echo "Testing vnode.h for VSOCK, using $LSOF_CC"
-      echo $LSOF_CC | grep gcc > /dev/null
+      $LSOF_CC --version | grep GCC > /dev/null
       if test $? -eq 0	# {
       then
 	$LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1
@@ -4838,7 +4841,7 @@
     echo "$i" >> $LSOF_TSTCFLG
   done	# }
 fi	# }
-echo $LSOF_CC | grep gcc > /dev/null 2>&1
+$LSOF_CC --version | grep GCC > /dev/null 2>&1
 if test $? -eq 0	# {
 then
   echo "-DLT_GCC" >> $LSOF_TSTCFLG
Index: dialects/freebsd/machine.h
--- dialects/freebsd/machine.h.orig	2006-03-28 01:29:14.000000000 +0200
+++ dialects/freebsd/machine.h	2006-10-14 13:09:30.370471813 +0200
@@ -436,6 +436,11 @@
  */
 
 /* #define	HASSECURITY	1 */
+#if    FREEBSDV>=6000
+#define        HASSECURITY     1
+#define        HAS_SI_PRIV     1
+#endif /* FREEBSDV>=6000 */
+
 
 
 /*
Index: dialects/sun/machine.h
--- dialects/sun/machine.h.orig	2006-03-28 00:57:40.000000000 +0200
+++ dialects/sun/machine.h	2006-10-14 13:09:30.370780612 +0200
@@ -75,6 +75,7 @@
 #include <sys/poll.h>
 
 # if	solaris>=80000
+#include <sys/types32.h>
 #include <sys/wait.h>
 #define	_KERNEL	1
 #include <netinet/in.h>
