diff -Naurw OpenPBS_2_3_12/Makefile.in OpenPBS_sss-2.3.15-5/Makefile.in
--- OpenPBS_2_3_12/Makefile.in	Tue Sep  5 16:55:04 2000
+++ OpenPBS_sss-2.3.15-5/Makefile.in	Tue Oct  7 09:33:56 2003
@@ -95,7 +95,7 @@
 all build depend install clean distclean::
 	@# do the distclean here so the sequencing can be assured
 	@# allow for empty subdir lists and abort make if any subdir fails
-	@if test $@ = all || $@ = build; then \
+	@if test $@ = all || test $@ = build; then \
 	    cd doc; $(MAKE) soelim ; fi
 	@case $@ in \
 	    *clean)  SDIRS="src buildutils doc";; \
diff -Naurw OpenPBS_2_3_12/addparam.sh OpenPBS_sss-2.3.15-5/addparam.sh
--- OpenPBS_2_3_12/addparam.sh	Wed Dec 31 16:00:00 1969
+++ OpenPBS_sss-2.3.15-5/addparam.sh	Fri Jan 24 15:03:27 2003
@@ -0,0 +1,62 @@
+#!/bin/sh 
+#script:  addparam 
+#usage:   addparam $Parameter  [S|L] 
+
+NewParameter=$1 
+ParameterType=x$2 
+
+if [ ! -d src/include ];  then 
+  echo "error: `basename $0` src/include doesn't exist, run configure" 1>&2 
+  exit 1 
+fi 
+
+#   run make in this directory to pull over the template files 
+cd src/include 
+if make 
+then 
+
+  if grep -q "\"$NewParameter\"" site_*.h 2>/dev/null;  then 
+    echo "parameter $NewParameter previously added" 
+    exit 0 
+  fi 
+fi 
+
+chmod +w site_job_attr_enum.h 
+echo " 
+  JOB_SITE_ATR_$1, 
+" >> site_job_attr_enum.h 
+
+chmod +w site_job_attr_def.h 
+
+if [ $ParameterType = "xS" ] 
+then 
+  echo " 
+    {   \"$NewParameter\", 
+        decode_str, 
+        encode_str, 
+        set_str, 
+        comp_str, 
+        free_str, 
+        NULL_FUNC, 
+        READ_WRITE, 
+        ATR_TYPE_STR, 
+        PARENT_TYPE_JOB 
+    }, 
+  " >> site_job_attr_def.h 
+else 
+  echo " 
+    {   \"$NewParameter\", 
+        decode_l, 
+        encode_l, 
+        set_l, 
+        comp_l, 
+        free_null, 
+        NULL_FUNC, 
+        READ_WRITE, 
+        ATR_TYPE_LONG, 
+        PARENT_TYPE_JOB 
+    }, 
+  " >> site_job_attr_def.h 
+fi 
+exit 0
+
diff -Naurw OpenPBS_2_3_12/buildutils/config.guess OpenPBS_sss-2.3.15-5/buildutils/config.guess
--- OpenPBS_2_3_12/buildutils/config.guess	Wed Oct 14 15:46:15 1998
+++ OpenPBS_sss-2.3.15-5/buildutils/config.guess	Fri Jan 24 15:03:27 2003
@@ -1,7 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
-#
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+#   Free Software Foundation, Inc.
+
+timestamp='2001-02-24'
+
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
@@ -22,18 +25,92 @@
 # the same distribution terms that you use for the rest of that program.
 
 # Written by Per Bothner <bothner@cygnus.com>.
-# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to <config-patches@gnu.org>.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
 # The plan is that this can be called by configure scripts if you
-# don't specify an explicit system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int dummy(){}" > $dummy.c
+	for c in cc gcc c89 ; do
+	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
+	  if test $? = 0 ; then
+	     CC_FOR_BUILD="$c"; break
+	  fi
+	done
+	rm -f $dummy.c $dummy.o $dummy.rel
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 8/24/94.)
@@ -46,30 +123,131 @@
 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
-
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# Netbsd (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	# Determine the machine/vendor (is the vendor relevant).
+	case "${UNAME_MACHINE}" in
+	    amiga) machine=m68k-unknown ;;
+	    arm32) machine=arm-unknown ;;
+	    atari*) machine=m68k-atari ;;
+	    sun3*) machine=m68k-sun ;;
+	    mac68k) machine=m68k-apple ;;
+	    macppc) machine=powerpc-apple ;;
+	    hp3[0-9][05]) machine=m68k-hp ;;
+	    ibmrt|romp-ibm) machine=romp-ibm ;;
+	    *) machine=${UNAME_MACHINE}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE}" in
+	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
     alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
+	cat <<EOF >$dummy.s
+	.data
+\$Lformat:
+	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
+
+	.text
+	.globl main
+	.align 4
+	.ent main
+main:
+	.frame \$30,16,\$26,0
+	ldgp \$29,0(\$27)
+	.prologue 1
+	.long 0x47e03d80 # implver \$0
+	lda \$2,-1
+	.long 0x47e20c21 # amask \$2,\$1
+	lda \$16,\$Lformat
+	mov \$0,\$17
+	not \$1,\$18
+	jsr \$26,printf
+	ldgp \$29,0(\$26)
+	mov 0,\$16
+	jsr \$26,exit
+	.end main
+EOF
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		case `./$dummy` in
+			0-0)
+				UNAME_MACHINE="alpha"
+				;;
+			1-0)
+				UNAME_MACHINE="alphaev5"
+				;;
+			1-1)
+				UNAME_MACHINE="alphaev56"
+				;;
+			1-101)
+				UNAME_MACHINE="alphapca56"
+				;;
+			2-303)
+				UNAME_MACHINE="alphaev6"
+				;;
+			2-307)
+				UNAME_MACHINE="alphaev67"
+				;;
+		esac
+	fi
+	rm -f $dummy.s $dummy
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
 	exit 0 ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
 	exit 0 ;;
     Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-cbm-sysv4
-	exit 0;;
-    amiga:NetBSD:*:*)
-      echo m68k-cbm-netbsd${UNAME_RELEASE}
+	echo m68k-unknown-sysv4
       exit 0 ;;
     amiga:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
     arc64:OpenBSD:*:*)
 	echo mips64el-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -88,13 +266,16 @@
     wgrisc:OpenBSD:*:*)
 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
 	exit 0;;
-    SR2?01:HI-UX/MPP:*:*)
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
 	exit 0;;
-    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
 		echo pyramid-pyramid-sysv3
@@ -102,9 +283,12 @@
 		echo pyramid-pyramid-bsd
 	fi
 	exit 0 ;;
-    NILE:*:*:dcosx)
+    NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
 	exit 0 ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit 0 ;;
@@ -129,24 +313,53 @@
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
 	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
 	exit 0 ;;
-    atari*:NetBSD:*:*)
-	echo m68k-atari-netbsd${UNAME_RELEASE}
-	exit 0 ;;
     atari*:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    sun3*:NetBSD:*:*)
-	echo m68k-sun-netbsd${UNAME_RELEASE}
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
 	exit 0 ;;
     sun3*:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    mac68k:NetBSD:*:*)
-	echo m68k-apple-netbsd${UNAME_RELEASE}
-	exit 0 ;;
     mac68k:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -168,9 +381,17 @@
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
 	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-	sed 's/^	//' << EOF >dummy.c
-	int main (argc, argv) int argc; char **argv; {
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
 	#if defined (host_mips) && defined (MIPSEB)
 	#if defined (SYSTYPE_SYSV)
 	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
@@ -185,10 +406,10 @@
 	  exit (-1);
 	}
 EOF
-	${CC-cc} dummy.c -o dummy \
-	  && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
+	$CC_FOR_BUILD $dummy.c -o $dummy \
+	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && rm $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
 	echo mips-mips-riscos${UNAME_RELEASE}
 	exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
@@ -206,14 +427,17 @@
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
-        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
-	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
 		echo m88k-dg-dgux${UNAME_RELEASE}
 	else
 		echo m88k-dg-dguxbcs${UNAME_RELEASE}
 	fi
-        else echo i586-dg-dgux${UNAME_RELEASE}
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
         fi
  	exit 0 ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
@@ -238,9 +462,17 @@
     i?86:AIX:*:*)
 	echo i386-ibm-aix
 	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		sed 's/^		//' << EOF >dummy.c
+		sed 's/^		//' << EOF >$dummy.c
 		#include <sys/systemcfg.h>
 
 		main()
@@ -251,8 +483,8 @@
 			exit(0);
 			}
 EOF
-		${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-		rm -f dummy.c dummy
+		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+		rm -f $dummy.c $dummy
 		echo rs6000-ibm-aix3.2.5
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
@@ -260,8 +492,9 @@
 		echo rs6000-ibm-aix3.2
 	fi
 	exit 0 ;;
-    *:AIX:*:4)
-	if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
 		IBM_ARCH=powerpc
@@ -269,7 +502,7 @@
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
 	else
-		IBM_REV=4.${UNAME_RELEASE}
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
 	exit 0 ;;
@@ -279,7 +512,7 @@
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
 	exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
 	exit 0 ;;                           # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
@@ -294,18 +527,75 @@
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
 	exit 0 ;;
-    9000/[3478]??:HP-UX:*:*)
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case "${UNAME_MACHINE}" in
 	    9000/31? )            HP_ARCH=m68000 ;;
 	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
-	    9000/8?? )            HP_ARCH=hppa1.0 ;;
+	    9000/[678][0-9][0-9])
+              case "${HPUX_REV}" in
+                11.[0-9][0-9])
+                  if [ -x /usr/bin/getconf ]; then
+                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                        esac ;;
+                    esac
+                  fi ;;
+              esac
+              if [ "${HP_ARCH}" = "" ]; then
+              sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+	rm -f $dummy.c $dummy
+	fi ;;
 	esac
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
 	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
     3050*:HI-UX:*:*)
-	sed 's/^	//' << EOF >dummy.c
+	sed 's/^	//' << EOF >$dummy.c
 	#include <unistd.h>
 	int
 	main ()
@@ -330,8 +620,8 @@
 	  exit (0);
 	}
 EOF
-	${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
+	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
 	echo unknown-hitachi-hiuxwe2
 	exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -340,6 +630,9 @@
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
 	exit 0 ;;
+    *9??*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
 	exit 0 ;;
@@ -356,6 +649,9 @@
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
 	exit 0 ;;
+    hppa*:OpenBSD:*:*)
+	echo hppa-unknown-openbsd
+	exit 0 ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
         exit 0 ;;
@@ -386,78 +682,91 @@
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
 	exit 0 ;;
     CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE}
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3D:*:*:*)
+	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     CRAY*T3E:*:*:*)
-	echo t3e-cray-${UNAME_VERSION}
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     CRAY-2:*:*:*)
 	echo cray2-cray-unicos
         exit 0 ;;
-    F300:UNIX_System_V:*:*)
-        FUJITSU_SYS=`uname -p | tr '[A-Z]' '[a-z]' | sed -e 's/\///'`
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
-    F301:UNIX_System_V:*:*)
-       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
-       exit 0 ;;
-    hp3[0-9][05]:NetBSD:*:*)
-	echo m68k-hp-netbsd${UNAME_RELEASE}
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit 0 ;;
     hp300:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    i?86:BSD/386:*:* | *:BSD/OS:*:*)
+    i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
 	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
     *:FreeBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit 0 ;;
-    *:NetBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
     *:OpenBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 	exit 0 ;;
     i*:CYGWIN*:*)
-	echo i386-pc-cygwin32
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i386-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
 	exit 0 ;;
     p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin32
+	echo powerpcle-unknown-cygwin
 	exit 0 ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit 0 ;;
     *:GNU:*:*)
-	echo `echo ${UNAME_MACHINE}|sed -e 's,-.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit 0 ;;
-    *:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us.
-	ld_help_string=`ld --help 2>&1`
-	if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
-	  echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
-	  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
-	  echo "powerpc-unknown-linux-gnu" ; exit 0
-	elif test "${UNAME_MACHINE}" = "alpha" ; then
-	  echo alpha-unknown-linux-gnu ; exit 0
-	elif test "${UNAME_MACHINE}" = "sparc" ; then
-	  echo sparc-unknown-linux-gnu ; exit 0
-	elif test "${UNAME_MACHINE}" = "mips" ; then
-	  cat >dummy.c <<EOF
-main(argc, argv)
-int argc;
-char *argv[];
-{
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnuaout
+	exit 0 ;;
+    mips:Linux:*:*)
+	cat >$dummy.c <<EOF
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+int main (int argc, char *argv[]) {
+#else
+int main (argc, argv) int argc; char *argv[]; {
+#endif
 #ifdef __MIPSEB__
   printf ("%s-unknown-linux-gnu\n", argv[1]);
 #endif
@@ -467,38 +776,198 @@
   return 0;
 }
 EOF
-	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-	  rm -f dummy.c dummy
-	else
-	  # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
-	  # useful --help.  Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
-	  test ! -d /usr/lib/ldscripts/. \
-	    && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-	  # Determine whether the default compiler is a.out or elf
-	  cat >dummy.c <<EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	;;
+    ppc:Linux:*:*)
+	# Determine Lib Version
+	cat >$dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
 main(argc, argv)
 int argc;
 char *argv[];
 {
+#if defined(__GLIBC__)
+  printf("%s %s\n", __libc_version, __libc_release);
+#else
+  printf("unknown\n");
+#endif
+  return 0;
+}
+EOF
+	LIBC=""
+	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		./$dummy | grep 1\.99 > /dev/null
+		if test "$?" = 0 ; then LIBC="libc1" ; fi
+	fi
+	rm -f $dummy.c $dummy
+	echo powerpc-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    alpha:Linux:*:*)
+	cat <<EOF >$dummy.s
+	  .data
+	  \$Lformat:
+		.byte 37,100,45,37,120,10,0	# "%d-%x\n"
+	   .text
+		.globl main
+		.align 4
+		.ent main
+	    main:
+		.frame \$30,16,\$26,0
+		ldgp \$29,0(\$27)
+		.prologue 1
+		.long 0x47e03d80 # implver \$0
+		lda \$2,-1
+		.long 0x47e20c21 # amask \$2,\$1
+		lda \$16,\$Lformat
+		mov \$0,\$17
+		not \$1,\$18
+		jsr \$26,printf
+		ldgp \$29,0(\$26)
+		mov 0,\$16
+		jsr \$26,exit
+		.end main
+EOF
+	LIBC=""
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		case `./$dummy` in
+		0-0)	UNAME_MACHINE="alpha" ;;
+		1-0)	UNAME_MACHINE="alphaev5" ;;
+		1-1)    UNAME_MACHINE="alphaev56" ;;
+		1-101)	UNAME_MACHINE="alphapca56" ;;
+		2-303)	UNAME_MACHINE="alphaev6" ;;
+		2-307)	UNAME_MACHINE="alphaev67" ;;
+		esac
+		objdump --private-headers $dummy | \
+		  grep ld.so.1 > /dev/null
+		if test "$?" = 0 ; then
+			LIBC="libc1"
+		fi
+	fi
+	rm -f $dummy.s $dummy
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sparc:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit 0 ;;
+    i?86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	ld_supported_emulations=`cd /; ld --help 2>&1 \
+			 | sed -ne '/supported emulations:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported emulations: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_emulations" in
+	  i?86linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0
+		;;
+	  elf_i?86)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  i?86coff)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0
+		;;
+	esac
+	# Either a pre-BFD a.out linker (linux-gnuoldld)
+	# or one that does not give us useful --help.
+	# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+	# If ld does not provide *any* "supported emulations:"
+	# that means it is gnuoldld.
+	test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+	case "${UNAME_MACHINE}" in
+	i?86)
+	  VENDOR=pc;
+	  ;;
+	*)
+	  VENDOR=unknown;
+	  ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
 #ifdef __ELF__
-  printf ("%s-pc-linux-gnu\n", argv[1]);
+# ifdef __GLIBC__
+#  if __GLIBC__ >= 2
+    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+#  else
+    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+#  endif
 #else
-  printf ("%s-pc-linux-gnuaout\n", argv[1]);
+   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
 #endif
   return 0;
 }
 EOF
-	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-	  rm -f dummy.c dummy
-	fi ;;
+	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
 # are messed up and put the nodename in both sysname and nodename.
     i?86:DYNIX/ptx:4*:*)
 	echo i386-sequent-sysv4
 	exit 0 ;;
+    i?86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
     i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i?86:*:5:7*)
+        # Fixed at (any) Pentium or better
+        UNAME_MACHINE=i586
+        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+	    echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
 	fi
@@ -512,11 +981,24 @@
 		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
 		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
 			&& UNAME_MACHINE=i586
+		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
 		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
 	else
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
 	exit 0 ;;
+    i?86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
 	exit 0 ;;
@@ -536,7 +1018,7 @@
 	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -553,18 +1035,24 @@
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
 	exit 0 ;;
-    i?86:LynxOS:2.*:*)
+    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
 	echo i386-unknown-lynxos${UNAME_RELEASE}
 	exit 0 ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
 	exit 0 ;;
-    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+    rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
 	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
 	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
     RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
 	exit 0 ;;
@@ -592,19 +1080,101 @@
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
 	exit 0 ;;
-    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
 	        echo mips-nec-sysv${UNAME_RELEASE}
 	else
 	        echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
         exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	echo `uname -p`-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	if test "${UNAME_MACHINE}" = "x86pc"; then
+		UNAME_MACHINE=pc
+	fi
+	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-[KW]:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 0 ;;
+    i?86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit 0 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 
-cat >dummy.c <<EOF
+cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
 # include <sys/types.h>
 # include <sys/utsname.h>
@@ -642,7 +1212,10 @@
 #endif
   int version;
   version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
   printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
   exit (0);
 #endif
 
@@ -688,7 +1261,20 @@
 
 #if defined (vax)
 #if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
   printf ("vax-dec-bsd\n"); exit (0);
+#  endif
 #else
   printf ("vax-dec-ultrix\n"); exit (0);
 #endif
@@ -702,8 +1288,8 @@
 }
 EOF
 
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
 
 # Apollos put the system type in the environment.
 
@@ -735,7 +1321,48 @@
     esac
 fi
 
-#echo '(Unable to guess system type)' 1>&2
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
 
 exit 1
 
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff -Naurw OpenPBS_2_3_12/buildutils/config.sub OpenPBS_sss-2.3.15-5/buildutils/config.sub
--- OpenPBS_2_3_12/buildutils/config.sub	Wed Oct 14 15:46:17 1998
+++ OpenPBS_sss-2.3.15-5/buildutils/config.sub	Fri Jan 24 15:03:27 2003
@@ -1,6 +1,10 @@
 #! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+#   Free Software Foundation, Inc.
+
+timestamp='2001-02-16'
+
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 # can handle that machine.  It does not imply ALL GNU software can.
@@ -25,6 +29,8 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+# Please send patches to <config-patches@gnu.org>.
+#
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
@@ -45,30 +51,73 @@
 #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
-if [ x$1 = x ]
-then
-	echo Configuration name missing. 1>&2
-	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
-	echo "or     $0 ALIAS" 1>&2
-	echo where ALIAS is a recognized configuration type. 1>&2
-	exit 1
-fi
+me=`echo "$0" | sed -e 's,.*/,,'`
 
-# First pass through any local machine types.
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
 case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
 	*local*)
+       # First pass through any local machine types.
 		echo $1
-		exit 0
-		;;
+       exit 0;;
+
 	*)
-	;;
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
 esac
 
 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  linux-gnu*)
+  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -94,28 +143,25 @@
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple)
+	-apple | -axis)
 		os=
 		basic_machine=$1
 		;;
-	-sim | -cisco | -oki | -wec | -winbond )	# CYGNUS LOCAL
+	-sim | -cisco | -oki | -wec | -winbond)
 		os=
 		basic_machine=$1
 		;;
-	-scout)						# CYGNUS LOCAL
+	-scout)
 		;;
-	-wrs)						# CYGNUS LOCAL
-		os=vxworks
+	-wrs)
+		os=-vxworks
 		basic_machine=$1
 		;;
-        -hiuxmpp)
-                os=-hiuxmpp
-                ;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
 	-sco5)
-		os=sco3.2v5
+		os=-sco3.2v5
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco4)
@@ -134,6 +180,9 @@
 		os=-sco3.2v2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-isc)
 		os=-isc2.2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -156,51 +205,48 @@
 	-psos*)
 		os=-psos
 		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
 esac
 
 # Decode aliases for certain CPU-COMPANY combinations.
 case $basic_machine in
 	# Recognize the basic CPU types without company name.
 	# Some are omitted here because they have special meanings below.
-	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arm \
-		| arme[lb] | pyramid | mn10300 \
-		| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
-		| alpha | we32k | ns16k | clipper | i370 | sh \
-		| powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
-		| pdp11 | mips64el | mips64orion | mips64orionel \
-		| sparc | sparclet | sparclite | sparc64)
-		basic_machine=$basic_machine-unknown
-		;;
-	m88110 | m680[01234]0 | m683?2 | m68360 | z8k | v70 | h8500 | w65) # CYGNUS LOCAL
-		basic_machine=$basic_machine-unknown
-		;;
-	mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith/vr4300
-		basic_machine=$basic_machine-unknown
-		;;
-	mips64vr4100 | mips64vr4100el) # CYGNUS LOCAL jsmith/vr4100
-		basic_machine=$basic_machine-unknown
-		;;
-	mips64vr5000 | mips64vr5000el) # CYGNUS LOCAL ian/vr5000
-		basic_machine=$basic_machine-unknown
-		;;
-	mips16) # CYGNUS LOCAL krk/mips16
+	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
+	        | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
+		| pyramid | mn10200 | mn10300 | tron | a29k \
+		| 580 | i960 | h8300 \
+		| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
+		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+		| hppa64 \
+		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
+		| alphaev6[78] \
+		| we32k | ns16k | clipper | i370 | sh | sh[34] \
+		| powerpc | powerpcle \
+		| 1750a | dsp16xx | pdp10 | pdp11 \
+		| mips16 | mips64 | mipsel | mips64el \
+		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
+		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+		| mips64vr5000 | miprs64vr5000el | mcore \
+		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+		| thumb | d10v | d30v | fr30 | avr | openrisc)
 		basic_machine=$basic_machine-unknown
 		;;
-# CYGNUS LOCAL law
-	mn10200)
-		basic_machine=$basic_machine-unknown
-		;;
-# END CYGNUS LOCAL
-	d10v)				# CYGNUS LOCAL meissner/d10v
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
+		os=-none
 		;;
-	mn10200)			# CYGNUS LOCAL
-		basic_machine=$basic_machine-unknown
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
 		;;
+
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
-	i[3456]86)
+	i[234567]86 | x86_64)
 	  basic_machine=$basic_machine-pc
 	  ;;
 	# Object if more than one company name word.
@@ -209,26 +255,34 @@
 		exit 1
 		;;
 	# Recognize the basic CPU types with company name.
-	vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
-	      | m88k-* | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
-	      | none-* | 580-* | cray2-* | h8300-* | i960-* | t3e-* | xmp-* | ymp-* \
-	      | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
-	      | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
-	      | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
-	      | mips64el-* | mips64orion-* | mips64orionel-* | f300-* | f301-*)
-		;;
-	m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # CYGNUS LOCAL
-		;;
-	mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith/vr4300
-		;;
-	mips64vr4100-* | mips64vr4100el-*) # CYGNUS LOCAL jsmith/vr4100
-		;;
-	mips16-*) # CYGNUS LOCAL krk/mips16
+	# FIXME: clean up the formatting here.
+	vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
+	      | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
+	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+	      | xmp-* | ymp-* \
+	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
+	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
+	      | hppa2.0n-* | hppa64-* \
+	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
+	      | alphaev6[78]-* \
+	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+	      | clipper-* | orion-* \
+	      | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
+	      | mips64el-* | mips64orion-* | mips64orionel-* \
+	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+	      | mipstx39-* | mipstx39el-* | mcore-* \
+	      | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
+	      | [cjt]90-* \
+	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+	      | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
+	      | bs2000-* | tic54x-* | c54x-* | x86_64-*)
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
-	386bsd)						# CYGNUS LOCAL
+	386bsd)
 		basic_machine=i386-unknown
 		os=-bsd
 		;;
@@ -238,11 +292,11 @@
 	3b*)
 		basic_machine=we32k-att
 		;;
-	a29khif)					# CYGNUS LOCAL
+	a29khif)
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-	adobe68k)					# CYGNUS LOCAL
+	adobe68k)
 		basic_machine=m68010-adobe
 		os=-scout
 		;;
@@ -261,21 +315,21 @@
 		os=-sysv
 		;;
 	amiga | amiga-*)
-		basic_machine=m68k-cbm
+		basic_machine=m68k-unknown
 		;;
-	amigados)
-		basic_machine=m68k-cbm
-		os=-amigados
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
 		;;
 	amigaunix | amix)
-		basic_machine=m68k-cbm
+		basic_machine=m68k-unknown
 		os=-sysv4
 		;;
 	apollo68)
 		basic_machine=m68k-apollo
 		os=-sysv
 		;;
-	apollo68bsd)					# CYGNUS LOCAL
+	apollo68bsd)
 		basic_machine=m68k-apollo
 		os=-bsd
 		;;
@@ -315,13 +369,16 @@
 		basic_machine=cray2-cray
 		os=-unicos
 		;;
-	[ctj]90-cray)
-		basic_machine=c90-cray
+	[cjt]90)
+		basic_machine=${basic_machine}-cray
 		os=-unicos
 		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
@@ -355,7 +412,7 @@
 	encore | umax | mmax)
 		basic_machine=ns32k-encore
 		;;
-	es1800 | OSE68k | ose68k | ose | OSE)		# CYGNUS LOCAL
+	es1800 | OSE68k | ose68k | ose | OSE)
 		basic_machine=m68k-ericsson
 		os=-ose
 		;;
@@ -369,9 +426,9 @@
 		basic_machine=tron-gmicro
 		os=-sysv
 		;;
-        hiuxmpp)
-                basic_machine=hppa1.1-hitachi
-                os=-hiuxmpp
+	go32)
+		basic_machine=i386-pc
+		os=-go32
                 ;;
 	h3050r* | hiux*)
 		basic_machine=hppa1.1-hitachi
@@ -381,11 +438,11 @@
 		basic_machine=h8300-hitachi
 		os=-hms
 		;;
-	h8300xray)					# CYGNUS LOCAL
+	h8300xray)
 		basic_machine=h8300-hitachi
 		os=-xray
 		;;
-	h8500hms)					# CYGNUS LOCAL
+	h8500hms)
 		basic_machine=h8500-hitachi
 		os=-hms
 		;;
@@ -404,21 +461,8 @@
 		basic_machine=m68k-hp
 		os=-hpux
 		;;
-        w89k-*)						# CYGNUS LOCAL
-                basic_machine=hppa1.1-winbond
-                os=-proelf
-                ;;
-        op50n-*)					# CYGNUS LOCAL
-                basic_machine=hppa1.1-oki
-                os=-proelf
-                ;;
-        op60c-*)					# CYGNUS LOCAL
-                basic_machine=hppa1.1-oki
-                os=-proelf
-                ;;
-        hppro)						# CYGNUS LOCAL
-                basic_machine=hppa1.1-hp
-                os=-proelf
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
                 ;;
 	hp9k2[0-9][0-9] | hp9k31[0-9])
 		basic_machine=m68000-hp
@@ -426,7 +470,21 @@
 	hp9k3[2-9][0-9])
 		basic_machine=m68k-hp
 		;;
-	hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
 		basic_machine=hppa1.1-hp
 		;;
 	hp9k8[0-9][0-9] | hp8[0-9][0-9])
@@ -435,43 +493,42 @@
 	hppa-next)
 		os=-nextstep3
 		;;
-	hppaosf)					# CYGNUS LOCAL
+	hppaosf)
 		basic_machine=hppa1.1-hp
 		os=-osf
 		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
 	i370-ibm* | ibm*)
 		basic_machine=i370-ibm
-		os=-mvs
 		;;
 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i[3456]86v32)
+	i[34567]86v32)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv32
 		;;
-	i[3456]86v4*)
+	i[34567]86v4*)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv4
 		;;
-	i[3456]86v)
+	i[34567]86v)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv
 		;;
-	i[3456]86sol2)
+	i[34567]86sol2)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-solaris2
 		;;
-	i386mach)					# CYGNUS LOCAL
+	i386mach)
 		basic_machine=i386-mach
 		os=-mach
 		;;
-	i386-vsta | vsta)				# CYGNUS LOCAL
+	i386-vsta | vsta)
 		basic_machine=i386-unknown
 		os=-vsta
 		;;
-	i386-go32 | go32)				# CYGNUS LOCAL
-		basic_machine=i386-unknown
-		os=-go32
-		;;
 	iris | iris4d)
 		basic_machine=mips-sgi
 		case $os in
@@ -497,16 +554,24 @@
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
 	mipsel*-linux*)
 		basic_machine=mipsel-unknown
-		os=-linux
+		os=-linux-gnu
 		;;
 	mips*-linux*)
 		basic_machine=mips-unknown
-		os=-linux
+		os=-linux-gnu
 		;;
 	mips3*-*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
@@ -514,22 +579,34 @@
 	mips3*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 		;;
-	monitor)					# CYGNUS LOCAL
+	mmix*)
+		basic_machine=mmix-knuth
+		os=-mmixware
+		;;
+	monitor)
 		basic_machine=m68k-rom68k
 		os=-coff
 		;;
-	msdos)						# CYGNUS LOCAL
-		basic_machine=i386-unknown	
+	msdos)
+		basic_machine=i386-pc
 		os=-msdos
 		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
 	ncr3000)
 		basic_machine=i486-ncr
 		os=-sysv4
 		;;
 	netbsd386)
-		basic_machine=i386-unknown		# CYGNUS LOCAL
+		basic_machine=i386-unknown
 		os=-netbsd
 		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
 	news | news700 | news800 | news900)
 		basic_machine=m68k-sony
 		os=-newsos
@@ -542,7 +619,7 @@
 		basic_machine=mips-sony
 		os=-newsos
 		;;
-	necv70)						# CYGNUS LOCAL
+	necv70)
 		basic_machine=v70-nec
 		os=-sysv
 		;;
@@ -571,18 +648,29 @@
 		basic_machine=i960-intel
 		os=-nindy
 		;;
-	mon960)						# CYGNUS LOCAL
+	mon960)
 		basic_machine=i960-intel
 		os=-mon960
 		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
 	np1)
 		basic_machine=np1-gould
 		;;
-	OSE68000 | ose68000)				# CYGNUS LOCAL
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
 		os=-ose
 		;;
-	os68k)						# CYGNUS LOCAL
+	os68k)
 		basic_machine=m68k-none
 		os=-os68k
 		;;
@@ -603,30 +691,28 @@
         pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
-	pentium | p5)
-		basic_machine=i586-intel
+	pentium | p5 | k5 | k6 | nexgen)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon)
+		basic_machine=i686-pc
 		;;
-	pentiumpro | p6)
-		basic_machine=i686-intel
+	pentiumii | pentium2)
+		basic_machine=i686-pc
 		;;
-	pentium-* | p5-*)
+	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	pentiumpro-* | p6-*)
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	k5)
-		# We don't have specific support for AMD's K5 yet, so just call it a Pentium
-		basic_machine=i586-amd
-		;;
-	nexen)
-		# We don't have specific support for Nexgen yet, so just call it a Pentium
-		basic_machine=i586-nexgen
+	pentiumii-* | pentium2-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pn)
 		basic_machine=pn-gould
 		;;
-	power)	basic_machine=rs6000-ibm
+	power)	basic_machine=power-ibm
 		;;
 	ppc)	basic_machine=powerpc-unknown
 	        ;;
@@ -641,7 +727,11 @@
 	ps2)
 		basic_machine=i386-ibm
 		;;
-	rom68k)						# CYGNUS LOCAL
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
 		basic_machine=m68k-rom68k
 		os=-coff
 		;;
@@ -651,7 +741,7 @@
 	rtpc | rtpc-*)
 		basic_machine=romp-ibm
 		;;
-	sa29200)					# CYGNUS LOCAL
+	sa29200)
 		basic_machine=a29k-amd
 		os=-udi
 		;;
@@ -662,7 +752,7 @@
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
-	sparclite-wrs)					# CYGNUS LOCAL
+	sparclite-wrs)
 		basic_machine=sparclite-wrs
 		os=-vxworks
 		;;
@@ -673,10 +763,10 @@
 	spur)
 		basic_machine=spur-unknown
 		;;
-	st2000)						# CYGNUS LOCAL
+	st2000)
 		basic_machine=m68k-tandem
 		;;
-	stratus)					# CYGNUS LOCAL
+	stratus)
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
@@ -720,10 +810,28 @@
 	sun386 | sun386i | roadrunner)
 		basic_machine=i386-sun
 		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
 	symmetry)
 		basic_machine=i386-sequent
 		os=-dynix
 		;;
+	t3e)
+		basic_machine=t3e-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
@@ -735,7 +843,7 @@
 		basic_machine=a29k-nyu
 		os=-sym1
 		;;
-	v810 | necv810)					# CYGNUS LOCAL
+	v810 | necv810)
 		basic_machine=v810-nec
 		os=-none
 		;;
@@ -762,10 +870,14 @@
 		basic_machine=a29k-wrs
 		os=-vxworks
 		;;
-	w65*)						# CYGNUS LOCAL
+	w65*)
  		basic_machine=w65-wdc
  		os=-none
 		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
 	xmp)
 		basic_machine=xmp-cray
 		os=-unicos
@@ -773,7 +885,7 @@
         xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
-	z8k-*-coff)					# CYGNUS LOCAL
+	z8k-*-coff)
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
@@ -784,17 +896,17 @@
 
 # Here we handle the default manufacturer of certain CPU types.  It is in
 # some cases the only manufacturer, in others, it is the most popular.
-	w89k)						# CYGNUS LOCAL
+	w89k)
 		basic_machine=hppa1.1-winbond
 		;;
-	op50n)						# CYGNUS LOCAL
+	op50n)
 		basic_machine=hppa1.1-oki
 		;;
-	op60c)						# CYGNUS LOCAL
+	op60c)
 		basic_machine=hppa1.1-oki
 		;;
 	mips)
-		if [ x$os = x-linux ]; then
+		if [ x$os = x-linux-gnu ]; then
 			basic_machine=mips-unknown
 		else
 			basic_machine=mips-mips
@@ -809,13 +921,20 @@
 	vax)
 		basic_machine=vax-dec
 		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
 	pdp11)
 		basic_machine=pdp11-dec
 		;;
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sparc)
+	sh3 | sh4)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv9)
 		basic_machine=sparc-sun
 		;;
         cydra)
@@ -827,12 +946,16 @@
 	orion105)
 		basic_machine=clipper-highlevel
 		;;
-	mac | mpw | mac-mpw)				# CYGNUS LOCAL
+	mac | mpw | mac-mpw)
 		basic_machine=m68k-apple
 		;;
-	pmac | pmac-mpw)				# CYGNUS LOCAL
+	pmac | pmac-mpw)
 		basic_machine=powerpc-apple
 		;;
+	c4x*)
+		basic_machine=c4x-none
+		os=-coff
+		;;
 	*)
 		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
 		exit 1
@@ -865,9 +988,12 @@
 	-solaris)
 		os=-solaris2
 		;;
-	-unixware* | svr4*)
+	-svr4*)
 		os=-sysv4
 		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
 	-gnu/linux*)
 		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
 		;;
@@ -878,26 +1004,40 @@
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -linux-gnu* | -uxpv*)
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
-	# CYGNUS LOCAL
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i[34567]86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto*)
+		os=-nto-qnx
+		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
 	      | -windows* | -osx | -abug |  -netware* | -os9* | -beos* \
-	      | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
 		os=`echo $os | sed -e 's|mac|macos|'`
 		;;
-	# END CYGNUS LOCAL
 	-linux*)
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 		;;
@@ -907,6 +1047,12 @@
 	-sunos6*)
 		os=`echo $os | sed -e 's|sunos6|solaris3|'`
 		;;
+	-opened*)
+		os=-openedition
+		;;
+	-wince*)
+		os=-wince
+		;;
 	-osfrose*)
 		os=-osfrose
 		;;
@@ -922,7 +1068,7 @@
 	-acis*)
 		os=-aos
 		;;
-	-386bsd)					# CYGNUS LOCAL
+	-386bsd)
 		os=-bsd
 		;;
 	-ctix* | -uts*)
@@ -931,6 +1077,9 @@
 	-ns2 )
 	        os=-nextstep2
 		;;
+	-nsk*)
+		os=-nsk
+		;;
 	# Preserve the version number of sinix5.
 	-sinix5.*)
 		os=`echo $os | sed -e 's|sinix|sysv|'`
@@ -956,15 +1105,18 @@
 	# This must come after -sysvr4.
 	-sysv*)
 		;;
-	-ose*)						# CYGNUS LOCAL
+	-ose*)
 		os=-ose
 		;;
-	-es1800*)					# CYGNUS LOCAL
+	-es1800*)
 		os=-ose
 		;;
 	-xenix)
 		os=-xenix
 		;;
+        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+	        os=-mint
+		;;
 	-none)
 		;;
 	*)
@@ -990,9 +1142,15 @@
 	*-acorn)
 		os=-riscix1.2
 		;;
+	arm*-rebel)
+		os=-linux
+		;;
 	arm*-semi)
 		os=-aout
 		;;
+	pdp10-*)
+		os=-tops20
+		;;
         pdp11-*)
 		os=-none
 		;;
@@ -1011,13 +1169,13 @@
 		# default.
 		# os=-sunos4
 		;;
-	m68*-cisco)					# CYGNUS LOCAL
+	m68*-cisco)
 		os=-aout
 		;;
-	mips*-cisco)					# CYGNUS LOCAL
+	mips*-cisco)
 		os=-elf
 		;;
-        mips*-*)                                        # CYGNUS LOCAL
+	mips*-*)
                 os=-elf
                 ;;
 	*-tti)	# must be before sparc entry or we get the wrong os.
@@ -1026,19 +1184,19 @@
 	sparc-* | *-sun)
 		os=-sunos4.1.1
 		;;
-	*-be)						# CYGNUS LOCAL
+	*-be)
 		os=-beos
 		;;
 	*-ibm)
 		os=-aix
 		;;
-	*-wec)						# CYGNUS LOCAL
+	*-wec)
 		os=-proelf
 		;;
-	*-winbond)					# CYGNUS LOCAL
+	*-winbond)
 		os=-proelf
 		;;
-	*-oki)						# CYGNUS LOCAL
+	*-oki)
 		os=-proelf
 		;;
 	*-hp)
@@ -1051,7 +1209,7 @@
 		os=-sysv
 		;;
 	*-cbm)
-		os=-amigados
+		os=-amigaos
 		;;
 	*-dg)
 		os=-dgux
@@ -1101,18 +1259,21 @@
 	*-masscomp)
 		os=-rtu
 		;;
-	f30?-fujitsu)
+	f30[01]-fujitsu | f700-fujitsu)
 		os=-uxpv
 		;;
-	*-rom68k)					# CYGNUS LOCAL
+	*-rom68k)
 		os=-coff
 		;;
-	*-*bug)						# CYGNUS LOCAL
+	*-*bug)
 		os=-coff
 		;;
-	*-apple)					# CYGNUS LOCAL
+	*-apple)
 		os=-macos
 		;;
+	*-atari*)
+		os=-mint
+		;;
 	*)
 		os=-none
 		;;
@@ -1134,12 +1295,15 @@
 			-aix*)
 				vendor=ibm
 				;;
-			-beos*)						# CYGNUS LOCAL
+			-beos*)
 				vendor=be
 				;;
 			-hpux*)
 				vendor=hp
 				;;
+			-mpeix*)
+				vendor=hp
+				;;
 			-hiux*)
 				vendor=hitachi
 				;;
@@ -1155,7 +1319,7 @@
 			-genix*)
 				vendor=ns
 				;;
-			-mvs*)
+			-mvs* | -opened*)
 				vendor=ibm
 				;;
 			-ptx*)
@@ -1167,16 +1331,26 @@
 			-aux*)
 				vendor=apple
 				;;
-			-hms*)				# CYGNUS LOCAL
+			-hms*)
 				vendor=hitachi
 				;;
-			-mpw* | -macos*)		# CYGNUS LOCAL
+			-mpw* | -macos*)
 				vendor=apple
 				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
 		esac
 		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
 		;;
 esac
 
 echo $basic_machine$os
+exit 0
 
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff -Naurw OpenPBS_2_3_12/buildutils/makedepend-sh OpenPBS_sss-2.3.15-5/buildutils/makedepend-sh
--- OpenPBS_2_3_12/buildutils/makedepend-sh	Wed Nov 17 09:32:52 1999
+++ OpenPBS_sss-2.3.15-5/buildutils/makedepend-sh	Wed Oct 29 17:36:04 2003
@@ -576,6 +576,7 @@
                 eval $CPP $arg_cc $d/$s $errout | \
                   sed -n -e "s;^\# [0-9][0-9 ]*\"\(.*\)\";$f: \1;p" | \
                   grep -v "$s\$" | \
+                  grep -v ">$" | \
                   sed -e 's;\([^ :]*: [^ ]*\).*;\1;' \
                   >> $TMP
                 ;;
diff -Naurw OpenPBS_2_3_12/buildutils/pbs_mkdirs.in OpenPBS_sss-2.3.15-5/buildutils/pbs_mkdirs.in
--- OpenPBS_2_3_12/buildutils/pbs_mkdirs.in	Tue Aug  8 17:15:57 2000
+++ OpenPBS_sss-2.3.15-5/buildutils/pbs_mkdirs.in	Tue Oct  7 09:34:47 2003
@@ -310,9 +310,12 @@
 
 	install_dir `dirname $PBS_DEFAULT_FILE`
 
+        # Only if the file doesn't exist...
+	if [ ! -f $PBS_DEFAULT_FILE ]; then
 	rm -f $PBS_DEFAULT_FILE > /dev/null 2>&1
 	echo $PBS_DEFAULT_SERVER > $PBS_DEFAULT_FILE && \
 	    chmod 644 $PBS_DEFAULT_FILE
+	fi
 
 	chk_tree_wrap -n $PBS_DEFAULT_FILE
 }
diff -Naurw OpenPBS_2_3_12/configure OpenPBS_sss-2.3.15-5/configure
--- OpenPBS_2_3_12/configure	Fri Dec  8 10:37:48 2000
+++ OpenPBS_sss-2.3.15-5/configure	Mon Feb 24 16:19:49 2003
@@ -1048,7 +1048,7 @@
 
                     tk_h=/dev/null
     for i in $TCL_DIR/include/tk.h \
-      `/bin/ls -d $TCL_DIR/include/tk*/tk.h 2> /dev/null`; do
+      `/bin/ls -d $TCL_DIR/include/tk*/tk.h $TCL_DIR/include/tcl*/tk.h 2> /dev/null`; do
         test -r $i && { tk_h="$i"; break; }
     done
 
diff -Naurw OpenPBS_2_3_12/doc/Makefile.in OpenPBS_sss-2.3.15-5/doc/Makefile.in
--- OpenPBS_2_3_12/doc/Makefile.in	Tue Sep  5 16:55:05 2000
+++ OpenPBS_sss-2.3.15-5/doc/Makefile.in	Fri Jan 24 15:03:27 2003
@@ -242,5 +242,6 @@
 	@chmod 755 $@
 
 distclean::
+	(cd ers && echo Making $@ in ers && $(MAKE) $@)
 	-$(RM) Makefile soelim
 
diff -Naurw OpenPBS_2_3_12/src/gui/Ccode/xpbs_scriptload.c OpenPBS_sss-2.3.15-5/src/gui/Ccode/xpbs_scriptload.c
--- OpenPBS_2_3_12/src/gui/Ccode/xpbs_scriptload.c	Tue Aug  8 17:16:55 2000
+++ OpenPBS_sss-2.3.15-5/src/gui/Ccode/xpbs_scriptload.c	Fri Jan 24 15:03:27 2003
@@ -721,15 +721,19 @@
     char *sopt;
     char *cont;
     int exec = FALSE;
-    char tmp_name[L_tmpnam+1];
+    char tmp_name[L_tmpnam+1] = "/tmp/xpbsTmp.XXXXXX";
+    int tmpfd;
     FILE *TMP_FILE;
     char *in;
     
-    tmpnam(tmp_name);
-    if ( (TMP_FILE = fopen(tmp_name, "w+")) == NULL ) {
+    if((tmpfd = mkstemp(tmp_name)) < 0){
 	fprintf(stderr, "scriptload: could not create buffer file%s\n", tmp_name);
         return(4);
     }
+    if ( (TMP_FILE = fdopen(tmpfd, "w+")) == NULL ) {
+	fprintf(stderr, "scriptload: could not addign buffer file%s\n", tmp_name);
+        return(4);
+    }
 
     while ( (in = fgets(s, MAX_LINE_LEN, file)) != NULL ) {
         if ( !exec && ((sopt = ispbsdir(s, prefix)) != NULL)) {
diff -Naurw OpenPBS_2_3_12/src/include/acct.h OpenPBS_sss-2.3.15-5/src/include/acct.h
--- OpenPBS_2_3_12/src/include/acct.h	Tue Aug  8 17:16:58 2000
+++ OpenPBS_sss-2.3.15-5/src/include/acct.h	Fri Jan 24 15:03:27 2003
@@ -85,7 +85,7 @@
  * header file supporting PBS accounting information
  */
 
-#define PBS_ACCT_MAX_RCD 4095
+#define PBS_ACCT_MAX_RCD 16384 /* increased from 4095 */
 
 #define PBS_ACCT_QUEUE	(int)'Q'	/* Job Queued record */
 #define PBS_ACCT_RUN	(int)'S'	/* Job run (Started) */
diff -Naurw OpenPBS_2_3_12/src/include/attribute.h OpenPBS_sss-2.3.15-5/src/include/attribute.h
--- OpenPBS_2_3_12/src/include/attribute.h	Tue Aug  8 17:16:58 2000
+++ OpenPBS_sss-2.3.15-5/src/include/attribute.h	Wed Jun 25 13:30:15 2003
@@ -335,6 +335,7 @@
 extern int  decode_str   A_((attribute *patr,char *name, char *rn, char *val));
 extern int  decode_time  A_((attribute *patr,char *name, char *rn, char *val));
 extern int  decode_arst  A_((attribute *patr,char *name, char *rn, char *val));
+extern int  decode_arst_direct  A_((attribute *patr, char *val));
 extern int  decode_resc  A_((attribute *patr,char *name, char *rn, char *val));
 extern int  decode_depend A_((attribute *patr,char *name, char *rn, char *val));
 extern int  decode_hold A_((attribute *patr,char *name, char *rn, char *val));
@@ -432,6 +433,7 @@
 extern int      node_np_action  A_(( attribute*, void*, int));
 extern int      node_ntype A_(( attribute*, void*, int));
 extern int      node_prop_list A_(( attribute*, void*, int));
+extern int      node_status_list A_(( attribute*, void*, int));
 
 /* "type" to pass to acl_check() */
 #define ACL_Host  1
diff -Naurw OpenPBS_2_3_12/src/include/cmds.h OpenPBS_sss-2.3.15-5/src/include/cmds.h
--- OpenPBS_2_3_12/src/include/cmds.h	Tue Aug  8 17:16:59 2000
+++ OpenPBS_sss-2.3.15-5/src/include/cmds.h	Fri Jan 24 15:03:27 2003
@@ -103,7 +103,7 @@
 #define notNULL(x)	(((x)!=NULL) && (strlen(x)>(size_t)0))
 #define NULLstr(x)	(((x)==NULL) || (strlen(x)==0))
 
-#define MAX_LINE_LEN 2048
+#define MAX_LINE_LEN 32768  /* increased from 2048 */
 #define MAXSERVERNAME PBS_MAXSERVERNAME+PBS_MAXPORTNUM+2
 #define PBS_DEPEND_LEN 2040
 
diff -Naurw OpenPBS_2_3_12/src/include/net_connect.h OpenPBS_sss-2.3.15-5/src/include/net_connect.h
--- OpenPBS_2_3_12/src/include/net_connect.h	Tue Jan 23 10:31:02 2001
+++ OpenPBS_sss-2.3.15-5/src/include/net_connect.h	Fri Jan 24 15:03:27 2003
@@ -120,6 +120,7 @@
 #define	IS_HELLO		1
 #define	IS_CLUSTER_ADDRS	2
 #define IS_UPDATE		3
+#define IS_STATUS		4
 
 /* return codes for client_to_svr() */
 
diff -Naurw OpenPBS_2_3_12/src/include/pbs_ifl.h OpenPBS_sss-2.3.15-5/src/include/pbs_ifl.h
--- OpenPBS_2_3_12/src/include/pbs_ifl.h	Tue Aug  8 17:17:02 2000
+++ OpenPBS_sss-2.3.15-5/src/include/pbs_ifl.h	Fri Jan 24 15:03:27 2003
@@ -215,6 +215,8 @@
 #define ATTR_scheduling	"scheduling"
 #define ATTR_status	"server_state"
 #define ATTR_syscost	"system_cost"
+#define ATTR_pingrate   "node_ping_rate"
+#define ATTR_ndchkrate  "node_check_rate"
 
 /* additional node "attributes" names */
 
@@ -223,6 +225,7 @@
 #define ATTR_NODE_properties	"properties"
 #define ATTR_NODE_ntype         "ntype"
 #define ATTR_NODE_jobs          "jobs"
+#define ATTR_NODE_status        "status"
 
 /* various attribute values */
 
@@ -297,7 +300,7 @@
 #define PBS_MAXPORTNUM		5	/* udp/tcp port numbers max=16 bits */
 #define PBS_MAXSVRJOBID		(PBS_MAXSEQNUM + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* server job id size */
 #define PBS_MAXCLTJOBID		(PBS_MAXSVRJOBID + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* client job id size */
-#define PBS_MAXDEST		256	/* destination size */
+#define PBS_MAXDEST		1024  /* destination size -- increased from 256 */
 #define PBS_MAXROUTEDEST	(PBS_MAXQUEUENAME + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* destination size */
 #define PBS_USE_IFF		1	/* pbs_connect() to call pbs_iff */
 #define PBS_INTERACTIVE		1	/* Support of Interactive jobs */
diff -Naurw OpenPBS_2_3_12/src/include/pbs_nodes.h OpenPBS_sss-2.3.15-5/src/include/pbs_nodes.h
--- OpenPBS_2_3_12/src/include/pbs_nodes.h	Tue Aug  8 17:17:03 2000
+++ OpenPBS_sss-2.3.15-5/src/include/pbs_nodes.h	Fri Jan 24 15:03:27 2003
@@ -120,11 +120,15 @@
 	struct pbssubn		*nd_psn;	/* ptr to list of subnodes */
 	struct	prop		*nd_first;	/* first and last property */
 	struct	prop		*nd_last;
+	struct	prop		*nd_f_st;       /* first and last status */    
+	struct	prop		*nd_l_st;
 	u_long			*nd_addrs;	/* IP addresses of host */
 	struct array_strings	*nd_prop;	/* array of properities */
+	struct array_strings    *nd_status;
 	int		 	 nd_stream;	/* RPP stream to Mom on host */
 	enum	psit		 nd_flag;
 	short		 	 nd_nprops;	/* number of properities */
+	short			 nd_nstatus;    /* number of status items */
 	short		 	 nd_nsn;	/* number of VPs  */
 	short		 	 nd_nsnfree;	/* number of VPs free */
 	short			 nd_nsnshared;	/* number of VPs shared */
@@ -132,6 +136,7 @@
 	unsigned short	 	 nd_state;
 	unsigned short	 	 nd_ntype;	/* node type */
 	short			 nd_order;	/* order of user's request */
+	time_t			 nd_lastupdate; /* time of last update. */
 };
 	
 
@@ -190,6 +195,7 @@
 	ND_ATR_properties,
 	ND_ATR_ntype,
 	ND_ATR_jobs,
+	NODE_ATR_status,
 	ND_ATR_LAST	/* WARNING: Must be the highest valued enum */
 };
 
diff -Naurw OpenPBS_2_3_12/src/include/qmgr.h OpenPBS_sss-2.3.15-5/src/include/qmgr.h
--- OpenPBS_2_3_12/src/include/qmgr.h	Tue Aug  8 17:17:03 2000
+++ OpenPBS_sss-2.3.15-5/src/include/qmgr.h	Fri Jan 24 15:03:27 2003
@@ -91,7 +91,7 @@
 /* server name used for all the active servers */
 #define ACTIVE_SERVER "active"
 /* max word length in the reqest */
-#define MAX_REQ_WORD_LEN 1024
+#define MAX_REQ_WORD_LEN 32768  /* increased from 1024 */
  
 /* there can be three words before the attribute list
  * command object name <attribute list> */
diff -Naurw OpenPBS_2_3_12/src/include/qmgr_node_public.h OpenPBS_sss-2.3.15-5/src/include/qmgr_node_public.h
--- OpenPBS_2_3_12/src/include/qmgr_node_public.h	Tue Aug  8 17:17:03 2000
+++ OpenPBS_sss-2.3.15-5/src/include/qmgr_node_public.h	Fri Jan 24 15:03:27 2003
@@ -93,3 +93,4 @@
 ATTR_NODE_state,
 ATTR_NODE_properties,
 ATTR_NODE_ntype,
+ATTR_NODE_status,
diff -Naurw OpenPBS_2_3_12/src/include/qmgr_svr_public.h OpenPBS_sss-2.3.15-5/src/include/qmgr_svr_public.h
--- OpenPBS_2_3_12/src/include/qmgr_svr_public.h	Tue Aug  8 17:17:04 2000
+++ OpenPBS_sss-2.3.15-5/src/include/qmgr_svr_public.h	Fri Jan 24 15:03:27 2003
@@ -117,4 +117,5 @@
 ATTR_schedit,
 ATTR_scheduling,
 ATTR_syscost,
-
+ATTR_pingrate,
+ATTR_ndchkrate,
diff -Naurw OpenPBS_2_3_12/src/include/server.h OpenPBS_sss-2.3.15-5/src/include/server.h
--- OpenPBS_2_3_12/src/include/server.h	Tue Aug  8 17:17:07 2000
+++ OpenPBS_sss-2.3.15-5/src/include/server.h	Fri Jan 24 15:03:27 2003
@@ -121,6 +121,8 @@
 	SRV_ATR_resource_cost,
 	SVR_ATR_sys_cost,
 	SRV_ATR_schedule_iteration,
+	SRV_ATR_ping_rate,
+	SRV_ATR_check_rate,
 	SRV_ATR_Comment,
 	SVR_ATR_DefNode,
 	SVR_ATR_NodePack,
diff -Naurw OpenPBS_2_3_12/src/include/server_limits.h OpenPBS_sss-2.3.15-5/src/include/server_limits.h
--- OpenPBS_2_3_12/src/include/server_limits.h	Tue Aug  8 17:17:07 2000
+++ OpenPBS_sss-2.3.15-5/src/include/server_limits.h	Fri Jan 24 15:03:27 2003
@@ -103,6 +103,7 @@
 #define PBS_SCHEDULE_CYCLE    600 /* re-schedule even if no change, 10 min   */
 #define PBS_RESTAT_JOB	       30 /* ask mom for status only once in 30 sec  */
 #define PBS_STAGEFAIL_WAIT   1800 /* retry time after stage in failuere */
+#define PBS_NORMAL_PING_RATE  300 /* How often to ping the nodes */
 
 /* Server Database information - path names */
 
@@ -120,7 +121,7 @@
 #define NODE_STATUS		"node_status"
 
 
-#define PBS_NET_MAX_CONNECTIONS 256
+#define PBS_NET_MAX_CONNECTIONS 1024  /* increased from 256 */
 #define PBS_LOCAL_CONNECTION PBS_NET_MAX_CONNECTIONS
 
 /*
diff -Naurw OpenPBS_2_3_12/src/lib/Libattr/attr_fn_arst.c OpenPBS_sss-2.3.15-5/src/lib/Libattr/attr_fn_arst.c
--- OpenPBS_2_3_12/src/lib/Libattr/attr_fn_arst.c	Tue Aug  8 17:17:12 2000
+++ OpenPBS_sss-2.3.15-5/src/lib/Libattr/attr_fn_arst.c	Wed Jun 25 13:24:01 2003
@@ -121,7 +121,7 @@
  * ----------------------------------------------------------------------------
  */
 
-static int decode_arst_direct(patr, val)
+int decode_arst_direct(patr, val)
 	struct attribute *patr;
 	char   		 *val;
 {
diff -Naurw OpenPBS_2_3_12/src/lib/Libattr/attr_node_func.c OpenPBS_sss-2.3.15-5/src/lib/Libattr/attr_node_func.c
--- OpenPBS_2_3_12/src/lib/Libattr/attr_node_func.c	Tue Aug  8 17:17:16 2000
+++ OpenPBS_sss-2.3.15-5/src/lib/Libattr/attr_node_func.c	Wed Jun 25 13:25:41 2003
@@ -763,3 +763,74 @@
 
 	return rc;
 }
+
+/*
+ * node_status_list - Either derive a "status list" attribute from the node
+ *		    or update node's status list from attribute's status list.
+ */
+
+int	node_status_list( new, pnode, actmode)
+	attribute	*new;		/*derive status into this attribute*/
+	void		*pnode;		/*pointer to a pbsnode struct     */
+	int		 actmode;	/*action mode; "NEW" or "ALTER"   */
+{
+	int		 rc = 0, i;
+	struct pbsnode  *np;
+	attribute	 temp;
+
+	
+
+	np = (struct pbsnode*)pnode;	/*because of at_action arg type*/
+
+	switch( actmode ) {
+
+	    case ATR_ACTION_NEW:
+
+		/* if node has a status list, then copy array_strings    */
+		/* into temp to use to setup a copy, otherwise setup empty */
+
+		if (np->nd_status) {
+
+			/* setup temporary attribute with the array_strings */
+			/* from the node				    */
+
+			temp.at_val.at_arst = np->nd_status;
+			temp.at_flags = ATR_VFLAG_SET;
+			temp.at_type  = ATR_TYPE_ARST;
+			rc = set_arst(new, &temp, SET);
+		} else {
+
+			/* Node has no properties, setup empty attribute */
+
+			new->at_val.at_arst = 0;
+			new->at_flags       = 0;
+			new->at_type        = ATR_TYPE_ARST;
+		}
+	    	break;
+				
+
+	    case ATR_ACTION_ALTER:
+
+		if(np->nd_status){
+			free(np->nd_status->as_buf);
+			free(np->nd_status);
+		}
+
+		/* update node with new attr_strings */
+
+		np->nd_status = new->at_val.at_arst;
+
+		/* update number of status items listed in node */
+		/* does not include name and subnode property */
+
+		if (np->nd_status)
+			np->nd_nstatus = np->nd_status->as_usedptr;
+		else
+			np->nd_nstatus = 0;
+		break;
+
+	    default:	rc = PBSE_INTERNAL;
+	}
+
+	return rc;
+}
diff -Naurw OpenPBS_2_3_12/src/lib/Libifl/rpp.c OpenPBS_sss-2.3.15-5/src/lib/Libifl/rpp.c
--- OpenPBS_2_3_12/src/lib/Libifl/rpp.c	Mon Sep 25 16:16:51 2000
+++ OpenPBS_sss-2.3.15-5/src/lib/Libifl/rpp.c	Fri Jan 24 15:03:27 2003
@@ -182,15 +182,15 @@
 **	Time in seconds; packet on the master send queue is not sent more
 **	often than every RPP_TIMEOUT seconds.
 */
-#define	RPP_TIMEOUT	2
+#define	RPP_TIMEOUT	4
 /*
 **	Default number of sendto attempts on a *packet.
 */
-#define	RPP_RETRY	10
+#define	RPP_RETRY	30
 /*
 **	Max allowed number of outstanding pkts
 */
-#define	RPP_HIGHWATER	24
+#define	RPP_HIGHWATER	12
 
 
 /*
diff -Naurw OpenPBS_2_3_12/src/lib/Libifl/tcp_dis.c OpenPBS_sss-2.3.15-5/src/lib/Libifl/tcp_dis.c
--- OpenPBS_2_3_12/src/lib/Libifl/tcp_dis.c	Mon Sep 25 16:16:51 2000
+++ OpenPBS_sss-2.3.15-5/src/lib/Libifl/tcp_dis.c	Fri Jan 24 15:03:27 2003
@@ -113,7 +113,7 @@
 static	struct	tcp_chan	**tcparray = NULL;
 static	int			tcparraymax = 0;
 
-time_t	pbs_tcp_timeout = 30;
+time_t	pbs_tcp_timeout = 60;
 int	pbs_tcp_interrupt = 0;
 
 /*
diff -Naurw OpenPBS_2_3_12/src/lib/Libifl/tm.c OpenPBS_sss-2.3.15-5/src/lib/Libifl/tm.c
--- OpenPBS_2_3_12/src/lib/Libifl/tm.c	Mon Jan 15 13:50:21 2001
+++ OpenPBS_sss-2.3.15-5/src/lib/Libifl/tm.c	Fri Jan 24 15:03:27 2003
@@ -403,6 +403,7 @@
 	int		 i;
 	struct sockaddr_in remote;
 	int              sock;
+	struct	linger	ltime;
 
 
 	if (local_conn >= 0)
@@ -427,6 +428,12 @@
 		if (sock < 0)
 			return -1;
 			
+		/* make sure data goes out */
+
+		ltime.l_onoff = 1;
+		ltime.l_linger = 5;
+		setsockopt(sock, SOL_SOCKET, SO_LINGER, &ltime, sizeof(ltime));
+
 		/* connect to specified local pbs_mom and port */
 
 		remote.sin_addr = hostaddr;
@@ -513,10 +520,12 @@
 	char			*env, *hold;
 	int			err;
 	int			nerr = 0;
+	extern int		pbs_tcp_interrupt;
 
 	if (init_done)
 		return TM_BADINIT;
 
+	pbs_tcp_interrupt = 1;
 	if ((tm_jobid = getenv("PBS_JOBID")) == NULL)
 		return TM_EBADENVIRONMENT;
 	tm_jobid_len = strlen(tm_jobid);
diff -Naurw OpenPBS_2_3_12/src/lib/Liblog/pbs_log.c OpenPBS_sss-2.3.15-5/src/lib/Liblog/pbs_log.c
--- OpenPBS_2_3_12/src/lib/Liblog/pbs_log.c	Tue Aug  8 17:17:50 2000
+++ OpenPBS_sss-2.3.15-5/src/lib/Liblog/pbs_log.c	Wed Oct 29 17:37:55 2003
@@ -93,7 +93,7 @@
 
 #include "portability.h"
 #include "pbs_error.h"
-
+#include <errno.h>
 #include <sys/param.h>
 #include <sys/types.h>
 #include <limits.h>
diff -Naurw OpenPBS_2_3_12/src/lib/Libnet/net_client.c OpenPBS_sss-2.3.15-5/src/lib/Libnet/net_client.c
--- OpenPBS_2_3_12/src/lib/Libnet/net_client.c	Tue Aug  8 17:17:51 2000
+++ OpenPBS_sss-2.3.15-5/src/lib/Libnet/net_client.c	Fri Jan 24 15:03:27 2003
@@ -165,7 +165,6 @@
 			close(sock);
 			return (PBS_NET_RC_FATAL);
 		}
-			
 	} else {
 		return (sock);
 	}
diff -Naurw OpenPBS_2_3_12/src/lib/Libnet/net_server.c OpenPBS_sss-2.3.15-5/src/lib/Libnet/net_server.c
--- OpenPBS_2_3_12/src/lib/Libnet/net_server.c	Tue Jan 23 10:31:02 2001
+++ OpenPBS_sss-2.3.15-5/src/lib/Libnet/net_server.c	Fri Jan 24 15:03:27 2003
@@ -196,7 +196,7 @@
 	
 	/* start listening for connections */
 
-	if (listen(sock, 10) < 0) {
+	if (listen(sock, 128) < 0) {
 		log_err(errno, "init_network", "listen failed");
 		return (-1);
 	}
diff -Naurw OpenPBS_2_3_12/src/resmom/catch_child.c OpenPBS_sss-2.3.15-5/src/resmom/catch_child.c
--- OpenPBS_2_3_12/src/resmom/catch_child.c	Tue Aug  8 17:17:56 2000
+++ OpenPBS_sss-2.3.15-5/src/resmom/catch_child.c	Mon Feb 24 16:08:27 2003
@@ -379,7 +379,8 @@
 		** Look to see if the job has terminated.  If it is
 		** in any state other than EXITING continue on.
 		*/
-		if (pjob->ji_qs.ji_substate != JOB_SUBSTATE_EXITING)
+		if ((pjob->ji_qs.ji_substate != JOB_SUBSTATE_EXITING) &&
+		    (pjob->ji_qs.ji_substate != JOB_SUBSTATE_EXITED))
 			continue;
 
 		/*
@@ -669,7 +670,7 @@
 	int	 recover;
 {
 	DIR		*dir;
-	int		i, sisters;
+	int		i, sisters, rc;
 	struct dirent	*pdirent;
 	job		*pj;
 	char		*job_suffix = JOB_FILE_SUFFIX;
@@ -681,6 +682,7 @@
 	struct	stat	statbuf;
 	extern	char	*path_checkpoint;
 #endif
+	DBPRT(("init_abort_jobs: recover=%d\n", recover))
 
 	dir = opendir(path_jobs);
 	if (dir == (DIR *)0) {
@@ -696,12 +698,15 @@
 		if (strcmp(psuffix, job_suffix))
 			continue;
 		pj = job_recov(pdirent->d_name);
-		if (pj == NULL)
+		if (pj == NULL){
+			DBPRT(("init_abort_jobs: Null pj\n"))
 			continue;
-
+		}
+		DBPRT(("init_abort_jobs: OK pj\n"))
 		append_link(&svr_alljobs, &pj->ji_alljobs, pj);
 		job_nodes(pj);
-		task_recov(pj);
+		rc = task_recov(pj);
+		DBPRT(("init_abort_jobs: task_recov -> rc=%d\n", rc))
 
 #if	MOM_CHECKPOINT == 1
 		/*
@@ -721,10 +726,16 @@
 				(void)remtree(oldp);
 		}
 #endif
+		DBPRT(("init_abort_jobs: nodes %d ; svrflags %X\n", pj->ji_numnodes, pj->ji_qs.ji_svrflags))
+		DBPRT(("init_abort_jobs: substate-1 %d\n", pj->ji_qs.ji_substate))
+
 		if ( (recover != 2) &&
 		     ((pj->ji_qs.ji_substate == JOB_SUBSTATE_RUNNING) ||
+		      (pj->ji_qs.ji_substate == JOB_SUBSTATE_PRERUN ) ||
 		      (pj->ji_qs.ji_substate == JOB_SUBSTATE_SUSPEND) ||
+		      (pj->ji_qs.ji_substate == JOB_SUBSTATE_EXITED) ||
 		      (pj->ji_qs.ji_substate == JOB_SUBSTATE_EXITING)) )  {
+			DBPRT(("init_abort_jobs: substate-2 %d\n", pj->ji_qs.ji_substate))
 
 			if (recover)
 				(void)kill_job(pj, SIGKILL);
@@ -741,6 +752,7 @@
 				mom_deljob(pj);
 				continue;
 			}
+			DBPRT(("init_abort_jobs: substate-3 %d\n", pj->ji_qs.ji_substate))
 
 			/* set exit status to:
 			 *   JOB_EXEC_INITABT - init abort and no chkpnt
@@ -768,6 +780,7 @@
 			** A sisterhood exists... send a KILL request.
 			*/
 			if (sisters > 0) {
+				DBPRT(("init_abort_jobs: Sending to sisters\n"))
 				pj->ji_resources = (noderes *)calloc(sisters,
 						sizeof(noderes));
 				(void)send_sisters(pj, IM_KILL_JOB);
@@ -792,5 +805,6 @@
 	/* remove any temporary directories */
 	rmtmpdir(pjob->ji_qs.ji_jobid);
 #endif	/* _CRAY */
+	DBPRT(("mom_deljob: Removing Job\n"))
 	job_purge(pjob);
 }
diff -Naurw OpenPBS_2_3_12/src/resmom/linux/mom_mach.c OpenPBS_sss-2.3.15-5/src/resmom/linux/mom_mach.c
--- OpenPBS_2_3_12/src/resmom/linux/mom_mach.c	Tue Sep  5 17:12:46 2000
+++ OpenPBS_sss-2.3.15-5/src/resmom/linux/mom_mach.c	Thu Feb 20 09:03:20 2003
@@ -91,7 +91,8 @@
 #include <pwd.h>
 #include <mntent.h>
 #include <asm/types.h>
-#include <linux/quota.h>
+#include <time.h>
+#include <sys/quota.h>
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/procfs.h>
@@ -1036,6 +1037,7 @@
 	sesid = ptask->ti_qs.ti_sid;
 	if (sesid <= 1)
 		return 0;
+	DBPRT(("%s: Sending %d\n", id, sig))
 
 	rewinddir(pdir);
 	while ((dent = readdir(pdir)) != NULL) {
@@ -1728,29 +1730,40 @@
 	return ret_string;
 }
 
+static const char path_meminfo[] = "/proc/meminfo";
+
 static char	*
 physmem(attrib)
 struct	rm_attribute	*attrib;
 {
 	char		*id = "physmem";
-	struct	stat	buf;
-
+	char		buf[2048];
+	unsigned long long mem;
+	FILE		*fp;
 
 	if (attrib) {
 		log_err(-1, id, extra_parm);
 		rm_errno = RM_ERR_BADPARAM;
 		return NULL;
 	}
-	if (stat("/proc/kcore", &buf))  {
-		log_err(-1, id, extra_parm);
+	if (!(fp = fopen(path_meminfo, "r"))) {
+		rm_errno = RM_ERR_SYSTEM;
+		return 0;
+	}
+	if (!fgets(buf, sizeof(buf), fp)) {
+		fclose(fp);
+		rm_errno = RM_ERR_SYSTEM;
+		return 0;
+	}
+	if (fscanf(fp, "%*s %Lu", &mem) != 1) {
+		fclose(fp);
 		rm_errno = RM_ERR_SYSTEM;
 		return NULL;
-	}  else  {
-		/* length of /proc/kcore == physical memory + 4K */
-		sprintf(ret_string, "%lukb",
-			((ulong)buf.st_size - (ulong)4096) >> 10); /* KB */
-		return ret_string;
 	}
+	fclose(fp);
+	mem >>= 10;
+	sprintf(ret_string, "%Lukb", mem);
+	return ret_string;
 }
 
 char	*
diff -Naurw OpenPBS_2_3_12/src/resmom/linux/mom_start.c OpenPBS_sss-2.3.15-5/src/resmom/linux/mom_start.c
--- OpenPBS_2_3_12/src/resmom/linux/mom_start.c	Tue Aug  8 17:18:11 2000
+++ OpenPBS_sss-2.3.15-5/src/resmom/linux/mom_start.c	Wed Feb 19 09:44:03 2003
@@ -239,7 +239,7 @@
 
 		if (pjob == NULL) {
 			DBPRT(("%s: pid %d not tracked, exit %d\n",
-				id, pid, exiteval))
+				id, pid, statloc))
 			continue;
 		}
 
diff -Naurw OpenPBS_2_3_12/src/resmom/mom_main.c OpenPBS_sss-2.3.15-5/src/resmom/mom_main.c
--- OpenPBS_2_3_12/src/resmom/mom_main.c	Mon Jan 15 13:50:22 2001
+++ OpenPBS_sss-2.3.15-5/src/resmom/mom_main.c	Wed Feb 26 17:00:32 2003
@@ -137,6 +137,7 @@
 static char ident[] = "@(#) $RCSfile: mom_main.c,v $ $Revision: 2.16.2.1.2.7 $";
 
 #define CHECK_POLL_TIME 120
+#define SERVER_STAT_UPDATES 20
 
 /* Global Data Items */
 
@@ -149,6 +150,7 @@
 time_t		loopcnt;		/* used for MD5 calc */
 float		max_load_val   = -1.0;
 char		mom_host[PBS_MAXHOSTNAME+1];
+char		pbs_servername[PBS_MAXHOSTNAME+1] = "";
 char		mom_short_name[PBS_MAXHOSTNAME+1];
 int		num_var_env;
 char	       *path_epilog;
@@ -176,7 +178,7 @@
 static resource_def *rdcput;
 #endif	/* MOM_CHECKPOINT */
 double		wallfactor = 1.00;
-
+extern    int   server_stream;  /* connection to the server... */
 
 /* Local Data Items */
 
@@ -548,6 +550,13 @@
 	return ipaddr;
 }
 
+static u_long setserver(char *value){
+    if (!pbs_servername[0]){
+        strncpy(pbs_servername, value, PBS_MAXHOSTNAME);
+    }
+    return(addclient(pbs_servername));
+}
+
 static u_long
 setlogevent(value)
 	char *value;
@@ -752,7 +761,7 @@
 		char		*name;
 		u_long		(*handler)();
 	}			special[] = {
-		{ "clienthost", addclient },
+		{ "clienthost", setserver },
 		{ "cputmult",	cputmult },
 		{ "ideal_load",	setidealload },
 		{ "logevent",   setlogevent },
@@ -761,6 +770,7 @@
 		{ "restricted",	restricted },
 		{ "usecp",	usecp },
 		{ "wallmult",	wallmult },
+		{ "pbsserver",  setserver },
 		{ NULL, NULL }
 	};
 
@@ -1155,6 +1165,138 @@
 }
 
 /*
+**   is_update_stat
+**     This should update the PBS server with the status information
+**   that the resource manager should need.  This should allow for
+**   less trouble on the part of the resource manager.  It can get
+**   this information from the server rather than going to each mom.
+*/
+
+int
+is_update_stat()
+{
+    
+    static char id[] = "is_update_stat";
+    static char *stats[] = {
+	"arch", "uname", "sessions", "nsessions", "nusers",
+	"idletime", "totmem", "availmem", "physmem", "ncpus", "loadave",
+	"",
+    };
+    char cp[1024];
+    char name[100];
+    char output[32768] = "";
+    char buff[32768];
+    char *curr, *value;
+    struct config  *ap;
+    struct rm_attribute *attr;
+    int restrictrm = 0;
+    int i;
+    int ret;
+    void   (*close_io)  A_((int));
+    int	   (*flush_io)  A_((int));
+
+    /*
+     *  I'm hoping that the server to mom connection is rpp...
+     */
+
+    close_io = (void(*) A_((int)) )rpp_close;
+    flush_io = rpp_flush;
+    
+    if (server_stream < 0){
+	DBPRT(("%s: Trying to open %s port %d\n", id, pbs_servername,
+	       default_server_port));
+	if((server_stream = rpp_open(pbs_servername, default_server_port)) < 0){
+	    DBPRT(("%s: Got port %d\n", id, server_stream));
+	    return DIS_EOF;
+	}
+	if(addclient(pbs_servername)==0){
+	    rpp_close(server_stream);
+	    server_stream = -1;
+	    return DIS_EOF;
+	} else {
+	    DBPRT(("%s: Added %s\n", id, pbs_servername));
+	}
+    }
+
+    DBPRT(("%s: Composing status update\n", id));
+
+    DIS_rpp_reset();
+
+    ret = diswsi(server_stream, IS_PROTOCOL);
+    if (ret != DIS_SUCCESS)
+	goto isdone;
+    ret = diswsi(server_stream, IS_PROTOCOL_VER);
+    if (ret != DIS_SUCCESS)
+	goto isdone;
+    ret = diswsi(server_stream, IS_STATUS);
+    if (ret != DIS_SUCCESS)
+	goto isdone;
+
+    for (i=0; stats[i][0] != 0;i++) {
+	strcpy(cp, stats[i]);
+	curr = skipwhite(cp);
+	curr = tokcpy(curr, name);
+	if (strlen(name) == 0) {		/* no name */
+	    sprintf(buff, "%s=? %d",
+		    cp, RM_ERR_UNKNOWN);
+	}
+	else {
+	    ap = rm_search(config_array, name);
+	    attr = momgetattr(curr);
+	    alarm(alarm_time);
+	    if (ap && !restrictrm) {	/* static */
+		sprintf(buff, "%s=%s",
+			cp,
+			conf_res(ap->c_u.c_value,
+				 attr));
+	    }
+	    else {		/* check dependent code */
+		log_buffer[0] = '\0';
+		value = dependent(name, attr);
+		if (value) {
+		    sprintf(buff, "%s=%s",
+			    cp, value);
+		}
+		else {	/* not found anywhere */
+		    sprintf(buff, "%s=? %d",
+			    cp, rm_errno);
+		}
+	    }
+	    alarm(0);
+	}
+	DBPRT(("%s: Sending to server \"%s\"\n", id, buff));
+	ret = diswst(server_stream, buff);
+	if (ret != DIS_SUCCESS) {
+	    sprintf(log_buffer,
+		    "write string failed %s",
+		    dis_emsg[ret]);
+	    goto isdone;
+	}
+    }
+    if (flush_io(server_stream) == -1) {
+	log_err(errno, id, "flush");
+	ret = -1;
+	goto isdone;
+    }
+
+/*
+    is_compose(server_stream, IS_HELLO);
+    rpp_flush(server_stream);
+    if(internal_state != 0){
+	state_to_server(1);
+    }
+*/
+    return(ret);
+
+    isdone:
+      DBPRT(("%s: send error %s\n",id, dis_emsg[ret]))
+      return ret;
+
+}
+
+
+
+/*
 **	Process a request for the resource monitor.  The i/o
 **	will take place using DIS over a tcp fd or an rpp stream.
 */
@@ -1452,7 +1594,7 @@
 
 	pbs_tcp_timeout = 0;
 	proto = disrsi(fd, &ret);
-	pbs_tcp_timeout = 30;
+	pbs_tcp_timeout = 60;
 
 	switch (ret) {
 	case DIS_SUCCESS:		/* worked */
@@ -1479,7 +1621,7 @@
 		DBPRT(("%s: got a resource monitor request\n", id))
 		pbs_tcp_timeout = 0;
 		ret = rm_request(fd, version, 1);
-		pbs_tcp_timeout = 30;
+		pbs_tcp_timeout = 60;
 		break;
 
 	case	TM_PROTOCOL:
@@ -1548,6 +1690,7 @@
 {
 	task	*ptask;
 	int	ct = 0;
+	DBPRT(("kill_jobs: Killing %d\n", pjob->ji_qs.ji_jobid))
 
 	log_record(PBSEVENT_JOB, PBS_EVENTCLASS_JOB,
 		pjob->ji_qs.ji_jobid, "kill_job");
@@ -1779,6 +1922,7 @@
 	struct sigaction act;
 	job		*pjob;
 	static time_t	polltime = 0;
+	static time_t   stat_update = 0;
 	extern time_t	wait_time;
 	resource	*prscput;
 	extern char	*optarg;
@@ -2215,12 +2359,22 @@
 
 	for (mom_run_state=1; mom_run_state; finish_loop(wait_time)) {
 
-		if (call_hup)
+		if (call_hup){
 			process_hup();
+		}
 		end_proc();
 		time_now = time((time_t *)0);
-		if (time_now < (polltime + CHECK_POLL_TIME))
+		/*
+		 *  Update the server on the status of this mom.
+		 */
+		if (time_now > (stat_update + SERVER_STAT_UPDATES)){
+		    stat_update = time_now;
+	   	 is_update_stat();
+		}
+
+		if (time_now < (polltime + CHECK_POLL_TIME)){
 			continue;
+		}
 
 		last_scan = polltime;
 		polltime = time_now;
diff -Naurw OpenPBS_2_3_12/src/resmom/mom_server.c OpenPBS_sss-2.3.15-5/src/resmom/mom_server.c
--- OpenPBS_2_3_12/src/resmom/mom_server.c	Tue Aug  8 17:17:58 2000
+++ OpenPBS_sss-2.3.15-5/src/resmom/mom_server.c	Fri Jan 24 15:03:27 2003
@@ -262,6 +262,10 @@
 	}
 
 	/* check that machine is okay to be a server */
+	/*  If the stream is the server_stream we already
+	    opened, then it's fine.
+	*/
+	if(stream != server_stream){
 	addr = rpp_getaddr(stream);
 	port = ntohs((unsigned short)addr->sin_port);
 	ipaddr = ntohl(addr->sin_addr.s_addr);
@@ -272,6 +276,7 @@
 		rpp_close(stream);
 		return;
 	}
+	}
 
 	command = disrsi(stream, &ret);
 	if (ret != DIS_SUCCESS)
diff -Naurw OpenPBS_2_3_12/src/resmom/requests.c OpenPBS_sss-2.3.15-5/src/resmom/requests.c
--- OpenPBS_2_3_12/src/resmom/requests.c	Tue Aug  8 17:17:59 2000
+++ OpenPBS_sss-2.3.15-5/src/resmom/requests.c	Thu Feb 20 08:47:10 2003
@@ -709,8 +709,8 @@
 		req_reject(PBSE_UNKJOBID, 0, preq);
 		return;
 	}
-
 	sname = preq->rq_ind.rq_signal.rq_signame;
+	DBPRT(("req_signaljob: Sending %s\n", sname))
 
 #ifdef _CRAY	/* suspend/resume on Cray only */
 	if (strcmp(sname, SIG_SUSPEND) == 0) {
diff -Naurw OpenPBS_2_3_12/src/resmom/start_exec.c OpenPBS_sss-2.3.15-5/src/resmom/start_exec.c
--- OpenPBS_2_3_12/src/resmom/start_exec.c	Mon Jan 15 13:50:22 2001
+++ OpenPBS_sss-2.3.15-5/src/resmom/start_exec.c	Fri Jan 24 15:03:27 2003
@@ -625,6 +625,7 @@
 		    /* update to time now minus the time already used	  */
 		    /* unless it is suspended, see request.c/req_signal() */
 
+		    time_now = time(0);
 		    if ((pjob->ji_qs.ji_svrflags & JOB_SVFLG_Suspend) == 0) {
 		    	pjob->ji_qs.ji_stime = time_now - 
 				( sb.st_mtime - pjob->ji_qs.ji_stime);
diff -Naurw OpenPBS_2_3_12/src/scheduler.cc/pbs_sched.c OpenPBS_sss-2.3.15-5/src/scheduler.cc/pbs_sched.c
--- OpenPBS_2_3_12/src/scheduler.cc/pbs_sched.c	Tue Aug  8 17:18:35 2000
+++ OpenPBS_sss-2.3.15-5/src/scheduler.cc/pbs_sched.c	Fri Jan 24 15:03:27 2003
@@ -525,7 +525,10 @@
 #endif	/* DEBUG */
 
 	glob_argv = argv;
+/*
 	alarm_time = 180;
+*/
+	alarm_time = 0;
 
 	port = get_svrport(PBS_SCHEDULER_SERVICE_NAME, "tcp", 
 			   PBS_SCHEDULER_SERVICE_PORT);
diff -Naurw OpenPBS_2_3_12/src/server/dis_read.c OpenPBS_sss-2.3.15-5/src/server/dis_read.c
--- OpenPBS_2_3_12/src/server/dis_read.c	Tue Aug  8 17:19:34 2000
+++ OpenPBS_sss-2.3.15-5/src/server/dis_read.c	Thu Feb 20 07:49:12 2003
@@ -143,6 +143,7 @@
 	}
 
 	/* Decode the Request Body based on the type */
+	DBPRT(("dis_request_read: type %d\n", request->rq_type))
 
 	switch (request->rq_type) {
 	    case PBS_BATCH_Disconnect:
@@ -261,6 +262,8 @@
 		rc = PBSE_UNKREQ;
 		break;
 	}
+        DBPRT(("dis_request_read: RC=%d\n", rc))
+
 		
 	if (rc == 0) {
 
diff -Naurw OpenPBS_2_3_12/src/server/issue_request.c OpenPBS_sss-2.3.15-5/src/server/issue_request.c
--- OpenPBS_2_3_12/src/server/issue_request.c	Tue Aug  8 17:19:35 2000
+++ OpenPBS_sss-2.3.15-5/src/server/issue_request.c	Wed Feb 19 16:21:08 2003
@@ -315,7 +315,7 @@
 	}
 
 	/* the request is bound to another server, encode/send the request */
-
+        DBPRT(("issue_Drequest: %d\n", request->rq_type))
 	switch (request->rq_type) {
 
 #ifndef PBS_MOM
@@ -386,10 +386,12 @@
 		break;
 
 	    case PBS_BATCH_SignalJob:
+	        DBPRT(("issue_Drequest: pushing signal %s to %s\n", request->rq_ind.rq_signal.rq_signame, request->rq_ind.rq_signal.rq_jid))
 		rc =  PBSD_sig_put(conn,
 				request->rq_ind.rq_signal.rq_jid,
 				request->rq_ind.rq_signal.rq_signame,
 				(char *)0);
+	        DBPRT(("issue_Drequest: RC=%d\n", rc))
 		break;
 
 	    case PBS_BATCH_StatusJob:
diff -Naurw OpenPBS_2_3_12/src/server/node_attr_def.c OpenPBS_sss-2.3.15-5/src/server/node_attr_def.c
--- OpenPBS_2_3_12/src/server/node_attr_def.c	Tue Aug  8 17:19:37 2000
+++ OpenPBS_sss-2.3.15-5/src/server/node_attr_def.c	Fri Jan 24 15:03:27 2003
@@ -185,4 +185,17 @@
 	ATR_TYPE_JINFOP,
 	PARENT_TYPE_NODE,
     },
+
+/* NODE_ATR_status */
+    {	ATTR_NODE_status,
+        decode_arst,
+        encode_arst,
+        set_arst,
+        comp_null,
+        free_arst,
+        node_status_list,
+        MGR_ONLY_SET,
+        ATR_TYPE_ARST,
+        PARENT_TYPE_NODE,
+    },
 };
diff -Naurw OpenPBS_2_3_12/src/server/node_func.c OpenPBS_sss-2.3.15-5/src/server/node_func.c
--- OpenPBS_2_3_12/src/server/node_func.c	Tue Aug  8 17:19:37 2000
+++ OpenPBS_sss-2.3.15-5/src/server/node_func.c	Fri Jan 24 15:03:27 2003
@@ -156,6 +156,13 @@
  */
 
 
+typedef struct tree_t {
+	u_long		key;
+	struct pbsnode	*nodep;
+	struct tree_t	*left, *right;
+} tree;
+
+extern void tinsert(const u_long key, struct pbsnode *nodep, tree **rootp); 
 
 /*
  * find_nodehbyname() - find a node host by its name
@@ -207,9 +214,11 @@
 
 static struct pbsnode	*old_address = 0;			/*node in question */
 static struct prop	*old_first = (struct prop *)0xdead;	/*node's first prop*/
+static struct prop	*old_f_st = (struct prop *)0xdead;	/*node's first prop*/
 static short		old_state = (short)0xdead;	/*node's   state   */
 static short		old_ntype = (short)0xdead;	/*node's   ntype   */
 static int		old_nprops = 0xdead;		/*node's   nprops  */
+static int		old_nstatus = 0xdead;		/*node's   nprops  */
 
 
 /*
@@ -227,7 +236,9 @@
 	old_state =   pnode->nd_state;
 	old_ntype =   pnode->nd_ntype;
 	old_nprops =  pnode->nd_nprops;
+	old_nstatus = pnode->nd_nstatus;
 	old_first =   pnode->nd_first;
+	old_f_st =    pnode->nd_f_st;
 	
 }
 
@@ -324,6 +335,8 @@
 		  atemp[i].at_val.at_short = pnode->nd_state;
 	     else if ( !strcmp ((padef + i)->at_name, ATTR_NODE_properties) )
 		  atemp[i].at_val.at_arst = pnode->nd_prop;
+	     else if ( !strcmp ((padef + i)->at_name, ATTR_NODE_status) )
+		  atemp[i].at_val.at_arst = pnode->nd_status;
 	     else if ( !strcmp ((padef + i)->at_name, ATTR_NODE_ntype) )
 		  atemp[i].at_val.at_short = pnode->nd_ntype;
 	     else if ( !strcmp ((padef + i)->at_name, ATTR_NODE_jobs) )
@@ -392,6 +405,7 @@
 				    /*ipaddrs for this node */
 	int		ntype;	    /*time-shared or cluster*/
 {
+	int i;
 	
 	pnode->nd_name    = pname;
 	pnode->nd_stream  = -1;
@@ -402,11 +416,18 @@
 	pnode->nd_needed  = 0;
 	pnode->nd_order   = 0;
 	pnode->nd_prop	  = (struct array_strings *)0;
+	pnode->nd_status  = (struct array_strings *)0;
 	pnode->nd_psn     = NULL;
 	pnode->nd_state   = INUSE_UNKNOWN | INUSE_NEEDS_HELLO_PING | INUSE_DOWN;
 	pnode->nd_first	  = init_prop(pnode->nd_name);
 	pnode->nd_last	  = pnode->nd_first;
+	pnode->nd_f_st	  = init_prop(pnode->nd_name);
+	pnode->nd_l_st	  = pnode->nd_f_st;
 	pnode->nd_nprops  = 0;
+	pnode->nd_nstatus = 0;
+	for (i=0;pul[i]; i++) {
+	    tinsert(pul[i],pnode,&ipaddrs);
+	}
 }
 
 /*
@@ -447,7 +468,9 @@
 	pnode->nd_last->next = (struct prop *)0; /*just in case*/
 	pnode->nd_last = (struct prop *)0;
 	free_prop_list (pnode->nd_first);
+	free_prop_list (pnode->nd_f_st);
 	pnode->nd_first = (struct prop *)0;
+	pnode->nd_f_st = (struct prop *)0;
 
 	for (up = pnode->nd_addrs; *up; up++) {
 	    /* del node's IP addresses from tree  */
diff -Naurw OpenPBS_2_3_12/src/server/node_manager.c OpenPBS_sss-2.3.15-5/src/server/node_manager.c
--- OpenPBS_2_3_12/src/server/node_manager.c	Tue Nov 14 10:23:14 2000
+++ OpenPBS_sss-2.3.15-5/src/server/node_manager.c	Mon Oct  6 13:09:21 2003
@@ -77,6 +77,7 @@
 * without reference to its choice of law rules.
 */
 
+
 #include <pbs_config.h>   /* the master config generated by configure */
 
 #include 	<stdio.h>
@@ -107,6 +108,7 @@
 #include	"dis.h"
 #include	"dis_init.h"
 #include	"resmon.h"
+#include	"query_configs.h"
 
 #if !defined(H_ERRNO_DECLARED)
 extern int h_errno;
@@ -143,6 +145,31 @@
 #define		SKIP_ANYINUSE	2
 
 static int hasprop(struct pbsnode *, struct prop *);
+/*
+
+ GBS - I put this in since it's used in the server to mom
+ communication for resource manager information.  The server
+ opens rpp sockets for pinging.  I just used those for the
+ resource manager queries.
+
+*/
+static
+void
+funcs_dis()		/* The equivalent of DIS_tcp_funcs() */
+{
+	if (dis_getc != rpp_getc) {
+		dis_getc = (int (*)(int))rpp_getc;
+		dis_puts = (int (*)(int, const char *, size_t))rpp_write;
+		dis_gets = (int (*)(int, char *, size_t))rpp_read;
+		disr_commit = (int (*)(int, int))rpp_rcommit;
+		disw_commit = (int (*)(int, int))rpp_wcommit;
+	}
+}
+
+/*#define	setup_dis(x)	funcs_dis()	/* RPP doesn't need reset */
+/*#define	close_dis(x)	rpp_close(x)
+/*#define	flush_dis(x)	rpp_flush(x)
+*/
 
 /*
  * Tree search generalized from Knuth (6.2.2) Algorithm T just like
@@ -197,6 +224,7 @@
 {
 	register tree	*q;
 
+	if(nodep != 0)
 	DBPRT(("tinsert: %lu %s stream %d\n", key,
 		nodep->nd_name, nodep->nd_stream))
 
@@ -273,6 +301,86 @@
 	*rootp = NULL;
 }
 
+int is_stat_get(struct pbsnode *np)
+{
+    extern time_t time_now;
+    int stream = np->nd_stream;
+    int	ret=0;
+    int	num, count = 0;
+    char    *ctmp, *ret_info;
+    char    status_buffer;
+    char    rspBuffer[70000] = "";
+    char    tmpRspBuff[70000];
+    attribute temp;
+    char date_attrib[100];
+
+    if (stream < 0)
+	return DIS_EOF;
+
+    /*
+     * before filling the "temp" attribute, I'll initialize it.
+     *  The second and third parameter to decode_arst are never
+     *  used, so I just leave them empty.
+     */
+    temp.at_flags=0;
+/*
+    temp.at_val.at_arst = np->nd_status;
+    temp.at_type = ATR_TYPE_ARST;
+    if(decode_arst(&temp, 0, 0, 0)){
+	DBPRT(("is_get_stat: Problem initializing attributes\n"));
+	rpp_eom(stream);
+	return ret;
+    }
+*/
+    while((ret != DIS_EOD)){
+	++count;
+	funcs_dis();
+	if((ret_info = disrst(stream, &ret)) != (char *) 0){
+	    /*
+	     * Add the info to the "temp" attribute
+	     */
+	    sprintf(tmpRspBuff, "%s\n", ret_info);
+	    strcat(rspBuffer, tmpRspBuff);
+/*
+	    if(decode_arst(&temp, 0, 0, ret_info)){
+		DBPRT(("is_get_stat: Problem adding to attributes\n"));
+		return(0);
+	    }
+*/
+	}
+    }
+    /*
+     *	It's nice to know when the last update happened.
+     */
+    sprintf(date_attrib,"rectime=%d",time_now);
+    strcat(rspBuffer, date_attrib);
+/*
+    if(decode_arst(&temp, 0, 0, date_attrib)){
+*/
+    if(decode_arst_direct(&temp, rspBuffer)){
+	DBPRT(("is_get_stat: Problem adding date_attrib\n"));
+	return(0);
+    }
+    /*
+     * clear the transmittion
+     */
+    rpp_eom(stream);
+    /*
+     * Stuff the information from "temp" into np
+     */
+    if(node_status_list(&temp, np, ATR_ACTION_ALTER)){
+	DBPRT(("is_get_stat: Problem setting node status list\n"));
+	return(0);
+    }
+    /*
+     * Fix the node state.
+     */
+    np->nd_state &=
+      ~(INUSE_DOWN|INUSE_UNKNOWN|INUSE_NEEDS_HELLO_PING);
+
+    return DIS_SUCCESS;
+    
+}
 /*
 **	Start a standard inter-server message.
 */
@@ -334,7 +442,12 @@
 /*
 **	Send a ping to any node that is in an unknown stat.
 **	If wt_parm1 is NULL, set up a worktask to ping again.
+ *
+ *      This shouldn't be called anymore...
+ *	This is mostly only used for opening the socket
+ *	connection to the node.  
 */
+
 void
 ping_nodes(ptask)
     struct	work_task	*ptask;
@@ -354,11 +467,9 @@
 		if (np->nd_state & (INUSE_DELETED|INUSE_OFFLINE))
 		    continue;
 
-		if (np->nd_state & (INUSE_JOB|INUSE_JOBSHARE)) {
-		   if (!(np->nd_state & INUSE_NEEDS_HELLO_PING))
-			continue;
-		}
-
+		/*
+		 *  Check to see if there's a stream for this node
+		 */
 		if (np->nd_stream < 0) {
 			np->nd_stream = rpp_open(np->nd_name, pbs_rm_port);
 			np->nd_state |= INUSE_DOWN;
@@ -370,22 +481,28 @@
 				log_err(errno, id, log_buffer);
 				continue;
 			}
-			com = IS_HELLO;
 			tinsert((u_long)np->nd_stream, np, &streams);
 		}
-		else
-			com = IS_NULL;
 
-		DBPRT(("%s: ping %s\n", id, np->nd_name))
-		if (np->nd_state & INUSE_NEEDS_HELLO_PING)
-		    com = IS_HELLO;
-
-		ret = is_compose(np->nd_stream, com);
+		/*
+		 * I'm only pinging the nodes without connections
+		 * or that are down.
+		 */
+		if (! (np->nd_state & INUSE_DOWN))
+		    continue;
+		/*
+		 * Now send the ping
+		 */
+		DBPRT(("%s: ping %s\n", id, np->nd_name));
+		ret = is_compose(np->nd_stream, IS_HELLO);
 		if (ret == DIS_SUCCESS) {
 			if (rpp_flush(np->nd_stream) == 0)
 			    continue;
+		    DBPRT(("%s: ping failed %s\n", id, np->nd_name));
 			ret = DIS_NOCOMMIT;
 		}
+		DBPRT(("%s: ping Dropped through..%s\n", id, np->nd_name))
+
 
 		addr = rpp_getaddr(np->nd_stream);
 		sprintf(log_buffer, "%s %d to %s(%s)",
@@ -401,14 +518,56 @@
 
 	if (ptask->wt_parm1 == NULL) {
 		if (server_init_type == RECOV_HOT)
-			i = 15;		/* rapid ping rate while hot restart */
+		    /* rapid ping rate while hot restart */
+		    i = 15;
 		else
-			i = 300;	/* relaxed ping rate for normal run  */
+		    /* relaxed ping rate for normal run  */
+		    i = server.sv_attr[(int)SRV_ATR_ping_rate].at_val.at_long;
 		(void)set_task(WORK_Timed, time_now+i, ping_nodes, NULL);
 	}
 }
 
 /*
+**	Mark any nodes that haven't checked in as down.
+**	This should be used rather than the ping_nodes task.  If
+**	the node isn't down then it checks to see that the
+**	last update hasn't been too long ago.
+*/
+void
+check_nodes(ptask)
+struct	work_task	*ptask;
+{
+    static	char	id[] = "check_nodes";
+    struct	pbsnode		*np;
+    struct  pbssubn		*sp;
+    struct	sockaddr_in	*addr;
+    int			i, ret,chk_len;
+    extern	time_t		time_now;
+    extern	int		pbs_rm_port;
+
+    DBPRT(("%s: entered\n", id));
+    /*
+	How often do we check things?
+     */
+    chk_len = server.sv_attr[(int)SRV_ATR_check_rate].at_val.at_long;
+    for (i=0; i<svr_totnodes; i++) {
+	np = pbsndmast[i];
+
+	if (np->nd_state & (INUSE_DELETED|INUSE_OFFLINE))
+	    continue;
+	if (np->nd_lastupdate < (time_now-chk_len)){
+	    np->nd_state |= INUSE_DOWN;
+	}
+    }
+    if (ptask->wt_parm1 == NULL) {
+	if (server_init_type == RECOV_HOT)
+	    /* rapid ping rate while hot restart */
+	    chk_len = 15;
+	(void)set_task(WORK_Timed, time_now+chk_len, check_nodes, NULL);
+    }
+}
+
+/*
 **	Input is coming from another server (MOM) over a DIS rpp stream.
 **	Read the stream to get a Inter-Server request.
 */
@@ -421,6 +580,7 @@
 	int			command = 0;
 	int			ret = DIS_SUCCESS;
 	int			i, j;
+	int			firstCon=0;
 	unsigned long		ipaddr;
 	struct	sockaddr_in	*addr;
 	struct	pbsnode		*np, *node;
@@ -459,6 +619,7 @@
 		}
 		node->nd_stream = stream;
 		tinsert((u_long)stream, node, &streams);
+		firstCon=1;
 		goto found;
 	}
 	sprintf(log_buffer, "bad attempt to connect from %s", netaddr(addr));
@@ -507,7 +668,10 @@
 					goto err;
 			}
 		}
+/*
 		rpp_flush(stream);
+*/
+		rpp_eom(stream);
 		break;
 	case IS_UPDATE:
 		DBPRT(("%s: IS_UPDATE\n", id))
@@ -520,7 +684,47 @@
 		}
 		break;
 
+	case IS_STATUS:
+	        DBPRT(("%s: IS_STATUS\n", id));
+		node->nd_state &=
+			~(INUSE_DOWN|INUSE_UNKNOWN|INUSE_NEEDS_HELLO_PING);
+		for (sp = node->nd_psn; sp; sp = sp->next)
+			sp->inuse &= ~INUSE_DOWN;
+
+		ret = is_stat_get(node);
+		if (ret != DIS_SUCCESS) {
+		    DBPRT(("%s: IS_STATUS error %d\n", id, ret));
+		    goto err;
+		}
+		node->nd_lastupdate=time_now;
+	if(firstCon){
+		ret = is_compose(stream, IS_CLUSTER_ADDRS);
+		if (ret != DIS_SUCCESS)
+			goto err;
+		for (i=0; i<svr_totnodes; i++) {
+			np = pbsndmast[i];
+
+			if (np->nd_state & INUSE_DELETED)
+			    continue;
+
+			DBPRT(("%s: %s(%d)\n", id, np->nd_name, i))
+
+			for (j=0; np->nd_addrs[j]; j++) {
+				u_long	ipaddr = np->nd_addrs[j];
 
+				DBPRT(("%s: %d\t%ld.%ld.%ld.%ld\n", id, j,
+					(ipaddr & 0xff000000) >> 24,
+					(ipaddr & 0x00ff0000) >> 16,
+					(ipaddr & 0x0000ff00) >> 8,
+					(ipaddr & 0x000000ff) ))
+				ret = diswul(stream, ipaddr);
+				if (ret != DIS_SUCCESS)
+					goto err;
+			}
+		}
+		rpp_flush(stream);
+	}
+		break;
 	default:
 		sprintf(log_buffer, "unknown command %d sent from %s",
 			command, node->nd_name);
diff -Naurw OpenPBS_2_3_12/src/server/pbsd_init.c OpenPBS_sss-2.3.15-5/src/server/pbsd_init.c
--- OpenPBS_2_3_12/src/server/pbsd_init.c	Tue Aug  8 17:19:38 2000
+++ OpenPBS_sss-2.3.15-5/src/server/pbsd_init.c	Fri Jan 24 15:03:27 2003
@@ -372,6 +372,13 @@
 	(void)svr_attr_def[(int)SRV_ATR_mailfrom].at_decode(
 			&server.sv_attr[(int)SRV_ATR_mailfrom], 0, 0,
 			PBS_DEFAULT_MAIL);
+	server.sv_attr[(int)SRV_ATR_ping_rate].at_val.at_long = 
+	                                                  PBS_NORMAL_PING_RATE;
+	server.sv_attr[(int)SRV_ATR_ping_rate].at_flags =ATR_VFLAG_SET;
+	server.sv_attr[(int)SRV_ATR_check_rate].at_val.at_long = 
+	                                                  2*PBS_NORMAL_PING_RATE;
+	server.sv_attr[(int)SRV_ATR_check_rate].at_flags =ATR_VFLAG_SET;
+
 
 	/* 4. force logging of all types */
 
diff -Naurw OpenPBS_2_3_12/src/server/pbsd_main.c OpenPBS_sss-2.3.15-5/src/server/pbsd_main.c
--- OpenPBS_2_3_12/src/server/pbsd_main.c	Tue Aug  8 17:19:38 2000
+++ OpenPBS_sss-2.3.15-5/src/server/pbsd_main.c	Fri Jan 24 15:03:27 2003
@@ -279,6 +279,7 @@
 	long    *state;
 	time_t	 waittime;
 	void	 ping_nodes A_((struct work_task *ptask));
+	void	 check_nodes A_((struct work_task *ptask));
 
 	static struct {
 		char *it_name;
@@ -473,7 +474,6 @@
 	/* go into the background and become own session/process group */
 
 #ifndef DEBUG
-	
 	lock_out(lockfds, F_UNLCK);
 	if (fork() > 0)
 		exit(0);	/* parent goes away */
@@ -530,7 +530,12 @@
 	log_event(PBSEVENT_SYSTEM | PBSEVENT_FORCE, PBS_EVENTCLASS_SERVER,
 		  msg_daemonname, log_buffer);
 
+	(void)set_task(WORK_Immed, 0, check_nodes, NULL);
+/*
+ Just check the nodes with check_nodes above and don't
+ ping anymore.
 	(void)set_task(WORK_Immed, 0, ping_nodes, NULL);
+*/
 	/*
 	 * Now at last, we are read to do some batch work, the
 	 * following section constitutes the "main" loop of the server
diff -Naurw OpenPBS_2_3_12/src/server/process_request.c OpenPBS_sss-2.3.15-5/src/server/process_request.c
--- OpenPBS_2_3_12/src/server/process_request.c	Tue Aug  8 17:19:39 2000
+++ OpenPBS_sss-2.3.15-5/src/server/process_request.c	Thu Feb 20 08:33:30 2003
@@ -308,12 +308,14 @@
 		/* check connecting host against allowed list of ok clients */
 
 		extern void	*okclients;
-	
+		DBPRT(("REQ: %s\n",request->rq_host))
 		if (!tfind(svr_conn[sfds].cn_addr, &okclients)) {
+			DBPRT(("REQ: Reject %s\n",request->rq_host))
 			req_reject(PBSE_BADHOST, 0, request);
 			close_client(sfds);
 			return;
 		}
+		DBPRT(("REQ: OK %s\n",request->rq_host))
 	}
 		
 	request->rq_fromsvr = 1;
diff -Naurw OpenPBS_2_3_12/src/server/query_configs.h OpenPBS_sss-2.3.15-5/src/server/query_configs.h
--- OpenPBS_2_3_12/src/server/query_configs.h	Wed Dec 31 16:00:00 1969
+++ OpenPBS_sss-2.3.15-5/src/server/query_configs.h	Fri Jan 24 15:03:27 2003
@@ -0,0 +1,18 @@
+/* File query_configs.h created by Gary Skouson on Mon Mar 25 2002.
+*/
+
+char *query_configs[] = {
+	"arch",
+	"uname",
+	"sessions",
+	"nsessions",
+	"nusers",
+	"idletime",
+	"totmem",
+	"availmem",
+	"physmem",
+	"ncpus",
+	"loadave",
+	NULL,
+};
+int q_configs_count = 14;
diff -Naurw OpenPBS_2_3_12/src/server/req_manager.c OpenPBS_sss-2.3.15-5/src/server/req_manager.c
--- OpenPBS_2_3_12/src/server/req_manager.c	Tue Aug  8 17:19:42 2000
+++ OpenPBS_sss-2.3.15-5/src/server/req_manager.c	Fri Jan 24 15:03:27 2003
@@ -544,6 +544,7 @@
 {
 	int		 i;
 	int		 index;
+	int		 nstatus = 0;
 	int		 nprops = 0;
 	int		 rc;
 	int		 updating_props = 0;
@@ -650,6 +651,12 @@
 			(void)free(pnode->nd_prop->as_buf);
 		(void)free(pnode->nd_prop);
 	}
+	if (pnode->nd_status && (pnode->nd_status != tnode.nd_status)) {
+		if (pnode->nd_status->as_buf)
+			(void)free(pnode->nd_status->as_buf);
+		(void)free(pnode->nd_status);
+	}
+
 	xtmp   = pnode->nd_psn;
 	*pnode = tnode;	       /* updates all data including linking in props */
 	pnode->nd_psn = xtmp;
@@ -678,6 +685,25 @@
 	pnode->nd_last = pdest;
 	pnode->nd_nprops = nprops + 1;
 
+	/* update status list based on new status array */
+
+	free_prop_list(pnode->nd_f_st);
+
+	plink  = &pnode->nd_f_st;
+	if (pnode->nd_status) {
+	    nstatus = pnode->nd_status->as_usedptr;
+	    for (i=0; i<nstatus; ++i) {
+		pdest = init_prop(pnode->nd_status->as_string[i]);
+		*plink = pdest;
+		plink  = &pdest->next;
+	    }
+	}
+	/* now add in name as last status */
+	pdest  = init_prop(pnode->nd_name);
+	*plink = pdest;
+	pnode->nd_l_st = pdest;
+	pnode->nd_nstatus = nstatus + 1;
+
 	/* now update subnodes */
 
 	update_subnode(pnode);
diff -Naurw OpenPBS_2_3_12/src/server/req_shutdown.c OpenPBS_sss-2.3.15-5/src/server/req_shutdown.c
--- OpenPBS_2_3_12/src/server/req_shutdown.c	Tue Aug  8 17:19:46 2000
+++ OpenPBS_sss-2.3.15-5/src/server/req_shutdown.c	Fri Jan 24 15:03:27 2003
@@ -180,7 +180,7 @@
 	log_event(PBSEVENT_SYSTEM|PBSEVENT_ADMIN|PBSEVENT_DEBUG,
 		  PBS_EVENTCLASS_SERVER, msg_daemonname, log_buffer);
 
-	if (type == SHUT_QUICK) /* quick, leave jobs as are */
+	if (type == SHUT_QUICK || type == SHUT_SIG) /* quick, leave jobs as are */
 		return;
 
 	svr_save(&server, SVR_SAVE_QUICK);
diff -Naurw OpenPBS_2_3_12/src/server/resc_def_all.c OpenPBS_sss-2.3.15-5/src/server/resc_def_all.c
--- OpenPBS_2_3_12/src/server/resc_def_all.c	Tue Aug  8 17:19:47 2000
+++ OpenPBS_sss-2.3.15-5/src/server/resc_def_all.c	Wed Feb 26 16:29:53 2003
@@ -270,7 +270,7 @@
 	comp_str,
 	free_str,
 	NULL_FUNC,
-	ATR_DFLAG_MGRD | ATR_DFLAG_MGWR | ATR_DFLAG_SvWR | ATR_DFLAG_RMOMIG | ATR_DFLAG_MOM,
+	ATR_DFLAG_MGRD | ATR_DFLAG_MGWR | ATR_DFLAG_SvWR | ATR_DFLAG_RMOMIG | ATR_DFLAG_MOM | ATR_DFLAG_ALTRUN,
 	ATR_TYPE_STR
     },
     {	"nodect",			/* count of number of nodes requested */
diff -Naurw OpenPBS_2_3_12/src/server/svr_attr_def.c OpenPBS_sss-2.3.15-5/src/server/svr_attr_def.c
--- OpenPBS_2_3_12/src/server/svr_attr_def.c	Tue Aug  8 17:19:48 2000
+++ OpenPBS_sss-2.3.15-5/src/server/svr_attr_def.c	Fri Jan 24 15:03:27 2003
@@ -444,6 +444,32 @@
 	ATR_TYPE_LONG,
 	PARENT_TYPE_SERVER
     },
+/* SVR_ATR_ping_rate */
+    {	ATTR_pingrate,		/* "node_ping_rate" */
+	decode_l,
+	encode_l,
+	set_l,
+	comp_l,
+	free_null,
+	NULL_FUNC,
+	NO_USER_SET,
+	ATR_TYPE_LONG,
+	PARENT_TYPE_SERVER
+    },
+
+/* SVR_ATR_check_rate */
+    {	ATTR_ndchkrate,		/* "node_check_rate" */
+	decode_l,
+	encode_l,
+	set_l,
+	comp_l,
+	free_null,
+	NULL_FUNC,
+	NO_USER_SET,
+	ATR_TYPE_LONG,
+	PARENT_TYPE_SERVER
+    },
+
 /* SRV_ATR_Comment */
     {	ATTR_comment,		/* "comment"  - information */
 	decode_str,	
diff -Naurw OpenPBS_2_3_12/src/server/svr_connect.c OpenPBS_sss-2.3.15-5/src/server/svr_connect.c
--- OpenPBS_2_3_12/src/server/svr_connect.c	Tue Aug  8 17:19:49 2000
+++ OpenPBS_sss-2.3.15-5/src/server/svr_connect.c	Wed Oct 29 17:39:31 2003
@@ -100,7 +100,7 @@
  */
 
 #include <pbs_config.h>   /* the master config generated by configure */
-
+#include <errno.h>
 #include <sys/types.h>
 #include "libpbs.h"
 #include "server_limits.h"
diff -Naurw OpenPBS_2_3_12/src/server/svr_jobfunc.c OpenPBS_sss-2.3.15-5/src/server/svr_jobfunc.c
--- OpenPBS_2_3_12/src/server/svr_jobfunc.c	Mon Jan 22 11:12:41 2001
+++ OpenPBS_sss-2.3.15-5/src/server/svr_jobfunc.c	Mon Feb 24 14:52:57 2003
@@ -375,6 +375,7 @@
 	int    changed = 0;
 	int    oldstate;
 	pbs_queue *pque = pjob->ji_qhdr;
+	DBPRT(("svr_setjobstate: Setting state=%d,subst=%d\n", newstate, newsubstate))
 
 	/*
 	 * if its is a new job, then don't update counts, svr_enquejob() will