summaryrefslogtreecommitdiff
path: root/parallel/glunix
diff options
context:
space:
mode:
authorgarbled <garbled>1998-10-21 19:59:29 +0000
committergarbled <garbled>1998-10-21 19:59:29 +0000
commit509104764481bc33042acb6bf6a1bc4b8fb1acf7 (patch)
treeee3fb3f92b272c0d9af2560a3004def4061ab70a /parallel/glunix
parent44eebd3dbd1871cdb443141666e000f35b21e57b (diff)
downloadpkgsrc-509104764481bc33042acb6bf6a1bc4b8fb1acf7.tar.gz
Initial import of glunix-1.0a
Thanks to Ross for all the help, and Alistair for fixing some brain damage. A Global Layer Unix for NOW. (Network Of Workstations)
Diffstat (limited to 'parallel/glunix')
-rw-r--r--parallel/glunix/Makefile49
-rw-r--r--parallel/glunix/files/Makefile-214
-rw-r--r--parallel/glunix/files/md54
-rw-r--r--parallel/glunix/patches/patch-aa172
-rw-r--r--parallel/glunix/patches/patch-ab71
-rw-r--r--parallel/glunix/patches/patch-ac14
-rw-r--r--parallel/glunix/patches/patch-ad11
-rw-r--r--parallel/glunix/patches/patch-ae9
-rw-r--r--parallel/glunix/patches/patch-af52
-rw-r--r--parallel/glunix/patches/patch-ag9
-rw-r--r--parallel/glunix/patches/patch-ah68
-rw-r--r--parallel/glunix/patches/patch-ai26
-rw-r--r--parallel/glunix/patches/patch-aj284
-rw-r--r--parallel/glunix/patches/patch-ak22
-rw-r--r--parallel/glunix/patches/patch-al40
-rw-r--r--parallel/glunix/patches/patch-am231
-rw-r--r--parallel/glunix/patches/patch-an95
-rw-r--r--parallel/glunix/patches/patch-ao9
-rw-r--r--parallel/glunix/patches/patch-ap133
-rw-r--r--parallel/glunix/patches/patch-aq12
-rw-r--r--parallel/glunix/patches/patch-ar172
-rw-r--r--parallel/glunix/patches/patch-as9
-rw-r--r--parallel/glunix/patches/patch-at9
-rw-r--r--parallel/glunix/patches/patch-au12
-rw-r--r--parallel/glunix/patches/patch-av9
-rw-r--r--parallel/glunix/patches/patch-aw9
-rw-r--r--parallel/glunix/patches/patch-ax9
-rw-r--r--parallel/glunix/patches/patch-ay9
-rw-r--r--parallel/glunix/patches/patch-az9
-rw-r--r--parallel/glunix/patches/patch-ba9
-rw-r--r--parallel/glunix/patches/patch-bb9
-rw-r--r--parallel/glunix/patches/patch-bc98
-rw-r--r--parallel/glunix/patches/patch-bd11
-rw-r--r--parallel/glunix/patches/patch-be13
-rw-r--r--parallel/glunix/patches/patch-bf856
-rw-r--r--parallel/glunix/patches/patch-bg36
-rw-r--r--parallel/glunix/patches/patch-bh25
-rw-r--r--parallel/glunix/patches/patch-bi11
-rw-r--r--parallel/glunix/patches/patch-bj32
-rw-r--r--parallel/glunix/patches/patch-bk19
-rw-r--r--parallel/glunix/patches/patch-bl8
-rw-r--r--parallel/glunix/patches/patch-bm8
-rw-r--r--parallel/glunix/patches/patch-bn8
-rw-r--r--parallel/glunix/patches/patch-bo46
-rw-r--r--parallel/glunix/patches/patch-bp11
-rw-r--r--parallel/glunix/patches/patch-bq13
-rw-r--r--parallel/glunix/patches/patch-br9
-rw-r--r--parallel/glunix/patches/patch-bs79
-rw-r--r--parallel/glunix/patches/patch-bt19
-rw-r--r--parallel/glunix/patches/patch-bu17
-rw-r--r--parallel/glunix/patches/patch-bv20
-rw-r--r--parallel/glunix/patches/patch-bw15
-rw-r--r--parallel/glunix/patches/patch-bx24
-rw-r--r--parallel/glunix/pkg/COMMENT1
-rw-r--r--parallel/glunix/pkg/DESCR16
-rw-r--r--parallel/glunix/pkg/MESSAGE30
-rw-r--r--parallel/glunix/pkg/PLIST126
-rwxr-xr-xparallel/glunix/scripts/post-patch20
-rwxr-xr-xparallel/glunix/scripts/pre-fetch30
59 files changed, 3191 insertions, 0 deletions
diff --git a/parallel/glunix/Makefile b/parallel/glunix/Makefile
new file mode 100644
index 00000000000..270296287aa
--- /dev/null
+++ b/parallel/glunix/Makefile
@@ -0,0 +1,49 @@
+# $NetBSD: Makefile,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+DISTNAME= glunix-release-1-0a
+PKGNAME= glunix-1.0a
+CATEGORIES= parallel
+MASTER_SITES= http://now.cs.berkeley.edu/Glunix/ \
+ http://www.inficad.com/~garbled/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} makedepend${EXTRACT_SUFX}
+
+MAINTAINER= root@garbled.net
+HOMEPAGE= http://now.cs.berkeley.edu/Glunix/glunix.html
+
+DEPENDS+= ssh-1.2.26:../../security/ssh
+DEPENDS+= addnerd-1.6:../../sysutils/addnerd
+
+USE_GMAKE= yes
+USE_PERL5= yes
+IS_INTERACTIVE= yes
+NO_MTREE= yes
+NO_WRKSUBDIR= yes
+
+MESSAGE_FILE= ${WRKDIR}/MESSAGE
+
+NOW_ROOT= ${LOCALBASE}/now
+
+MACHINE_ARCH!= uname -m
+
+.if (${MACHINE_ARCH} == "i386")
+FLAGS= "-m486 -DL_ENDIAN"
+.endif
+
+MAKE_ENV+= OPSYS=${OPSYS} ARCH=${MACHINE_ARCH} NOW_ROOT=${NOW_ROOT}
+MAKE_ENV+= PORTSDIR=${PKGDIR} WRKDIR=${WRKDIR} FLAGS=${FLAGS}
+
+SCRIPTS_ENV+= ARCH=${MACHINE_ARCH} RM=${RM} NOW_ROOT=${NOW_ROOT}
+
+pre-configure:
+ ${CP} ${FILESDIR}/Makefile-2 ${WRKSRC}/Makefile
+
+pre-install:
+ ${SED} -e 's|\$${NOW_ROOT}|${NOW_ROOT}|g' ${PKGDIR}/MESSAGE > ${MESSAGE_FILE}
+ @${ECHO} "updating /etc/shells";
+ ${CP} /etc/shells /etc/shells.bak;
+ ( ${GREP} -v ${NOW_ROOT}/bin/glush /etc/shells.bak; \
+ ${ECHO} ${NOW_ROOT}/bin/glush \
+ ) >/etc/shells
+ -${LOCALBASE}/sbin/addnerd -g glunix -s ${NOW_ROOT}/bin/glush glunix
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/parallel/glunix/files/Makefile-2 b/parallel/glunix/files/Makefile-2
new file mode 100644
index 00000000000..d71beba19f1
--- /dev/null
+++ b/parallel/glunix/files/Makefile-2
@@ -0,0 +1,14 @@
+all:
+ cd makedepend; $(MAKE) makedepend || exit 1; \
+ cd .. ;
+ cd glunix/src; $(MAKE) DESTDIR=$(DESTDIR) $(MAKE_ENV) install || exit 1 ; \
+ cd ../.. ;
+ cd progs/tools; $(MAKE) mhtml2html $(MAKE_ENV) install || exit 1 ; \
+ cd ../.. ;
+ cd progs; $(MAKE) DESTDIR=$(DESTDIR) $(MAKE_ENV) install || exit 1 ; \
+ cd .. ;
+ cd progs/tools; $(MAKE) DESTDIR=$(DESTDIR) $(MAKE_ENV) install || exit 1 ; \
+ cd ../.. ; \
+
+install:
+ glunix/bin/$(ARCH)-$(OPSYS)-tcp/gluinstall
diff --git a/parallel/glunix/files/md5 b/parallel/glunix/files/md5
new file mode 100644
index 00000000000..ffe43b2f485
--- /dev/null
+++ b/parallel/glunix/files/md5
@@ -0,0 +1,4 @@
+$NetBSD: md5,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+MD5 (glunix-release-1-0a.tar.gz) = 4f04ccab3caad96273a141b087adb06a
+MD5 (makedepend.tar.gz) = 9f940bba114710d83810f3cd97fd4983
diff --git a/parallel/glunix/patches/patch-aa b/parallel/glunix/patches/patch-aa
new file mode 100644
index 00000000000..3c0afcd4ab4
--- /dev/null
+++ b/parallel/glunix/patches/patch-aa
@@ -0,0 +1,172 @@
+$NetBSD: patch-aa,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- glunix/src/Makefile.orig Wed Nov 5 15:30:39 1997
++++ glunix/src/Makefile Mon Oct 12 21:31:58 1998
+@@ -2,7 +2,7 @@
+ #
+ # Basic path definitions
+ #
+-GLUNIX_BASE = /disks/barad-dur/now/glunix
++GLUNIX_BASE = $(GLUNIX_SOURCE)/glunix
+
+ #
+ # This lists all of the modules in the system that should be compiled
+@@ -50,6 +50,11 @@
+ # If this Makefile was NOT invoked by glubuild, then we need to set up
+ # the architecture stuff here. glubuild does this for us if it was run.
+ #
++GLUNIX_ARCH= $(ARCH)
++GLUNIX_OS= $(OPSYS)
++GLUNIX_NET:=tcp
++INSTALL := /usr/bin/install
++
+ ifndef GLUNIX_ARCH
+ GLUNIX_ARCH = sun4
+ endif
+@@ -59,11 +64,8 @@
+ GLUNIX_NET := tcp
+ INSTALL := /usr/sww/bin/ginstall
+ endif
+-ifeq ($(GLUNIX_ARCH),i386)
+- GLUNIX_OS := solaris2.6
+- GLUNIX_NET := tcp
+- INSTALL := /usr/now/bin/install
+-endif
++#ifeq ($(GLUNIX_ARCH),i386)
++#endif
+ GLUNIX_PLATFORM = $(GLUNIX_ARCH)-$(GLUNIX_OS)-$(GLUNIX_NET)
+
+ MKDIR = $(INSTALL) -d -m 0775 -g glunix
+@@ -71,34 +73,43 @@
+ INSTALL_MAN = $(INSTALL) -m 0664 -g glunix
+
+ OBJROOT := ../obj
+-BINROOT := ../../bin
+-LIBROOT := ../../lib
++BINROOT := ../bin
++LIBROOT := ../lib
+ OBJDIR := $(OBJROOT)/$(GLUNIX_PLATFORM)
+ BINDIR := $(BINROOT)/$(GLUNIX_PLATFORM)
+ LIBDIR := $(LIBROOT)/$(GLUNIX_PLATFORM)
+
+ CC := gcc
+-LD := gcc
++LD := ld
+
+ INCLUDE_DIRS := -I../include $(addprefix -I./,$(ALL_MODULES))
+ #CFLAGS += -pipe -g -Wall -DDEBUG -DGLUNIX_PLATFORM=$(GLUNIX_PLATFORM) $(INCLUDE_DIRS)
+-CFLAGS += -Wall -g -O2 -DDEBUG -DGLUNIX_PLATFORM=$(GLUNIX_PLATFORM) $(INCLUDE_DIRS)
++CFLAGS += -Wall -g -O2 $(FLAGS) -DDEBUG -DGLUNIX_PLATFORM=$(GLUNIX_PLATFORM) $(INCLUDE_DIRS)
+ #CFLAGS += -pipe -Wall -O4 -DGLUNIX_PLATFORM=$(GLUNIX_PLATFORM) $(INCLUDE_DIRS)
+
+-MLDLIBS += -lsocket -lnsl \
+- -L$(GLUNIX_BASE)/release/lib/$(GLUNIX_PLATFORM)
+-DLDLIBS += -R/usr/lib -lsocket -lnsl -lm -lelf -lkvm \
+- -L$(GLUNIX_BASE)/release/lib/$(GLUNIX_PLATFORM)
++MLDLIBS += -L$(GLUNIX_BASE)/release/lib/$(GLUNIX_PLATFORM)
++DLDLIBS += -R/usr/lib -lm -lkvm -L$(GLUNIX_BASE)/release/lib/$(GLUNIX_PLATFORM)
++
++#MLDLIBS += -lsocket -lnsl \
++# -L$(GLUNIX_BASE)/release/lib/$(GLUNIX_PLATFORM)
++#DLDLIBS += -R/usr/lib -lsocket -lnsl -lm -lelf -lkvm \
++# -L$(GLUNIX_BASE)/release/lib/$(GLUNIX_PLATFORM)
+
+ MOBJS := $(addprefix $(OBJDIR)/,$(patsubst %.c,%.o,$(MSRC:.cc=.o)))
+ DOBJS := $(addprefix $(OBJDIR)/,$(patsubst %.c,%.o,$(DSRC:.cc=.o)))
+ LOBJS := $(addprefix $(OBJDIR)/,$(patsubst %.c,%.o,$(LSRC:.cc=.o)))
++SOBJS := $(addprefix $(OBJDIR)/,$(patsubst %.c,%.so,$(LSRC:.cc=.so)))
+
+ vpath %.cc $(ALL_BUILD_MODULES)
+ vpath %.c list
+ vpath %.o $(OBJDIR)
+ vpath %.a $(OBJDIR)
+
++$(OBJDIR)/%.so : %.cc $(OBJDIR)
++ "rm" -f $@ ; \
++ echo $(CC) -fpic -DPIC -c $(CFLAGS) $(CPPFLAGS) $< -o $@ ; \
++ $(CC) -fpic -DPIC -c $(CFLAGS) $(CPPFLAGS) $< -o $@ ; \
++
+ $(OBJDIR)/%.o : %.cc $(OBJDIR)
+ "rm" -f $@ ; \
+ echo $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ ; \
+@@ -136,6 +147,7 @@
+ "rm" -f $(DOBJS) $(OBJDIR)/daemon; \
+ echo Deleting library objects; \
+ "rm" -f $(LOBJS) $(OBJDIR)/libglunix.*
++ "rm" -f $(SOBJS) $(OBJDIR)/libglunix.*
+
+ tags:
+ echo 'etags -C ../include/*.h ../include/glib/*.h */*.h */*.cc */*.c'
+@@ -143,7 +155,7 @@
+
+ master: $(OBJDIR)/master
+ daemon: $(OBJDIR)/daemon
+-library: $(OBJDIR)/libglunix.so
++library: $(OBJDIR)/libglunix.so.1.0
+
+ install: master daemon library
+ $(MKDIR) $(BINDIR); \
+@@ -155,9 +167,9 @@
+ $(INSTALL_BIN) $(OBJDIR)/daemon $(BINDIR)/daemon; \
+ echo Installing library; \
+ $(MKDIR) $(LIBDIR); \
+- $(INSTALL_BIN) $(LIBDIR)/libglunix.so $(LIBDIR)/libglunix.so.old; \
++ $(INSTALL_BIN) $(LIBDIR)/libglunix.so.1.0 $(LIBDIR)/libglunix.so.old; \
+ $(INSTALL_BIN) $(LIBDIR)/libglunix.a $(LIBDIR)/libglunix.a.old; \
+- $(INSTALL_BIN) $(OBJDIR)/libglunix.so $(LIBDIR)/libglunix.so; \
++ $(INSTALL_BIN) $(OBJDIR)/libglunix.so.1.0 $(LIBDIR)/libglunix.so.1.0; \
+ $(INSTALL_BIN) $(OBJDIR)/libglunix.a $(LIBDIR)/libglunix.a
+ endif
+
+@@ -165,30 +177,32 @@
+ echo " " ; \
+ echo Linking master; \
+ $(INSTALL_BIN) $(OBJDIR)/master $(OBJDIR)/master.old ; \
+- echo $(PURIFY_COMMAND) $(LD) -g -o $(OBJDIR)/master $(MOBJS) $(MLDLIBS) ; \
+- $(PURIFY_COMMAND) $(LD) -g -o $(OBJDIR)/master $(MOBJS) $(MLDLIBS); \
++ echo $(PURIFY_COMMAND) $(CC) -o $(OBJDIR)/master $(MOBJS) $(MLDLIBS) ; \
++ $(PURIFY_COMMAND) $(CC) -o $(OBJDIR)/master $(MOBJS) $(MLDLIBS); \
+ echo Master done.
+
+ $(OBJDIR)/daemon: $(DOBJS)
+ echo " " ; \
+ echo Linking daemon; \
+ $(INSTALL_BIN) $(OBJDIR)/daemon $(OBJDIR)/daemon.old ; \
+- echo $(PURIFY_COMMAND) $(LD) -g -o $(OBJDIR)/daemon $(DOBJS) $(DLDLIBS) ; \
+- $(PURIFY_COMMAND) $(LD) -g -o $(OBJDIR)/daemon $(DOBJS) $(DLDLIBS); \
++ echo $(PURIFY_COMMAND) $(CC) -o $(OBJDIR)/daemon $(DOBJS) $(DLDLIBS) ; \
++ $(PURIFY_COMMAND) $(CC) -o $(OBJDIR)/daemon $(DOBJS) $(DLDLIBS); \
+ echo Daemon done.
+
+-$(OBJDIR)/libglunix.so: $(LOBJS)
++$(OBJDIR)/libglunix.so.1.0: $(LOBJS) $(SOBJS)
+ echo " " ; \
+ echo "Building library" ; \
+ rm -f $(OBJDIR)/libglunix.a ; \
+ echo ar ruc $(OBJDIR)/libglunix.a $(LOBJS) ; \
+ ar ruc $(OBJDIR)/libglunix.a $(LOBJS) ; \
+- echo $(LD) -g -o $(OBJDIR)/libglunix.so -G $(LOBJS) ; \
+- $(LD) -g -o $(OBJDIR)/libglunix.so -G $(LOBJS) ; \
++ echo ranlib $(OBJDIR)/libglunix.a ; \
++ ranlib $(OBJDIR)/libglunix.a ; \
++ echo $(LD) -x -Bshareable -Bforcearchive -o $(OBJDIR)/libglunix.so.1.0 $(SOBJS) ; \
++ $(LD) -x -Bshareable -Bforcearchive -o $(OBJDIR)/libglunix.so.1.0 $(SOBJS) ; \
+ touch $(OBJDIR)/libglunix.a ; \
+- touch $(OBJDIR)/libglunix.so ; \
+- chgrp glunix $(OBJDIR)/libglunix.a $(OBJDIR)/libglunix.so; \
+- chmod g+w $(OBJDIR)/libglunix.a $(OBJDIR)/libglunix.so; \
++ touch $(OBJDIR)/libglunix.so.1.0 ; \
++ chgrp glunix $(OBJDIR)/libglunix.a $(OBJDIR)/libglunix.so.1.0; \
++ chmod g+w $(OBJDIR)/libglunix.a $(OBJDIR)/libglunix.so.1.0; \
+ echo Library done.
+
+ #$(sort $(MOBJS) $(DOBJS) $(LOBJS)): $(OBJDIR)
+@@ -202,7 +216,7 @@
+ echo Rebuilding dependencies.; \
+ touch $@.new; \
+ echo makedepend -f$@ -p$(OBJDIR)/ -- $(CFLAGS) -- ... ; \
+- makedepend -f$@.new -w256 -p$(OBJDIR)/ -- $(CFLAGS) -- $(DEPEND_SRC) ;\
++ ../../makedepend/makedepend -f$@.new -w256 -p$(OBJDIR)/ -- $(CFLAGS) -- $(DEPEND_SRC) ;\
+ cat $@.new | sed -e 's,/usr/include[^ ]*,,g' | sed -e 's,[^:]*: *$$,,' | sed -e 's,$(OBJDIR)/[^/]*,$(OBJDIR),' | uniq >$@ ; \
+ rm -f $@.new.bak $@.new ; \
+ echo " " ; \
diff --git a/parallel/glunix/patches/patch-ab b/parallel/glunix/patches/patch-ab
new file mode 100644
index 00000000000..835681758c9
--- /dev/null
+++ b/parallel/glunix/patches/patch-ab
@@ -0,0 +1,71 @@
+$NetBSD: patch-ab,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+--- glunix/src/comm/ccomm_net.cc.orig Wed Oct 15 12:24:52 1997
++++ glunix/src/comm/ccomm_net.cc Thu Apr 2 08:54:18 1998
+@@ -75,3 +75,4 @@
+ #include <unistd.h>
+-#include <sys/systeminfo.h>
++/*#include <sys/systeminfo.h>*/
++#include <sys/uio.h>
+
+@@ -260,3 +261,3 @@
+ if (!h) {
+- DE("Cannot resolve host name: %s\n", strerror(errno));
++ DE("Cannot resolve host name: %s %s\n",hostName, strerror(errno));
+ // BUGBUG set error code
+@@ -330,10 +331,11 @@
+ // Get my IP address
+- if (sysinfo(SI_HOSTNAME, hostName, sizeof(hostName)-1) < 0) {
+- DE("sysinfo(SI_HOSTNAME): %s\n", strerror(errno));
+- *ipPtr = 0;
+- return False;
+- }
++// if (sysinfo(SI_HOSTNAME, hostName, sizeof(hostName)-1) < 0) {
++// DE("sysinfo(SI_HOSTNAME): %s\n", strerror(errno));
++// *ipPtr = 0;
++// return False;
++// }
++ gethostname(hostName,sizeof(hostName));
+ h = gethostbyname(hostName);
+ if (!h) {
+- DE("Cannot resolve host name: %s\n", strerror(errno));
++ DE("Cannot resolve host name: %s %s\n",hostName, strerror(errno));
+ // BUGBUG error code
+@@ -378,3 +380,7 @@
+ // use ntohs to convert it back to host order for pc's
++#ifdef L_ENDIAN
++ *port = s.sin_port;
++#else
+ *port = ntohs(s.sin_port);
++#endif
+ return True;
+@@ -437,4 +443,7 @@
+ }
+-
++#ifdef L_ENDIAN
++ *ipAddrPtr = s.sin_addr.s_addr;
++#else
+ *ipAddrPtr = ntohl(s.sin_addr.s_addr);
++#endif
+ return True;
+@@ -530,4 +539,9 @@
+ s.sin_family = AF_INET;
++#ifdef L_ENDIAN
++ s.sin_port = port;
++ s.sin_addr.s_addr = INADDR_ANY;
++#else
+ s.sin_port = htons(port);
+ s.sin_addr.s_addr = htonl(INADDR_ANY);
++#endif
+
+@@ -639,5 +653,9 @@
+ s.sin_family = AF_INET ;
++#ifdef L_ENDIAN
++ s.sin_port = port;
++ s.sin_addr.s_addr = ipAddr;
++#else
+ s.sin_port = htons(port);
+ s.sin_addr.s_addr = htonl(ipAddr);
+-
++#endif
+ if (connect(sock, (struct sockaddr *) &s, sizeof(s)) < 0) {
diff --git a/parallel/glunix/patches/patch-ac b/parallel/glunix/patches/patch-ac
new file mode 100644
index 00000000000..6787350c37c
--- /dev/null
+++ b/parallel/glunix/patches/patch-ac
@@ -0,0 +1,14 @@
+$NetBSD: patch-ac,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+--- glunix/src/init/bsd.h.orig Thu Feb 5 03:07:31 1998
++++ glunix/src/init/bsd.h Thu Feb 5 03:08:27 1998
+@@ -88,3 +88,3 @@
+ //ssize_t write(int filedes, const char *buffer, size_t nbytes);
+-int connect(int socket, struct sockaddr *address, int address_len);
++//int connect(int socket, struct sockaddr *address, int address_len);
+ //int setsockopt(int socket, int level, int option_name, char *option_value,
+@@ -92,3 +92,3 @@
+ int socket(int addr_family, int type, int protocol);
+-void bzero(char *string, int length);
++//void bzero(char *string, int length);
+ int listen(int socket, int backlog);
diff --git a/parallel/glunix/patches/patch-ad b/parallel/glunix/patches/patch-ad
new file mode 100644
index 00000000000..2e6cf96e696
--- /dev/null
+++ b/parallel/glunix/patches/patch-ad
@@ -0,0 +1,11 @@
+$NetBSD: patch-ad,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+--- glunix/src/debug/cdebug.cc.orig Thu Feb 5 03:21:37 1998
++++ glunix/src/debug/cdebug.cc Thu Feb 5 03:25:35 1998
+@@ -148,4 +148,4 @@
+
+-#include <sys/varargs.h>
+-#include <sys/va_list.h>
++/*#include <varargs.h>*/
++/*#include <sys/va_list.h>*/
+
diff --git a/parallel/glunix/patches/patch-ae b/parallel/glunix/patches/patch-ae
new file mode 100644
index 00000000000..7f18545b644
--- /dev/null
+++ b/parallel/glunix/patches/patch-ae
@@ -0,0 +1,9 @@
+$NetBSD: patch-ae,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+--- glunix/src/perf/mperf.cc.orig Thu Feb 5 03:31:15 1998
++++ glunix/src/perf/mperf.cc Thu Feb 5 03:32:02 1998
+@@ -190,3 +190,3 @@
+ int ctr, offset;
+- longlong_t startTime, stopTime, remoteTime;
++ quad_t startTime, stopTime, remoteTime;
+ double min, max, totalValue, var;
diff --git a/parallel/glunix/patches/patch-af b/parallel/glunix/patches/patch-af
new file mode 100644
index 00000000000..b2c5b000cf9
--- /dev/null
+++ b/parallel/glunix/patches/patch-af
@@ -0,0 +1,52 @@
+$NetBSD: patch-af,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+--- glunix/src/sched/csched.cc.orig Thu Jul 25 15:01:27 1996
++++ glunix/src/sched/csched.cc Thu Mar 12 03:52:15 1998
+@@ -86,2 +86,8 @@
+ #include <errno.h>
++
++#ifdef __NetBSD__
++#include <sys/time.h>
++#include <sys/resource.h>
++typedef short pri_t;
++#else
+ #include <sys/priocntl.h>
+@@ -89,2 +95,3 @@
+ #include <sys/tspriocntl.h>
++#endif
+
+@@ -104,2 +111,3 @@
+ *****************************************************************************/
++#ifndef __NetBSD__
+ static short
+@@ -122,2 +130,3 @@
+ }
++#endif
+
+@@ -133,2 +142,5 @@
+ *****************************************************************************/
++#ifdef __NetBSD__
++
++#else
+ static id_t
+@@ -154,3 +166,3 @@
+ }
+-
++#endif
+ /******************************************************************************
+@@ -170,4 +182,10 @@
+ void
+-Sched_SetSchedPriority(pid_t targPid, pri_t offset)
++Sched_SetSchedPriority(pid_t targPid, short offset)
+ {
++#ifdef __NetBSD__
++
++ setpriority(PRIO_PROCESS, targPid, PRIO_MIN+offset);
++ return;
++
++#else
+ pcparms_t parms;
+@@ -184,2 +202,3 @@
+ return;
++#endif
+ }
diff --git a/parallel/glunix/patches/patch-ag b/parallel/glunix/patches/patch-ag
new file mode 100644
index 00000000000..27c67b30375
--- /dev/null
+++ b/parallel/glunix/patches/patch-ag
@@ -0,0 +1,9 @@
+$NetBSD: patch-ag,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+--- glunix/src/sched/csched.h~ Fri Feb 27 06:54:16 1998
++++ glunix/src/sched/csched.h Fri Feb 27 06:54:33 1998
+@@ -98,3 +98,3 @@
+
+-extern void Sched_SetSchedPriority(pid_t targPid, pri_t offset);
++extern void Sched_SetSchedPriority(pid_t targPid, short offset);
+
diff --git a/parallel/glunix/patches/patch-ah b/parallel/glunix/patches/patch-ah
new file mode 100644
index 00000000000..965ec6456de
--- /dev/null
+++ b/parallel/glunix/patches/patch-ah
@@ -0,0 +1,68 @@
+$NetBSD: patch-ah,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+--- glunix/src/signal/csignal.cc.orig Thu Oct 24 15:40:47 1996
++++ glunix/src/signal/csignal.cc Fri Mar 13 04:53:45 1998
+@@ -113,2 +113,5 @@
+ #endif
++#ifdef __NetBSD__
++#define MAX_SIGNAL NSIG
++#endif
+
+@@ -218,8 +221,14 @@
+ sigaddset(&allSignals, SIGUSR2);
++#ifndef __NetBSD__
+ sigaddset(&allSignals, SIGCLD);
++#endif
+ sigaddset(&allSignals, SIGCHLD);
++#ifndef __NetBSD__
+ sigaddset(&allSignals, SIGPWR);
++#endif
+ sigaddset(&allSignals, SIGWINCH);
+ sigaddset(&allSignals, SIGURG);
++#ifndef __NetBSD__
+ sigaddset(&allSignals, SIGPOLL);
++#endif
+ sigaddset(&allSignals, SIGIO);
+@@ -234,4 +243,5 @@
+ sigaddset(&allSignals, SIGXFSZ);
++#ifndef __NetBSD__
+ sigaddset(&allSignals, SIGWAITING);
+-
++#endif
+ initialized = True;
+@@ -440,3 +450,7 @@
+ // Otherwise, we're not catching it and we should be
++#ifdef __NetBSD__
++ signal(sig, CatchSignal);
++#else
+ sigset(sig, CatchSignal);
++#endif
+ }
+@@ -865,7 +879,14 @@
+ {
+- if (sighold(sig) < 0) {
+- return False;
+- } else {
+- return True;
+- }
++#ifdef __NetBSD__
++int i;
++ i = sigsetmask(NULL);
++ i &= ~sigmask(sig);
++ if (sigsetmask(i) < 0) {
++#else
++ if (sighold(sig) < 0) {
++#endif
++ return False;
++ } else {
++ return True;
++ }
+ }
+@@ -887,3 +908,7 @@
+ {
++#ifdef __NetBSD__
++ if (sigsetmask(sigmask(sig)) < 0 ) {
++#else
+ if (sigrelse(sig) < 0) {
++#endif
+ return False;
diff --git a/parallel/glunix/patches/patch-ai b/parallel/glunix/patches/patch-ai
new file mode 100644
index 00000000000..9fc9e0b0cbb
--- /dev/null
+++ b/parallel/glunix/patches/patch-ai
@@ -0,0 +1,26 @@
+$NetBSD: patch-ai,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+--- glunix/src/util/cutil.cc~ Fri Sep 5 12:30:13 1997
++++ glunix/src/util/cutil.cc Fri Feb 27 02:17:05 1998
+@@ -84,3 +84,7 @@
+ #include <stdio.h>
++#ifndef __NetBSD__
+ #include <sys/systeminfo.h>
++#else
++#include <unistd.h>
++#endif
+ #include <string.h>
+@@ -139,3 +143,8 @@
+ }
+-
++#ifdef __NetBSD__
++ if (gethostname(hostname,sizeof(hostname)-1) < 0) {
++ DE("Hostname: %s\n",strerror(errno));
++ return NULL;
++ }
++#else
+ if (sysinfo(SI_HOSTNAME, hostname, sizeof(hostname)-1) < 0) {
+@@ -144,2 +153,3 @@
+ }
++#endif
+ init = True;
diff --git a/parallel/glunix/patches/patch-aj b/parallel/glunix/patches/patch-aj
new file mode 100644
index 00000000000..994ec58a268
--- /dev/null
+++ b/parallel/glunix/patches/patch-aj
@@ -0,0 +1,284 @@
+$NetBSD: patch-aj,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+--- glunix/src/idle/didle_sysinfo.cc~ Thu Sep 18 12:04:55 1997
++++ glunix/src/idle/didle_sysinfo.cc Fri Feb 27 06:42:28 1998
+@@ -97,2 +97,12 @@
+ #include <stdio.h>
++
++#ifdef __NetBSD__
++#include <stdlib.h>
++#include <sys/time.h>
++#include <sys/param.h>
++#include <sys/proc.h>
++#include <miscfs/procfs/procfs.h>
++#include <vm/vm_swap.h>
++#include <sys/sysctl.h>
++#else
+ #include <sys/proc.h>
+@@ -102,5 +112,10 @@
+ #include <sys/time.h>
++#endif
++
+ #include <unistd.h>
+ #include <bsd.h>
++
++#ifndef __NetBSD__
+ #include <vm/anon.h> // Contains defns for swap virtual memory info
++#endif
+
+@@ -122,8 +137,47 @@
+ #define HASH(x) ((x) >> 1)
++
++#ifdef __NetBSD__
++int getpsize()
++{
++ FILE *file;
++ char *buf;
++
++ file = fopen("/kern/pagesize","r");
++ fscanf(file,"%s",buf);
++ fclose(file);
++ return atoi(buf);
++}
++#define PAGETOK(size) (size) * getpsize()
++
++#else
+ #define PAGETOK(size) (size) << 3 // 8K pages
++#endif
+
++#ifndef __NetBSD__
+ #define MAX(a, b) (((a) > (b)) ? (a) : (b))
+-
++#endif
+ /*****************************************************************************/
+
++#ifdef __NetBSD__
++static struct nlist nlst[] = {
++#define X_CCPU 0
++ { "_ccpu" }, /* 0 */
++#define X_CP_TIME 1
++ { "_cp_time" }, /* 1 */
++#define X_HZ 2
++ { "_hz" }, /* 2 */
++#define X_STATHZ 3
++ { "_stathz" }, /* 3 */
++#define X_AVENRUN 4
++ { "_averunnable" }, /* 4 */
++#define X_CNT 5
++ { "_cnt" },
++
++ { 0 }
++};
++
++static ulong cp_time_offset,cnt_offset;
++
++#else
++
+ /* definitions for indices in the nlist array */
+@@ -167,3 +221,3 @@
+ static ulong avenrunOffset, availrmemOffset, anoninfoOffset, swapfsOffset;
+-
++#endif
+ /*****************************************************************************/
+@@ -239,2 +293,41 @@
+ *****************************************************************************/
++#ifdef __NetBSD__
++Bool
++Idle_InitializeSysinfo(void)
++{
++ int notFound;
++ int i;
++
++ if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open")) == NULL) {
++ kd = NULL;
++ perror("(dile)Idle_InitializeSysinfo: kvm_open");
++ return -1;
++ }
++ /* get the list of symbols we want to access in the kernel */
++ if ((notFound = kvm_nlist(kd, nlst)) < 0) {
++ fprintf(stderr, "res: nlist failed\n");
++ return False;
++ }
++ numCpus=1;
++ cp_time_offset = nlst[X_CP_TIME].n_value;
++ cnt_offset = nlst[X_CNT].n_value;
++
++ if (!(procdir = opendir(PROCFS))) {
++ (void) fprintf(stderr, "Unable to open %s\n", PROCFS);
++ return False;
++ }
++ /* handy for later on when we're reading it */
++ if (chdir(PROCFS)) {
++ (void) fprintf(stderr, "Unable to chdir to %s\n", PROCFS);
++ return False;
++ }
++
++ for (i = 0; i < USAGE_TABLE_SIZE; i++) {
++ procUsageTable[i].pid = -1;
++ procUsageTable[i].cpuUsage = 0.0;
++ }
++
++ return True;
++}
++#else
+ Bool
+@@ -303,3 +396,3 @@
+ }
+-
++#endif
+ /******************************************************************************
+@@ -335,4 +428,9 @@
+ *****************************************************************************/
++#ifdef __NetBSD__
++static ProcUsage *
++FindEntry(pid_t pid, double usage)
++#else
+ static ProcUsage *
+ FindEntry(struct prpsinfo *targProc, double usage)
++#endif
+ {
+@@ -340,5 +438,8 @@
+ ProcUsage *candidate;
++#ifdef __NetBSD__
++ index = HASH(pid);
++#else
+ ASSERT(targProc != NULL);
+-
+ index = HASH(targProc->pr_pid);
++#endif
+ start = index;
+@@ -346,3 +447,7 @@
+ candidate = &(procUsageTable[index]);
++#ifdef __NetBSD__
++ if (candidate->pid == pid) {
++#else
+ if (candidate->pid == targProc->pr_pid) {
++#endif
+ /* Has this pid been recycled? Are we hitting a very old process?
+@@ -355,3 +460,7 @@
+ if (candidate->pid == -1) {
++#ifdef __NetBSD__
++ candidate->pid = pid;
++#else
+ candidate->pid = targProc->pr_pid;
++#endif
+ candidate->cpuUsage = 0;
+@@ -381,2 +490,8 @@
+ *****************************************************************************/
++
++#ifdef __NetBSD__
++static void
++UpdateEntry(ProcUsage *entry, double usage)
++{
++#else
+ static void
+@@ -385,2 +500,3 @@
+ UNUSED_PARAM(proc);
++#endif
+ ASSERT(entry != NULL);
+@@ -410,3 +526,11 @@
+ {
++
++#ifndef __NetBSD__
+ struct prpsinfo currproc; /* pointer to current proc structure */
++#else
++ struct kinfo_proc *procs;
++ int mib[3],i;
++ size_t size;
++#endif
++
+ int fd;
+@@ -461,2 +585,29 @@
+ numProcs = 0;
++
++#ifdef __NetBSD__
++ size = 0;
++ mib[0] = CTL_KERN;
++ mib[1] = KERN_PROC;
++ mib[2] = KERN_PROC_ALL;
++
++ sysctl(mib, 3, NULL, &size, NULL, 0);
++ procs = (struct kinfo_proc *)malloc(size);
++ sysctl(mib, 3, procs, &size, NULL, 0);
++ numProcs = size / sizeof(struct kinfo_proc);
++
++ for (i=0; i<numProcs; i++) {
++ activeMemory[TOTAL] += procs[i].kp_eproc.e_xrssize;
++ vmInUse[TOTAL] += procs[i].kp_eproc.e_xsize;
++ currUsage = procs[i].kp_proc.p_rtime.tv_sec * 1.0e9 + procs[i].kp_proc.p_rtime.tv_usec * 1000;
++ oldProc = FindEntry(procs[i].kp_proc.p_pid, currUsage);
++ percentCpu = (currUsage - oldProc->cpuUsage) / timeDiff;
++ UpdateEntry(oldProc, currUsage);
++ cpuUsage[TOTAL] += (int) (percentCpu * 10.0);
++ if (glunixProcs->KeySearch(procs[i].kp_proc.p_pid) == NULL) {
++ activeMemory[SEQUENTIAL] += procs[i].kp_eproc.e_xrssize;
++ vmInUse[SEQUENTIAL] += procs[i].kp_eproc.e_xsize;
++ cpuUsage[SEQUENTIAL] += (int) (percentCpu * 10.0);
++ }
++ }
++#else
+ rewinddir(procdir);
+@@ -495,2 +646,3 @@
+ }
++#endif
+ total->mem = activeMemory[TOTAL];
+@@ -505,6 +657,15 @@
+ {
+- struct anoninfo anoninfo;
++#ifndef __NetBSD__
++ int i;
+ long avenrun[3];
++ struct anoninfo anoninfo;
+ int ani_max, ani_resv, availrmem, swapfs_minfree;
+- int i;
++#else
++ int i;
++ double avenrun[3];
++ struct vmmeter sum;
++ struct swapent *sep;
++ int totalsize, size, totalinuse, inuse, ncounted;
++ int rnswap, nswap;
++#endif
+
+@@ -517,3 +678,37 @@
+ }
++#ifdef __NetBSD__
+
++ getloadavg(avenrun,3);
++ for (i = 0; i < 3; i++) {
++ sysLoad->loadAvg[i] = avenrun[i];
++ }
++
++ kvm_read(kd, cnt_offset, (int *)(&sum), sizeof(sum));
++ sep = NULL;
++ do {
++ nswap = swapctl(SWAP_NSWAP, 0, 0);
++ if (nswap < 1)
++ break;
++ sep = (struct swapent *)malloc(nswap * sizeof(*sep));
++ if (sep == NULL)
++ break;
++ rnswap = swapctl(SWAP_STATS, (void *)sep, nswap);
++ if (nswap != rnswap)
++ break;
++
++ totalsize = totalinuse = ncounted = 0;
++ for (; rnswap-- > 0; sep++) {
++ ncounted++;
++ size = sep->se_nblks;
++ inuse = sep->se_inuse;
++ totalsize += size;
++ totalinuse += inuse;
++ }
++
++ } while (0);
++ if (sep)
++ free(sep);
++
++ sysLoad->memory = PAGETOK(dbtob(totalsize) - dbtob(totalinuse) + sum.v_free_count);
++#else
+ /* get load average array */
+@@ -541,2 +736,3 @@
+
++#endif
+ return;
diff --git a/parallel/glunix/patches/patch-ak b/parallel/glunix/patches/patch-ak
new file mode 100644
index 00000000000..5e21f5d447d
--- /dev/null
+++ b/parallel/glunix/patches/patch-ak
@@ -0,0 +1,22 @@
+$NetBSD: patch-ak,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- glunix/src/idle/didle_sysinfo.h~ Thu Sep 21 16:57:04 1995
++++ glunix/src/idle/didle_sysinfo.h Fri Feb 27 06:33:45 1998
+@@ -96,2 +96,4 @@
+
++#ifndef __NetBSD__
++
+ #define X_AVENRUN 0
+@@ -108,2 +110,3 @@
+ #define X_VMINFO 11
++#endif
+
+@@ -118,2 +121,3 @@
+ */
++#ifndef __NetBSD__
+ #define PRPSINFOSIZE (((sizeof(struct prpsinfo) + 7) / 8) * 8)
+@@ -121,3 +125,3 @@
+ #define PAGE_SIZE 4096 /* operating system page size */
+-
++#endif
+ #define NUM_CPUSTATES 5
diff --git a/parallel/glunix/patches/patch-al b/parallel/glunix/patches/patch-al
new file mode 100644
index 00000000000..0afa6d0c00f
--- /dev/null
+++ b/parallel/glunix/patches/patch-al
@@ -0,0 +1,40 @@
+$NetBSD: patch-al,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- glunix/src/nmgt/dnmgt.cc.orig Thu Sep 18 12:05:03 1997
++++ glunix/src/nmgt/dnmgt.cc Thu Apr 9 09:13:12 1998
+@@ -143,3 +143,6 @@
+ #include <string.h>
++
++#ifndef __NetBSD__
+ #include <sys/processor.h>
++#endif
+
+@@ -202,2 +205,23 @@
+ {
++#ifdef __NetBSD__
++
++ FILE *file;
++ int *psize, *phys;
++ int one,two;
++
++ psize = &one;
++ phys = &two;
++
++ hello->machDesc.numProcessors = 1; /* hardcoded cuz I know better */
++ file = fopen("/kern/pagesize","r");
++ fscanf(file,"%d",psize);
++ fclose(file);
++ file = fopen("/kern/physmem","r");
++ fscanf(file,"%d",phys);
++ fclose(file);
++ hello->machDesc.totalMegs = one * two;
++ hello->machDesc.mhz = 100; /* this is a hack XXX */
++
++#else
++
+ processor_info_t info;
+@@ -218,3 +242,3 @@
+ // Could use uname() to get the os type and version.
+-
++#endif
+ return True;
diff --git a/parallel/glunix/patches/patch-am b/parallel/glunix/patches/patch-am
new file mode 100644
index 00000000000..d5968e4f4bf
--- /dev/null
+++ b/parallel/glunix/patches/patch-am
@@ -0,0 +1,231 @@
+$NetBSD: patch-am,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- glunix/src/rexec/drexec.cc.orig Thu Oct 2 12:34:05 1997
++++ glunix/src/rexec/drexec.cc Fri Apr 3 16:58:09 1998
+@@ -308,3 +308,10 @@
+ #include <stdlib.h>
++
++#ifdef __NetBSD__
++#include <sys/ptrace.h>
++#include <sys/ioctl.h>
++#else
+ #include <stropts.h>
++#endif
++
+ #include <grp.h>
+@@ -355,5 +362,7 @@
+ static int PtyMasterOpen(char *ptyName);
+-/*static int PtySlaveOpen(char *ptyName, int uid, int gid);*/
++#ifdef __NetBSD__
++static int PtySlaveOpen(char *ptyName, int uid, int gid);
++#else
+ static int PtySlaveOpen(char *ptyName, int ptyMasterFd);
+-
++#endif
+ /*****************************************************************************/
+@@ -1143,4 +1152,8 @@
+ // Open the stderr pty
++#ifdef __NetBSD__
++ if((ptyErrorSlaveFd = PtySlaveOpen(ptyErrorName, msg->uid, msg->gid)) == -1) {
++#else
+ if((ptyErrorSlaveFd = PtySlaveOpen(ptyErrorName, ptyErrorMasterFd))
+ == -1) {
++#endif
+ DE("PtySlaveOpen() failed\n");
+@@ -1150,13 +1163,17 @@
+
+-/* if(setsid() == -1) {
+- Debug_Print(MODULE_REXEC, DEBUG_ERROR, "(rexec)ChildPtyPiping: "
+- "setsid() failed\n");
+- return False;
+- }*/
++#ifdef __NetBSD__
++ if(setsid() == -1) {
++ DE("(rexec)ChildPtyPiping: setsid() failed\n");
++ return False;
++ }
++#endif
+
+- setpgrp();
++ setpgrp(0,0);
+
+ // Open the stdin/stdout pty
++#ifdef __NetBSD__
++ if((ptySlaveFd = PtySlaveOpen(ptyName, msg->uid, msg->gid)) == -1) {
++#else
+ if((ptySlaveFd = PtySlaveOpen(ptyName, ptyMasterFd)) == -1) {
+-/* if((ptySlaveFd = PtySlaveOpen(ptyName, msg->uid, msg->gid)) == -1) {*/
++#endif
+ DE("PtySlaveOpen() failed\n");
+@@ -1166,22 +1183,21 @@
+
+-/* This should work on BSD, but doesn't on SysV
+-#if defined(TIOCSCTTY) && !defined(CIBAUD)
++#ifdef __NetBSD__
++ /* This should work on BSD, but doesn't on SysV*/
+ if(ioctl(ptySlaveFd, TIOCSCTTY, (char *) 0) == -1) {
+- DE("cannot set controlling tty: %s\n", strerror(errno));
+- return False;
++ DE("cannot set controlling tty: %s\n", strerror(errno));
++ return False;
+ }
+-#else
+-#error Nope
+-#endif */
+-
++#else
+ (void) ioctl(ptySlaveFd, TCSETSF, (char *)&startupTermios);
+ (void) ioctl(ptySlaveFd, TIOCSWINSZ, (char *)&windowSize);
++#endif
+
+-/* while(tcsetattr(ptySlaveFd, TCSANOW, &startupTermios) == -1) {
+- if(errno == EINTR) {
+- continue;
+- } else {
+- * BUGBUG maybe should return failure here? *
+- DE("ioctl: %s\n", strerror(errno));
+- }
++#ifdef __NetBSD__
++ while(tcsetattr(ptySlaveFd, TCSANOW, &startupTermios) == -1) {
++ if(errno == EINTR) {
++ continue;
++ } else {
++ /* BUGBUG maybe should return failure here? */
++ DE("ioctl: %s\n", strerror(errno));
++ }
+ }
+@@ -1189,16 +1205,18 @@
+ if(ioctl(ptySlaveFd, TIOCSWINSZ, (char *) &windowSize) == -1) {
+- * BUGBUG maybe should return failure here? *
+- DE("ioctl: %s\n", strerror(errno));
+- } */
+-
++ /* BUGBUG maybe should return failure here? */
++ DE("ioctl: %s\n", strerror(errno));
++ }
++#else
+ (void) ioctl(ptyErrorSlaveFd, TCSETSF, (char *)&startupTermios);
+ (void) ioctl(ptyErrorSlaveFd, TIOCSWINSZ, (char *)&windowSize);
++#endif
+
+-/* while(tcsetattr(ptyErrorSlaveFd, TCSANOW, &startupTermios) == -1) {
+- if(errno == EINTR) {
+- continue;
+- } else {
+- * BUGBUG maybe should return failure here? *
+- DE("ioctl: %s\n", strerror(errno));
+- }
++#ifdef __NetBSD__
++ while(tcsetattr(ptyErrorSlaveFd, TCSANOW, &startupTermios) == -1) {
++ if(errno == EINTR) {
++ continue;
++ } else {
++ /* BUGBUG maybe should return failure here? */
++ DE("ioctl: %s\n", strerror(errno));
++ }
+ }
+@@ -1206,5 +1224,6 @@
+ if(ioctl(ptyErrorSlaveFd, TIOCSWINSZ, (char *) &windowSize) == -1) {
+- * BUGBUG maybe should return failure here? *
+- DE("ioctl: %s\n", strerror(errno));
+- } */
++ /* BUGBUG maybe should return failure here? */
++ DE("ioctl: %s\n", strerror(errno));
++ }
++#endif
+
+@@ -1253,2 +1272,3 @@
+
++#ifndef __NetBSD__
+ int
+@@ -1273,3 +1293,3 @@
+ }
+-
++#else
+ /******************************************************************************
+@@ -1286,36 +1306,39 @@
+ ****************************************************************************/
+-/*int
++
++int
+ PtyMasterOpen(char *ptyName)
+ {
+- int ptyMasterFd;
+- char *ptr1, *ptr2;
+-
+- strcpy(ptyName, "/dev/ptyXY");
+-
+- ASSERT(strlen(ptyName) < PTY_PATH_LENGTH);
+-
+- // array index: 0123456789 (for references in following code)
+- for(ptr1 = "pqrstuvwxyzPQRST"; *ptr1 != 0; ptr1++) {
+- ptyName[8] = *ptr1;
+- for(ptr2 = "0123456789abcdef"; *ptr2 != 0; ptr2++) {
+- ptyName[9] = *ptr2;
+-
+- if((ptyMasterFd = open(ptyName, O_RDWR)) == -1) {
+- if(errno == ENOENT) {
+- return -1;
+- } else {
+- continue;
+- }
+- }
+-
+- ptyName[5] = 't'; // need to change string to "tty" so that this
+- // string can be used later to open the slave
+- // end of the pty by PtyChildOpen
+- return ptyMasterFd;
++ int ptyMasterFd;
++ char *ptr1, *ptr2;
++
++ strcpy(ptyName, "/dev/ptyXY");
++
++ ASSERT(strlen(ptyName) < PTY_PATH_LENGTH);
++
++ // array index: 0123456789 (for references in following code)
++ for(ptr1 = "pqrstuvwxyzPQRST"; *ptr1 != 0; ptr1++) {
++ ptyName[8] = *ptr1;
++ for(ptr2 = "0123456789abcdef"; *ptr2 != 0; ptr2++) {
++ ptyName[9] = *ptr2;
++
++ if((ptyMasterFd = open(ptyName, O_RDWR)) == -1) {
++ if(errno == ENOENT) {
++ return -1;
++ } else {
++ continue;
+ }
++ }
++
++ ptyName[5] = 't'; // need to change string to "tty" so that this
++ // string can be used later to open the slave
++ // end of the pty by PtyChildOpen
++ return ptyMasterFd;
+ }
++ }
+
+- return -1;
+-}*/
++ return -1;
++}
++#endif
+
++#ifndef __NetBSD__
+ int
+@@ -1366,3 +1389,3 @@
+ }
+-
++#else
+ /******************************************************************************
+@@ -1399,3 +1422,3 @@
+ }
+-
++#endif
+ /******************************************************************************
+@@ -1802,3 +1825,7 @@
+ (received the SIG_STOP or SIG_CONT possibly) */
++#ifdef __NetBSD__
++ if ((WIFSTOPPED(procStat)) || (WIFSIGNALED(procStat))) {
++#else
+ if ((WIFSTOPPED(procStat)) || (WIFCONTINUED(procStat))) {
++#endif
+ // BUGBUG Shouldn't we signal the startup here????
diff --git a/parallel/glunix/patches/patch-an b/parallel/glunix/patches/patch-an
new file mode 100644
index 00000000000..6f71a9eabfe
--- /dev/null
+++ b/parallel/glunix/patches/patch-an
@@ -0,0 +1,95 @@
+$NetBSD: patch-an,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- glunix/src/rexec/lrexec.cc~ Thu Oct 2 12:34:06 1997
++++ glunix/src/rexec/lrexec.cc Fri Feb 27 17:47:23 1998
+@@ -295,2 +295,5 @@
+ #include <limits.h>
++#ifdef __NetBSD__
++#include <sys/ioctl.h>
++#endif
+
+@@ -377,5 +380,4 @@
+
+- (void) ioctl(0, TCGETS, (char *)&saveTermios);
+-
+- /* while(tcgetattr(STDIN_FILENO, &saveTermios) == -1) {
++#ifdef __NetBSD__
++ while(tcgetattr(STDIN_FILENO, &saveTermios) == -1) {
+ if(errno == EINTR) {
+@@ -386,9 +388,12 @@
+ }
+- }*/
+-
++ }
++#else
++ (void) ioctl(0, TCGETS, (char *)&saveTermios);
++#endif
+ validTermios = True;
+
+- /* if(ioctl(STDIN_FILENO, TIOCGWINSZ, (char *) windowSize) == -1) {
++ /*
++ if(ioctl(STDIN_FILENO, TIOCGWINSZ, (char *) windowSize) == -1) {
+ return False;
+- }*/
++ }*/
+
+@@ -396,16 +401,5 @@
+
+- /**/
+-
+- buf.c_iflag &= ~(INLCR|IGNCR|ICRNL|IUCLC|IXON);
+- // buf.c_oflag &= ~OPOST;
+- buf.c_lflag &= ~(ICANON|ECHO|ISIG);
+- buf.c_cc[VMIN] = 1;
+- buf.c_cc[VTIME] = 0;
+- (void) ioctl(0, TCSETSF, (char *)&buf);
+-
+- /**/
+-
+- /*
++#ifdef __NetBSD__
+ buf.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
+-// buf.c_oflag &= ~(OPOST); on non-ultrasparcs, this loses CR's
++ buf.c_oflag &= ~(OPOST); /*on non-ultrasparcs, this loses CR's*/
+ buf.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
+@@ -418,20 +412,26 @@
+ while(tcsetattr(STDIN_FILENO, TCSAFLUSH, &buf) == -1) {
+- if(errno == EINTR) {
++ if(errno == EINTR) {
++ continue;
++ } else {
++ D1("tcsetattr(): %s\n", strerror(errno));
++
++ while(tcsetattr(STDIN_FILENO, TCSAFLUSH, &saveTermios) == -1) {
++ if(errno == EINTR) {
+ continue;
+- } else {
++ } else {
+ D1("tcsetattr(): %s\n", strerror(errno));
+-
+- while(tcsetattr(STDIN_FILENO, TCSAFLUSH, &saveTermios) == -1) {
+- if(errno == EINTR) {
+- continue;
+- } else {
+- D1("tcsetattr(): %s\n", strerror(errno));
+- return False;
+- }
+- }
+-
+ return False;
++ }
+ }
+- }*/
+-
++
++ return False;
++ }
++ }
++#else
++ buf.c_iflag &= ~(INLCR|IGNCR|ICRNL|IUCLC|IXON);
++ buf.c_lflag &= ~(ICANON|ECHO|ISIG);
++ buf.c_cc[VMIN] = 1;
++ buf.c_cc[VTIME] = 0;
++ (void) ioctl(0, TCSETSF, (char *)&buf);
++#endif
+ Comm_SetLineBuffering(False);
diff --git a/parallel/glunix/patches/patch-ao b/parallel/glunix/patches/patch-ao
new file mode 100644
index 00000000000..9ea6d54355b
--- /dev/null
+++ b/parallel/glunix/patches/patch-ao
@@ -0,0 +1,9 @@
+$NetBSD: patch-ao,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/tools/timelimit.c~ Wed Sep 3 15:34:40 1997
++++ progs/tools/timelimit.c Sat Feb 28 04:02:55 1998
+@@ -41,3 +41,3 @@
+
+- setpgrp();
++ setpgrp(0,0);
+ execv(argv[2], &(argv[2]));
diff --git a/parallel/glunix/patches/patch-ap b/parallel/glunix/patches/patch-ap
new file mode 100644
index 00000000000..7570e040e63
--- /dev/null
+++ b/parallel/glunix/patches/patch-ap
@@ -0,0 +1,133 @@
+$NetBSD: patch-ap,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/Makefile.common.orig Wed Nov 5 13:43:41 1997
++++ progs/Makefile.common Fri Mar 13 02:01:15 1998
+@@ -3,50 +3,30 @@
+ # There are configuration values that are used in this Makefile and are
+ # used to do substitutions in the scripts.
+ # Use the environment variable GLUNIX_ARCH to manage multiple architectures
+-ifeq ($(GLUNIX_ARCH),)
+- # This is the default architecture to build
+- GLUNIX_ARCH = sun4
+-endif
+-
+-ifeq ($(GLUNIX_ARCH),sun4)
+- GLUNIX_OS = solaris2.4
+- GLUNIX_NET = tcp
+- GLUNIX_PLATFORM = $(GLUNIX_ARCH)-$(GLUNIX_OS)-$(GLUNIX_NET)
+- PERL_PATH = /usr/sww/bin/perl
+- MAIL_PATH = /usr/ucb/Mail
+- RSH_PATH = /usr/sww/bin/ssh
+- GLUNIX_DIR = /disks/barad-dur/now/glunix
+- GLUNIX_DATA_DIR = $(GLUNIX_DIR)/data
+- INSTALL_DIR = /usr/now
+- HTTP_BASE = /usr/now/share/etc/httpd/docs
+- MASTER_HOSTNAME = u.CS.Berkeley.EDU
+- GLUNIX_ACCOUNT = 12345
+- GLUNIX_GROUP = 311
+- PERL_LIB_DIR = $(GLUNIX_DIR)/release/progs/tools/perl-lib
+-
+- INSTALL = /usr/sww/bin/ginstall
+-endif
+-ifeq ($(GLUNIX_ARCH),i386)
+- GLUNIX_OS = solaris2.6
+- GLUNIX_NET = tcp
+- GLUNIX_PLATFORM = $(GLUNIX_ARCH)-$(GLUNIX_OS)-$(GLUNIX_NET)
+- PERL_PATH = /usr/sww/bin/perl
+- MAIL_PATH = /usr/ucb/Mail
+- RSH_PATH = /usr/sww/bin/ssh
+- GLUNIX_DIR = /disks/barad-dur/now/glunix
+- GLUNIX_DATA_DIR = $(GLUNIX_DIR)/data
+- INSTALL_DIR = /usr/now
+- HTTP_BASE =
+- MASTER_HOSTNAME = pc0.CS.Berkeley.EDU
+- GLUNIX_ACCOUNT = 12345
+- GLUNIX_GROUP = 311
+- PERL_LIB_DIR = $(GLUNIX_DIR)/release/progs/tools/perl-lib
+
+- INSTALL = /usr/now/bin/install
++ifeq ($(OPSYS),NetBSD)
++GLUNIX_BASE = $(WRKDIR)
++GLUNIX_SOURCE = $(WRKDIR)/glunix
++GLUNIX_ARCH = $(ARCH)
++GLUNIX_OS = $(OPSYS)
++GLUNIX_NET = tcp
++GLUNIX_PLATFORM = $(GLUNIX_ARCH)-$(GLUNIX_OS)-$(GLUNIX_NET)
++PERL_PATH = ${LOCALBASE}/bin/perl
++MAIL_PATH = /usr/bin/Mail
++RSH_PATH = ${LOCALBASE}/bin/ssh
++GLUNIX_DIR = $(NOW_ROOT)
++GLUNIX_DATA_DIR = $(NOW_ROOT)/data
++INSTALL_DIR = $(NOW_ROOT)
++HTTP_BASE = $(NOW_ROOT)/man/http
++MASTER_HOSTNAME = `hostname`
++GLUNIX_ACCOUNT = 12345 # These don't matter, they're calculated at run-time
++GLUNIX_GROUP = 12345 # These don't matter, they're calculated at run-time
++PERL_LIB_DIR = $(GLUNIX_DIR)/lib/perl-lib
++INSTALL = /usr/bin/install
+ endif
+
+ # Paths to needed programs
+-MHTML2HTML = /usr/now/bin/mhtml2html
++MHTML2HTML = $(GLUNIX_SOURCE)/bin/$(GLUNIX_PLATFORM)/mhtml2html
+
+ ###########################################################################
+ # Set up purify and quantify commands
+@@ -58,7 +38,7 @@
+ PURIFY_COMMAND = purify -cache-dir=/disks/barad-dur/now/glunix/data/purify/cache
+ endif
+
+-CC = $(PURIFY_COMMAND) gcc
++CC = gcc
+ CFLAGS += -Wall -g $(RLIBPATH) $(LLIBPATH) $(INCPATH) $(LIBS) \
+ -DGLUNIX_ARCH=$(GLUNIX_ARCH) -DGLUNIX_OS=$(GLUNIX_OS) \
+ -DGLUNIX_NET=$(GLUNIX_NET) -DGLUNIX_PLATFORM=$(GLUNIX_PLATFORM) \
+@@ -69,7 +49,7 @@
+ -DGLUNIX_ACCOUNT=$(GLUNIX_ACCOUNT) -DGLUNIX_GROUP=$(GLUNIX_GROUP)
+ MKDIR = $(INSTALL) -d -m 0775 -g glunix
+ INSTALL_BIN = $(INSTALL) -m 0775 -g glunix
+-INSTALL_MAN = $(INSTALL) -m 0664 -g glunix
++INSTALL_MAN = $(INSTALL) -c -m 0664 -g glunix
+ MHTML_TO_NROFF = $(MHTML2HTML) nroff
+ MHTML_TO_HTML = $(MHTML2HTML) html
+
+@@ -96,6 +76,7 @@
+ # %%GLUNIX_GROUP%%
+ STANDARD_XLATE = sed -e 's,%%PERL_PATH%%,$(PERL_PATH),g' \
+ -e 's,%%MAIL_PATH%%,$(MAIL_PATH),g' \
++ -e 's,%%GLUNIX_BASE%%,$(GLUNIX_BASE),g' \
+ -e 's,%%RSH_PATH%%,$(RSH_PATH),g' \
+ -e 's,%%GLUNIX_ARCH%%,$(GLUNIX_ARCH),g' \
+ -e 's,%%GLUNIX_OS%%,$(GLUNIX_OS),g' \
+@@ -111,10 +92,10 @@
+ -e 's,%%GLUNIX_GROUP%%,$(GLUNIX_GROUP),g' \
+ $^ > $@ ; chmod +x $@
+
+-MANHOME_MHTML = ../../man/mhtml
+-MANHOME_HTML = ../../man/html
+-MANHOME_NROFF = ../../man/man
+-BINHOME = ../../bin/$(GLUNIX_PLATFORM)
++MANHOME_MHTML = ../../glunix/man/mhtml
++MANHOME_HTML = ../../glunix/man/html
++MANHOME_NROFF = ../../glunix/man/man
++BINHOME = ../../glunix/bin/$(GLUNIX_PLATFORM)
+
+ ifneq ($(origin GLUNIX_DEVEL),undefined)
+
+@@ -123,8 +104,8 @@
+
+ else
+
+-GLUNIX_LIBPATH = $(INSTALL_DIR)/lib
+-GLUNIX_INCLUDEPATH = $(INSTALL_DIR)/include
++GLUNIX_LIBPATH = $(GLUNIX_SOURCE)/lib/$(GLUNIX_PLATFORM)
++GLUNIX_INCLUDEPATH = $(GLUNIX_SOURCE)/include
+
+ endif
+
+@@ -166,4 +147,4 @@
+ else
+ installman:
+ @echo No manpages to install.
+-endif
++endif
diff --git a/parallel/glunix/patches/patch-aq b/parallel/glunix/patches/patch-aq
new file mode 100644
index 00000000000..407b16ed57a
--- /dev/null
+++ b/parallel/glunix/patches/patch-aq
@@ -0,0 +1,12 @@
+$NetBSD: patch-aq,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/tools/Makefile.orig Wed Oct 29 16:11:27 1997
++++ progs/tools/Makefile Sat Feb 28 05:51:55 1998
+@@ -12,5 +12,5 @@
+ # These are things that need to be installed
+-BINS = $(TARGETS) $(SCRIPTS)
++BINS = $(TARGETS) $(SCRIPTS) gluinstall
+
+-LIBS = -lnsl
++LIBS =
+ MANPAGES = MHTML.1
diff --git a/parallel/glunix/patches/patch-ar b/parallel/glunix/patches/patch-ar
new file mode 100644
index 00000000000..2735f732255
--- /dev/null
+++ b/parallel/glunix/patches/patch-ar
@@ -0,0 +1,172 @@
+$NetBSD: patch-ar,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/tools/gluinstall.pl.orig Thu Sep 11 16:28:03 1997
++++ progs/tools/gluinstall.pl Sat May 23 14:16:26 1998
+@@ -2,3 +2,6 @@
+
+-$glunix_base = "%%GLUNIX_DIR%%/release";
++$install_man = "/usr/bin/install -c -m 644 -o glunix -g glunix ";
++$install_bin = "/usr/bin/install -c -m 755 -o glunix -g glunix ";
++$imkdir = "/usr/bin/install -d -m 755 -o glunix -g glunix";
++$glunix_base = "%%GLUNIX_BASE%%";
+ $now_base = "%%INSTALL_DIR%%";
+@@ -23,9 +26,9 @@
+
+-&my_mkdir("$now_base/bin");
+-&my_mkdir("$now_base/lib");
+-&my_mkdir("$now_base/include");
+-&my_mkdir("$now_base/man");
+-if ($http_base ne "") {
+- &my_mkdir("$http_base/man/html");
+-}
++#&my_mkdir("$now_base/bin");
++#&my_mkdir("$now_base/lib");
++#&my_mkdir("$now_base/include");
++#&my_mkdir("$now_base/man");
++#if ($http_base ne "") {
++# &my_mkdir("$http_base/man/html");
++#}
+
+@@ -50,18 +53,39 @@
+
+-@files = <$glunix_base/glunix/include/*>;
+-@files = &strip_garbage(@files);
++#@files = <$glunix_base/glunix/include/*>;
++#@files = &strip_garbage(@files);
+ #print "Found include files: ", join(" ", @dirs), "\n";
+
+-foreach $val (@files) {
+- $install_path = "$now_base/include/" . &path_tail($val);
+- print "Installing $install_path\n";
+- if ($justTesting) {
+- print "Unlinking $install_path\n";
+- print "Linking $install_path to $val\n";
+- } else {
+- unlink($install_path);
+- symlink($val, $install_path);
+- }
++#foreach $val (@files) {
++# $install_path = "$now_base/include/" . &path_tail($val);
++# print "Installing $install_path\n";
++# if ($justTesting) {
++# print "Unlinking $install_path\n";
++# print "Linking $install_path to $val\n";
++# } else {
++# unlink($install_path);
++# system("$install_man $val $install_path");
++# }
++#}
++# create necc dirs.
++system("$imkdir $now_base/include");
++system("$imkdir $now_base/lib/$glunix_arch");
++system("$imkdir $now_base/bin/$glunix_arch");
++system("$imkdir $now_base/include/glib");
++system("$imkdir $now_base/lib/perl-lib/Time");
++system("$imkdir $now_base/man");
++
++system("$install_bin $glunix_base/glunix/bin/$glunix_arch/master $now_base/bin/$glunix_arch");
++system("$install_bin $glunix_base/glunix/bin/$glunix_arch/daemon $now_base/bin/$glunix_arch");
++system("$install_man $glunix_base/glunix/include/glib/*.h $now_base/include/glib");
++system("$install_man $glunix_base/glunix/include/*.h $now_base/include");
++system("$install_man $glunix_base/progs/tools/perl-lib/Time/* $now_base/lib/perl-lib/Time");
++system("$install_man $glunix_base/progs/tools/perl-lib/*.pl $now_base/lib/perl-lib");
++system("cp -R -p $glunix_base/glunix/man/* $now_base/man");
++system("rm $now_base/man/Makefile");
++@chownme = `find $glunix_base/glunix/man -name \\*`;
++foreach (@chownme) {
++ chomp;
++ $_ =~ s+$glunix_base/glunix/man++;
++ system("chown glunix:glunix $now_base/man/$_");
+ }
+-
+ print "\n";
+@@ -74,3 +98,3 @@
+ # Find all of the man pages in the release directory
+-@dirs = <$glunix_base/man/man?>;
++@dirs = <$glunix_base/glunix/man/man?>;
+ push(@dirs, <$glunix_base/glunix/man/man?>);
+@@ -79,21 +103,22 @@
+
+-foreach $val (@dirs) {
+- @f = <$val/*.*>;
++#foreach $val (@dirs) {
++# @f = <$val/*.*>;
+ # print "Found man pages: ", join(" ", &man_pagename(@f)), "\n";
+- push(@files, @f);
+-}
++# push(@files, @f);
++#}
+
+-@files = <$glunix_base/man/man?/*.*>;
+-&install_manpages("$now_base/man/man", @files);
++#@files = <$glunix_base/man/man?/*.*>;
++#&install_manpages("$now_base/man/man", @files);
+
+-if ($http_base ne "") {
+- @files = <$glunix_base/man/html?/*.*>;
+- &install_manpages("$http_base/man/html", @files);
+-}
+-
+-print "Creating windex file (this may take a while)\n";
+-if (!$justTesting) {
+- system("/usr/bin/catman -M $now_base/man -w");
+- print "Done with catman!\n";
+-}
++#if ($http_base ne "") {
++# @files = <$glunix_base/man/html?/*.*>;
++# &install_manpages("$http_base/man/html", @files);
++#}
++
++# no windex file in bsd.
++#print "Creating windex file (this may take a while)\n";
++#if (!$justTesting) {
++# system("/usr/bin/catman -M $now_base/man -w");
++# print "Done with catman!\n";
++#}
+
+@@ -104,3 +129,3 @@
+
+-@files = <$glunix_base/lib/$glunix_arch/*>;
++@files = <$glunix_base/glunix/lib/$glunix_arch/*>;
+ @files = &strip_garbage(@files);
+@@ -115,3 +140,3 @@
+ # print "Linking $install_path to $val\n";
+- symlink($val, $install_path);
++ system("$install_man $val $install_path");
+ }
+@@ -131,9 +156,9 @@
+ foreach $val (@copy_progs) {
+- if (-e "$glunix_base/bin/$glunix_arch/$val") {
+- print "Copying $glunix_base/bin/$glunix_arch/$val to $now_base/bin/$val\n";
++ if (-e "$glunix_base/glunix/bin/$glunix_arch/$val") {
++ print "Copying $glunix_base/glunix/bin/$glunix_arch/$val to $now_base/bin/$val\n";
+ if (!$justTesting) {
+- system("/bin/cp $glunix_base/bin/$glunix_arch/$val $now_base/bin/$val");
++ system("$install_bin $glunix_base/glunix/bin/$glunix_arch/$val $now_base/bin/$val");
+ }
+ } else {
+- print "Cannot find $glunix_base/bin/$glunix_arch/$val to copy\n";
++ print "Cannot find $glunix_base/glunix/bin/$glunix_arch/$val to copy\n";
+ }
+@@ -142,3 +167,3 @@
+ # Find all of the programs in the release directory
+-@dirs = <$glunix_base/bin/*>;
++@dirs = <$glunix_base/glunix/bin/*>;
+
+@@ -181,3 +206,3 @@
+ # print "symlink(\"GLUnix-bin\", $install_path);\n";
+- symlink("GLUnix-bin", $install_path);
++ system("$install_bin $val $install_path");
+ }
+@@ -188,3 +213,5 @@
+ if (!$justTesting) {
+- chmod 06511, $val;
++# chmod 06511, $val;
++ system("chown root:glunix $now_base/bin/$val");
++ system("chmod 6511 $now_base/bin/$val");
+ }
+@@ -227,3 +254,3 @@
+ # print "symlink($val, $install_path)\n";
+- symlink($val, $install_path);
++ system("$install_man $val $install_path");
+ }
diff --git a/parallel/glunix/patches/patch-as b/parallel/glunix/patches/patch-as
new file mode 100644
index 00000000000..deccdf06f58
--- /dev/null
+++ b/parallel/glunix/patches/patch-as
@@ -0,0 +1,9 @@
+$NetBSD: patch-as,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/examples/Makefile~ Wed Nov 5 13:43:42 1997
++++ progs/examples/Makefile Sat Feb 28 07:21:19 1998
+@@ -10,3 +10,3 @@
+
+-LIBS = -lnsl -lglunix -lsocket
++LIBS = -lglunix
+ MANPAGES =
diff --git a/parallel/glunix/patches/patch-at b/parallel/glunix/patches/patch-at
new file mode 100644
index 00000000000..35a9dd87f49
--- /dev/null
+++ b/parallel/glunix/patches/patch-at
@@ -0,0 +1,9 @@
+$NetBSD: patch-at,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/gluadmin/Makefile~ Fri Dec 6 17:19:00 1996
++++ progs/gluadmin/Makefile Sat Feb 28 07:21:31 1998
+@@ -2,3 +2,3 @@
+ SRCS = gluadmin.c
+-LIBS = -lglunix -lsocket -lnsl
++LIBS = -lglunix
+
diff --git a/parallel/glunix/patches/patch-au b/parallel/glunix/patches/patch-au
new file mode 100644
index 00000000000..49ebb724d30
--- /dev/null
+++ b/parallel/glunix/patches/patch-au
@@ -0,0 +1,12 @@
+$NetBSD: patch-au,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/gludebug/Makefile.orig Fri Dec 6 17:19:06 1996
++++ progs/gludebug/Makefile Thu Mar 12 01:13:22 1998
+@@ -16,5 +16,5 @@
+ SRCS = gludebug.c
+-LIBS = -lglunix -lsocket -lnsl
++LIBS = -lglunix
+
+-BINS = $(TARGET) $(TARGET2)
++BINS = $(TARGET) #$(TARGET2)
+ MANPAGES = $(addsuffix .1,$(BINS))
diff --git a/parallel/glunix/patches/patch-av b/parallel/glunix/patches/patch-av
new file mode 100644
index 00000000000..5398978d17a
--- /dev/null
+++ b/parallel/glunix/patches/patch-av
@@ -0,0 +1,9 @@
+$NetBSD: patch-av,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glukill/Makefile~ Fri Dec 6 17:19:09 1996
++++ progs/glukill/Makefile Sat Feb 28 07:21:57 1998
+@@ -2,3 +2,3 @@
+ SRCS = glukill.c
+-LIBS = -lglunix -lsocket -lnsl
++LIBS = -lglunix
+
diff --git a/parallel/glunix/patches/patch-aw b/parallel/glunix/patches/patch-aw
new file mode 100644
index 00000000000..a72a590021f
--- /dev/null
+++ b/parallel/glunix/patches/patch-aw
@@ -0,0 +1,9 @@
+$NetBSD: patch-aw,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glups/Makefile~ Fri Dec 6 17:19:18 1996
++++ progs/glups/Makefile Sat Feb 28 07:24:39 1998
+@@ -2,3 +2,3 @@
+ SRCS = glups.c
+-LIBS = -lglunix -lsocket -lnsl
++LIBS = -lglunix
+
diff --git a/parallel/glunix/patches/patch-ax b/parallel/glunix/patches/patch-ax
new file mode 100644
index 00000000000..4aba7bd1ba9
--- /dev/null
+++ b/parallel/glunix/patches/patch-ax
@@ -0,0 +1,9 @@
+$NetBSD: patch-ax,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/gluptime/Makefile~ Fri Dec 6 17:19:21 1996
++++ progs/gluptime/Makefile Sat Feb 28 07:24:51 1998
+@@ -2,3 +2,3 @@
+ SRCS = gluptime.c
+-LIBS = -lglunix -lsocket -lnsl
++LIBS = -lglunix
+
diff --git a/parallel/glunix/patches/patch-ay b/parallel/glunix/patches/patch-ay
new file mode 100644
index 00000000000..f3747cc9198
--- /dev/null
+++ b/parallel/glunix/patches/patch-ay
@@ -0,0 +1,9 @@
+$NetBSD: patch-ay,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glurun/Makefile~ Fri Dec 6 17:19:24 1996
++++ progs/glurun/Makefile Sat Feb 28 07:26:45 1998
+@@ -2,3 +2,3 @@
+ SRCS = glurun.c
+-LIBS = -lglunix -lsocket -lnsl
++LIBS = -lglunix
+
diff --git a/parallel/glunix/patches/patch-az b/parallel/glunix/patches/patch-az
new file mode 100644
index 00000000000..db177e5aed9
--- /dev/null
+++ b/parallel/glunix/patches/patch-az
@@ -0,0 +1,9 @@
+$NetBSD: patch-az,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glustat/Makefile~ Sun Dec 1 16:23:04 1996
++++ progs/glustat/Makefile Sat Feb 28 07:27:52 1998
+@@ -2,3 +2,3 @@
+ SRCS = glustat.c
+-LIBS = -lglunix -lsocket -lnsl
++LIBS = -lglunix
+
diff --git a/parallel/glunix/patches/patch-ba b/parallel/glunix/patches/patch-ba
new file mode 100644
index 00000000000..13729d85f09
--- /dev/null
+++ b/parallel/glunix/patches/patch-ba
@@ -0,0 +1,9 @@
+$NetBSD: patch-ba,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/ms/Makefile~ Wed Nov 5 13:44:23 1997
++++ progs/ms/Makefile Sat Feb 28 07:30:02 1998
+@@ -57,3 +57,3 @@
+ LDDIRS = -L/usr/sww/X11/lib -R/usr/sww/X11/lib $(LLIBPATH) $(RLIBPATH)
+-LDFLAGS = $(LDDIRS) -lglunix-lsocket -lnsl -lm
++LDFLAGS = $(LDDIRS) -lglunix -lm
+
diff --git a/parallel/glunix/patches/patch-bb b/parallel/glunix/patches/patch-bb
new file mode 100644
index 00000000000..e14207bf678
--- /dev/null
+++ b/parallel/glunix/patches/patch-bb
@@ -0,0 +1,9 @@
+$NetBSD: patch-bb,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/gluperf/Makefile~ Thu Sep 11 13:50:55 1997
++++ progs/gluperf/Makefile Sat Feb 28 07:24:26 1998
+@@ -2,3 +2,3 @@
+ SRCS = gluperf.c
+-LIBS = -lm -lglunix -lsocket -lnsl
++LIBS = -lm -lglunix
+
diff --git a/parallel/glunix/patches/patch-bc b/parallel/glunix/patches/patch-bc
new file mode 100644
index 00000000000..b69367cae94
--- /dev/null
+++ b/parallel/glunix/patches/patch-bc
@@ -0,0 +1,98 @@
+$NetBSD: patch-bc,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glumake/Makefile.orig Wed Nov 5 13:43:50 1997
++++ progs/glumake/Makefile Mon Oct 12 22:05:32 1998
+@@ -27,26 +27,17 @@
+ #
+ # Configure the GLUnix modifications here
+ #
++# for netbsd below. do *not* run configure in here.. it will make a mess
++
++GLUNIX_ARCH= $(ARCH)
++GLUNIX_OS= $(OPSYS)
++GLUNIX_NET:=tcp
++INSTALL := /usr/bin/install
+
+-ifeq ($(GLUNIX_ARCH),)
+-GLUNIX_ARCH = sun4
+-endif
+-ifeq ($(GLUNIX_ARCH),sun4)
+- GLUNIX_OS = solaris2.4
+- GLUNIX_NET = tcp
+- # Generic install program.
+- INSTALL = /usr/sww/bin/ginstall -c
+-endif
+-ifeq ($(GLUNIX_ARCH),i386)
+- GLUNIX_OS = solaris2.6
+- GLUNIX_NET = tcp
+- # Generic install program.
+- INSTALL = /usr/now/bin/install -c
+-endif
+ GLUNIX_PLATFORM = $(GLUNIX_ARCH)-$(GLUNIX_OS)-$(GLUNIX_NET)
+
+-GLUNIX_DEVEL_BASE = /disks/barad-dur/now/glunix/devel
+-GLUNIX_BASE = /usr/now
++GLUNIX_DEVEL_BASE = $(WRKDIR)
++#GLUNIX_BASE = $(NOW_ROOT)
+
+ ############################################################################
+
+@@ -56,7 +47,7 @@
+
+ CC = gcc
+
+-CFLAGS = -g -O -I$(GLUNIX_BASE)/include
++CFLAGS = -g -O2 -I$(GLUNIX_DEVEL_BASE)/glunix/include
+ CPPFLAGS =
+ LDFLAGS =
+
+@@ -70,6 +61,7 @@
+ # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
+ # See also `config.h'.
+ defines = -DHAVE_CONFIG_H -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
++defines += -DHAVE_SYS_SIGLIST
+
+ # Which flavor of remote job execution support to use.
+ # The code is found in `remote-$(REMOTE).c'.
+@@ -97,16 +89,16 @@
+ # libPW.a is broken on HP9000s300 and HP9000s400 machines. Use
+ # alloca.c instead on those machines.
+ ifneq ($(origin GLUNIX_DEVEL),undefined)
+-LOADLIBES = -lelf -lkvm -R$(GLUNIX_DEVEL_BASE)/$(USER)/lib/$(GLUNIX_PLATFORM) -lglunix -L$(GLUNIX_DEVEL_BASE)/$(USER)/lib/$(GLUNIX_PLATFORM) -lsocket -lnsl
++LOADLIBES = -lkvm -R$(GLUNIX_DEVEL_BASE)/$(USER)/lib/$(GLUNIX_PLATFORM) -lglunix -L$(GLUNIX_DEVEL_BASE)/$(USER)/lib/$(GLUNIX_PLATFORM)
+ else
+-LOADLIBES = -lelf -lkvm -R$(GLUNIX_BASE)/lib -lglunix -L$(GLUNIX_BASE)/lib -lsocket -lnsl
++LOADLIBES = -lkvm -R$(GLUNIX_DEVEL_BASE)/glunix/lib/$(GLUNIX_PLATFORM) -lglunix -L$(GLUNIX_DEVEL_BASE)/glunix/lib/$(GLUNIX_PLATFORM)
+ endif
+
+ # Any extra object files your system needs.
+ extras = getloadavg.o
+
+ # Common prefix for machine-independent installed files.
+-prefix = ../..
++prefix = ../../glunix
+ # Common prefix for machine-dependent installed files.
+ exec_prefix = ${prefix}
+
+@@ -138,7 +130,7 @@
+ # Program to install `glumake'.
+ INSTALL_PROGRAM = ${INSTALL}
+ # Program to install the man page.
+-INSTALL_DATA = ${INSTALL} -m 644
++INSTALL_DATA = ${INSTALL} -c -m 644
+
+ # Program to format Texinfo source into Info files.
+ MAKEINFO = makeinfo
+@@ -259,9 +251,9 @@
+
+ installman $(mandir)/$(manprefix)make.$(manext):
+ if test -x $(GLUNIX_BASE)/bin/mhtml2html; then \
+- $(INSTALL) -m 0775 $(srcdir)/glumake.1 $(mandir)/$(manprefix)make.$(manext); \
+- $(GLUNIX_BASE)/bin/mhtml2html nroff <$(srcdir)/glumake.1 >../../man/man1/glumake.1; \
+- $(GLUNIX_BASE)/bin/mhtml2html html <$(srcdir)/glumake.1 >../../man/html1/glumake.html; \
++ $(INSTALL_DATA) $(srcdir)/glumake.1 $(mandir)/$(manprefix)make.$(manext); \
++ $(GLUNIX_BASE)/bin/mhtml2html nroff <$(srcdir)/glumake.1 >../../glunix/man/man1/glumake.1; \
++ $(GLUNIX_BASE)/bin/mhtml2html html <$(srcdir)/glumake.1 >../../glunix/man/html1/glumake.html; \
+ fi
+
+ loadavg: loadavg.c config.h
diff --git a/parallel/glunix/patches/patch-bd b/parallel/glunix/patches/patch-bd
new file mode 100644
index 00000000000..dc5fd9f5e06
--- /dev/null
+++ b/parallel/glunix/patches/patch-bd
@@ -0,0 +1,11 @@
+$NetBSD: patch-bd,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glumake/signame.c~ Fri Aug 2 12:06:04 1996
++++ progs/glumake/signame.c Mon Mar 2 07:37:03 1998
+@@ -58,6 +58,2 @@
+
+-#ifndef SYS_SIGLIST_DECLARED
+-extern char *sys_siglist[];
+-#endif /* Not SYS_SIGLIST_DECLARED. */
+-
+ #endif /* Not HAVE_SYS_SIGLIST. */
diff --git a/parallel/glunix/patches/patch-be b/parallel/glunix/patches/patch-be
new file mode 100644
index 00000000000..4a589e92790
--- /dev/null
+++ b/parallel/glunix/patches/patch-be
@@ -0,0 +1,13 @@
+$NetBSD: patch-be,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glumake/make.h~ Fri Aug 2 12:05:32 1996
++++ progs/glumake/make.h Mon Mar 2 07:44:05 1998
+@@ -88,7 +88,3 @@
+
+-#ifdef HAVE_SYS_SIGLIST
+-#ifndef SYS_SIGLIST_DECLARED
+-extern char *sys_siglist[];
+-#endif
+-#else
++#ifndef HAVE_SYS_SIGLIST
+ #include "signame.h"
diff --git a/parallel/glunix/patches/patch-bf b/parallel/glunix/patches/patch-bf
new file mode 100644
index 00000000000..c4f1778b0e8
--- /dev/null
+++ b/parallel/glunix/patches/patch-bf
@@ -0,0 +1,856 @@
+$NetBSD: patch-bf,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glush/Makefile.ror Wed May 27 11:19:41 1998
++++ progs/glush/Makefile Wed May 27 11:20:21 1998
+@@ -1,8 +1,15 @@
+ # Makefile generated by imake - do not edit!
+-# $XConsortium: imake.c,v 1.91 95/01/12 16:15:47 kaleb Exp $
++# $TOG: imake.c /main/97 1997/06/20 20:23:51 kaleb $
+
+ # ----------------------------------------------------------------------
+-# Makefile generated from "Imake.tmpl" and </tmp/IIf.a005Oj>
+-# $XConsortium: Imake.tmpl,v 1.224 94/12/27 03:57:50 gildea Exp $
++# Makefile generated from "Imake.tmpl" and </tmp/IIf.07781a>
++# $TOG: Imake.tmpl /main/245 1997/05/20 10:05:47 kaleb $
+ #
++#
++#
++#
++# $XFree86: xc/config/cf/Imake.tmpl,v 3.32.2.5 1997/07/06 07:27:59 dawes Exp $
++# ----------------------------------------------------------------------
++
++all::
+
+@@ -10,3 +17,4 @@
+
+-# $XConsortium: Imake.cf,v 1.19 95/01/05 19:24:32 kaleb Exp $
++# $TOG: Imake.cf /main/28 1997/06/25 08:31:36 barstow $
++# $XFree86: xc/config/cf/Imake.cf,v 3.34.2.3 1997/07/27 02:41:02 dawes Exp $
+
+@@ -16,16 +24,90 @@
+
+-# site: $XConsortium: site.sample,v 1.9 94/04/08 17:02:06 rws Exp $
++# site: $XConsortium: site.def /main/revisionist/4 1996/12/31 08:02:07 kaleb $
++# site: $XFree86: xc/config/cf/site.def,v 3.17.2.1 1997/06/22 10:32:21 dawes Exp $
+
+-# -----------------------------------------------------------------------
+-# platform-specific configuration parameters - edit sun.cf to change
++# $XFree86: xc/config/cf/xf86site.def,v 3.101.2.11 1997/06/22 10:32:22 dawes Exp $
++
++# ----------------------------------------------------------------------
++# platform-specific configuration parameters - edit NetBSD.cf to change
+
+-# platform: $XConsortium: sun.cf,v 1.139 95/01/12 15:30:26 kaleb Exp $
++# platform: $XConsortium: NetBSD.cf /main/16 1996/10/31 14:47:14 kaleb $
+
+-# operating system: SunOS 5.4
++# platform: $XFree86: xc/config/cf/NetBSD.cf,v 3.49.2.9 1997/07/26 06:30:39 dawes Exp $
+
+-# $XConsortium: svr4.cf,v 1.11 95/01/25 16:32:39 kaleb Exp $
++#
++# This file currently contains support for:
++#
++# NetBSD/i386 client/server
++# NetBSD/sparc client/server
++# NetBSD/sun3 client/server
++# NetBSD/hp300 client
++# NetBSD/mac68k client/server
++# NetBSD/pmax client
++# NetBSD/amiga client/server
++# NetBSD/alpha client/server
++# NetBSD/arm32 client
++#
+
+-# $XConsortium: sv4Lib.rules,v 1.14 94/04/09 12:00:10 rws Exp $
++# operating system: NetBSD 1.3 (1.3.0)
+
+-# -----------------------------------------------------------------------
++# Man pages need to be formatted when installed, so override the default
++# imake rules.
++
++# $XConsortium: bsdLib.rules /main/3 1996/09/28 16:09:18 rws $
++
++# $XFree86: xc/config/cf/bsdLib.rules,v 3.4.2.1 1997/05/11 05:04:04 dawes Exp $
++
++# $XFree86: xc/config/cf/xfree86.cf,v 3.129.2.14 1997/07/06 07:28:00 dawes Exp $
++
++# $XConsortium: xfree86.cf /main/34 1996/12/06 11:45:18 rws $
++
++LINKKITDIR = $(USRLIBDIR)/Server
++XF98LINKKITDIR = $(USRLIBDIR)/Server
++
++ XF86SRC = $(SERVERSRC)/hw/xfree86
++ XF86ACCELSRC = $(XF86SRC)/accel
++ XF86COMSRC = $(XF86SRC)/common
++ XF86CONFIGSRC = $(XF86COMSRC)
++ XF86HWSRC = $(XF86SRC)/common_hw
++ XF86OSSRC = $(XF86SRC)/os-support
++ VGADRIVERSRC = $(XF86SRC)/vga256/drivers
++VGA16DRIVERSRC = $(XF86SRC)/vga16/drivers
++ VGA2DRIVERSRC = $(XF86SRC)/vga2/drivers
++ MONODRIVERSRC = $(XF86SRC)/mono/drivers
++ S3DRIVERSRC = $(XF86SRC)/accel/s3/drivers
++ S3VDRIVERSRC = $(XF86SRC)/accel/s3_virge/drivers
++
++ XF68SRC = $(SERVERSRC)/hw/xfree68
++ XF68COMSRC = $(XF68SRC)/common
++ XF68CONFIGSRC = $(XF68COMSRC)
++ XF68OSSRC = $(XF68SRC)/os-support
++
++ XF98SRC = $(SERVERSRC)/hw/xfree98
++ XF98ACCELSRC = $(XF98SRC)/accel
++ XF98COMSRC = $(XF98SRC)/common
++ XF98CONFIGSRC = $(XF98COMSRC)
++ XF98HWSRC = $(XF98SRC)/common_hw/generic
++ XF98HWNECSRC = $(XF98SRC)/common_hw/nec
++ XF98HWPWSKBSRC = $(XF98SRC)/common_hw/pwskb
++ XF98HWPWLBSRC = $(XF98SRC)/common_hw/pwlb
++ XF98HWGA968SRC = $(XF98SRC)/common_hw/ga968
++ XF98OSSRC = $(XF98SRC)/os-support
++ XF98VGADRIVERSRC = $(XF98SRC)/vga256/drivers
++XF98VGA16DRIVERSRC = $(XF98SRC)/vga16/drivers
++ XF98VGA2DRIVERSRC = $(XF98SRC)/vga2/drivers
++ XF98MONODRIVERSRC = $(XF98SRC)/mono/drivers
++XF98NECS3DRIVERSRC = $(XF98SRC)/accel/s3nec/drivers
++XF98PWSKBDRIVERSRC = $(XF98SRC)/accel/s3pwskb/drivers
++ XF98PWLBDRIVERSRC = $(XF98SRC)/accel/s3pwlb/drivers
++XF98GA968DRIVERSRC = $(XF98SRC)/accel/s3ga968/drivers
++
++ XFREE86DOCDIR = $(LIBDIR)/doc
++ XFREE86PSDOCDIR = $(XFREE86DOCDIR)/PostScript
++ XFREE86HTMLDOCDIR = $(XFREE86DOCDIR)/html
++XFREE86JAPANESEDOCDIR = $(XFREE86DOCDIR)/Japanese
++
++# $XConsortium: xf86.rules /main/9 1996/10/31 14:54:26 kaleb $
++# $XFree86: xc/config/cf/xf86.rules,v 3.16.2.1 1997/05/18 12:00:01 dawes Exp $
++
++# ----------------------------------------------------------------------
+ # site-specific configuration parameters that go after
+@@ -33,7 +115,19 @@
+
+-# site: $XConsortium: site.sample,v 1.9 94/04/08 17:02:06 rws Exp $
++# site: $XConsortium: site.def /main/revisionist/4 1996/12/31 08:02:07 kaleb $
++# site: $XFree86: xc/config/cf/site.def,v 3.17.2.1 1997/06/22 10:32:21 dawes Exp $
+
+-# -----------------------------------------------------------------------
++# ---------------------------------------------------------------------
+ # Imake rules for building libraries, programs, scripts, and data files
+-# rules: $XConsortium: Imake.rules,v 1.197 94/12/05 19:30:41 gildea Exp $
++# rules: $TOG: Imake.rules /main/222 1997/07/17 20:04:40 kaleb $
++# rules: $XFree86: xc/config/cf/Imake.rules,v 3.33.2.5 1997/07/19 04:59:07 dawes Exp $
++
++ _NULLCMD_ = @ echo -n
++
++TKLIBNAME =
++
++TKLIBDIR =
++
++TCLLIBNAME =
++
++TCLIBDIR =
+
+@@ -46,39 +140,38 @@
+ IMAKE = imake
+- DEPEND = makedepend
+- MKDIRHIER = mkdirhier
++ DEPEND = gccmakedep
++ MKDIRHIER = mkdir -p
++ EXPORTLISTGEN =
+ CONFIGSRC = $(TOP)/config
+ IMAKESRC = $(CONFIGSRC)/imake
+- DEPENDSRC = $(CONFIGSRC)/makedepend
+- IXXSRC = $(UNSUPPORTEDSRC)/programs/ixx
+- IXX = ixx
+- IXXFLAGS = -s BaseObject -m TypeObj -r RequestObj -p Xf
+- IXXINCLUDES = -i '<X11/Fresco/enter-scope.h>'
+-
+- INCROOT = /usr/sww/X11R6/include
+- USRLIBDIR = /usr/sww/X11R6/lib
+- SHLIBDIR = /usr/sww/X11R6/lib
++ DEPENDSRC = $(CONFIGSRC)/util
++
++ INCROOT = /usr/X11R6/include
++ USRLIBDIR = /usr/X11R6/lib
++ VARLIBDIR = /var/lib
++ SHLIBDIR = /usr/X11R6/lib
+ LINTLIBDIR = $(USRLIBDIR)/lint
+- MANPATH = /usr/sww/X11R6/man
+- MANHOME = ../../man/mhtml1
+- MANSOURCEPATH = $(MANPATH)/man
+- MANDIR = $(MANSOURCEPATH)1
+- LIBMANDIR = $(MANSOURCEPATH)3
++ MANPATH = /usr/X11R6/man
++ MANSOURCEPATH = $(MANPATH)/cat
++ MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
++ LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
+ FILEMANDIR = $(MANSOURCEPATH)$(FILEMANSUFFIX)
+
+- AR = /usr/ccs/bin/ar cq
+- BOOTSTRAPCFLAGS = -DSVR4
++ AR = ar clq
++ BOOTSTRAPCFLAGS =
+ CC = gcc
+- AS = /usr/ccs/bin/as
++ AS = as
+
+-.SUFFIXES: .cxx
++.SUFFIXES: .cc
+
+ CXX = g++
+- CXXDEBUGFLAGS = -g
++ CXXFILT = c++filt
++ CXXLIB =
++ CXXDEBUGFLAGS = -O2 -fno-strength-reduce
++CXXDEPENDINCLUDES =
+ CXXEXTRA_DEFINES =
+ CXXEXTRA_INCLUDES =
+- CXXIDL_INCLUDES = -I$(TOP)/include
+- CXXSTD_DEFINES = -Dsun -DSVR4 -D__sparc
++ CXXSTD_DEFINES = -DCSRG_BASED $(CXXPROJECT_DEFINES)
+ CXXOPTIONS =
+- CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) $(CXXIDL_INCLUDES)
+- CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES)
++ CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
++ CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
+ CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
+@@ -86,27 +179,35 @@
+ COMPRESS = compress
+- CPP = /usr/ccs/lib/cpp $(STD_CPP_DEFINES)
+- PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
+- INSTALL = bsdinst
++ GZIPCMD = gzip
++ CPP = /usr/libexec/cpp $(STD_CPP_DEFINES)
++ PREPROCESSCMD = /usr/libexec/cpp $(STD_CPP_DEFINES)
++ INSTALL = install
+ INSTALLFLAGS = -c
+- LD = /usr/ccs/bin/ld
+- LEX = /usr/ccs/bin/lex
++ LD = ld
++ LEX = lex -l
+ LEXLIB = -ll
+- YACC = /usr/ccs/bin/yacc
+- CCYACC = /usr/ccs/bin/yacc
++ YACC = yacc
++ CCYACC = yacc
+ LINT = lint
+- LINTLIBFLAG = -o
+- LINTOPTS = -bh
++ LINTLIBFLAG = -C
++ LINTOPTS = -axz
+ LN = ln -s
+- MAKE = /usr/ccs/bin/make
+- MV = mv
++ MAKE = make
++ MV = mv -f
+ CP = cp
+
++ RANLIB = ranlib
++ RANLIBINSTFLAGS =
++
+ RM = rm -f
+- MANSUFFIX = 1x
+- LIBMANSUFFIX = 3x
+- FILEMANSUFFIX = 4
+- TROFF = psroff
++ MANSUFFIX = 1
++ LIBMANSUFFIX = 3
++ FILEMANSUFFIX = 5
++ TROFF = groff -Tps
++ NROFF = nroff -Tlatin1
+ MSMACROS = -ms
++ MANMACROS = -man
+ TBL = tbl
+- EQN = eqn
++ EQN = eqn -Tps
++ NEQN = neqn -Tlatin1
++ COL = col
+
+@@ -116,20 +217,17 @@
+ STD_INCLUDES =
+- STD_CPP_DEFINES = -Dsun -DSVR4 -D__sparc
+- STD_DEFINES = -Dsun -DSVR4 -D__sparc
++ STD_CPP_DEFINES = -traditional $(PROJECT_DEFINES)
++ STD_DEFINES = -DCSRG_BASED $(PROJECT_DEFINES)
+ EXTRA_LOAD_FLAGS =
+-# If the GLUNIX_DEVEL is set
+-ifneq ($(origin GLUNIX_DEVEL),undefined)
+- EXTRA_LDOPTIONS = -g -L/disks/barad-dur/now/glunix/devel/$(USER)/lib/sun4-solaris2.4-tcp -R/disks/barad-dur/now/glunix/devel/$(USER)/lib/sun4-solaris2.4-tcp
+-else
+- EXTRA_LDOPTIONS = -g -L/usr/now/lib -R/usr/now/lib
+-endif
+- EXTRA_LIBRARIES = -lsocket -lnsl -lgen
++ EXTRA_LDOPTIONS =
++ EXTRA_LIBRARIES = -lgnumalloc
+ TAGS = ctags
+
++ PARALLELMFLAGS =
++
+ SHAREDCODEDEF =
+- SHLIBDEF =
++ SHLIBDEF = -DBSDSHLIB
+
+- SHLIBLDFLAGS = -G -z text
++ SHLIBLDFLAGS = -Bshareable
+
+- PICFLAGS = -Kpic
++ PICFLAGS = -fpic
+
+@@ -137,26 +235,18 @@
+
+- PROTO_DEFINES =
++ PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO
++
++ INSTPGMFLAGS = -s -m 0555 -o bin -g bin
+
+- INSTPGMFLAGS =
++ INSTBINFLAGS = -m 0555 -o bin -g bin
++ INSTUIDFLAGS = -m 4511 -o root -g bin
++ INSTLIBFLAGS = -m 0444 -o bin -g bin
++ INSTINCFLAGS = -m 0444 -o bin -g bin
++ INSTMANFLAGS = -m 0444 -o bin -g bin
++ INSTDATFLAGS = -m 0444 -o bin -g bin
++ INSTKMEMFLAGS = -m 2555 -o bin -g kmem
+
+- INSTBINFLAGS = -m 0755
+- INSTUIDFLAGS = -m 4755
+- INSTLIBFLAGS = -m 0644
+- INSTINCFLAGS = -m 0444
+- INSTMANFLAGS = -m 0444
+- INSTDATFLAGS = -m 0444
+- INSTKMEMFLAGS = -g sys -m 2755
+-
+- PROJECTROOT = /usr/sww/X11R6
+-
+- TOP_INCLUDES = -i$(INCROOT)
+-# If the GLUNIX_DEVEL is set
+-ifneq ($(origin GLUNIX_DEVEL),undefined)
+- TOP_INCLUDES += -I/disks/barad-dur/now/glunix/devel/$(USER)/glunix/include
+-else
+- TOP_INCLUDES += -I/usr/now/include
+-endif
++ PROJECTROOT = /usr/X11R6
+
+- CDEBUGFLAGS = -O
+- CCOPTIONS = -L$(USRLIBDIR) -R$(USRLIBDIR)/sww.r6:$(PROJECTROOT)/motif/lib:$(USRLIBDIR):/usr/lib
++ CDEBUGFLAGS = -O2 -fno-strength-reduce
++ CCOPTIONS =
+
+@@ -164,3 +254,3 @@
+ ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
+- CFLAGS = -g $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
++ CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
+ LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
+@@ -168,18 +258,26 @@
+ LDPOSTLIB =
+- LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIB)
+- CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIB)
++ LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
++ CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
+
+- LDLIBS = $(LDPOSTLIB) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
++ LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
+
+- CCENVSETUP = LD_RUN_PATH=$(USRLIBDIR)
+- CCLINK = $(CCENVSETUP) $(CC)
++ CCLINK = $(CC)
+
+- CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIR)
+- CXXLINK = $(CXXENVSETUP) $(CXX)
++ CXXLINK = $(CXX)
+
+ LDSTRIPFLAGS = -x
+- LDCOMBINEFLAGS = -r
++ LDCOMBINEFLAGS = -X -r
+ DEPENDFLAGS =
+
+- MACROFILE = sun.cf
++# Not sure this belongs here
++ TKLIBDIR =
++ TKINCDIR =
++ TKLIBNAME =
++ TKLIBRARY = -L$(TKLIBDIR) -l$(TKLIBNAME)
++ TCLLIBDIR =
++ TCLINCDIR =
++ TCLLIBNAME =
++ TCLLIBRARY = -L$(TCLLIBDIR) -l$(TCLLIBNAME)
++
++ MACROFILE = NetBSD.cf
+ RM_CMD = $(RM)
+@@ -191,5 +289,5 @@
+
+- ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Project.tmpl \
+- $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
+- $(EXTRA_ICONFIGFILES)
++ ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xf86site.def $(IRULESRC)/host.def $(EXTRA_ICONFIGFILES)
++
++# $TOG: X11.rules /main/4 1997/04/30 15:23:24 kaleb $
+
+@@ -197,3 +295,8 @@
+ # X Window System Build Parameters and Rules
+-# $XConsortium: Project.tmpl,v 1.248 95/01/06 19:12:51 gildea Exp $
++# $TOG: X11.tmpl /main/292 1997/05/20 10:05:59 kaleb $
++#
++#
++#
++#
++# $XFree86: xc/config/cf/X11.tmpl,v 1.8.2.3 1997/05/21 15:02:13 dawes Exp $
+
+@@ -202,11 +305,19 @@
+
+- BINDIR = /usr/sww/X11R6/bin
+- BUILDINCROOT = $(TOP)
+- BUILDINCDIR = $(BUILDINCROOT)/X11
+- BUILDINCTOP = ..
+- BUILDLIBDIR = $(TOP)/usrlib
+- BUILDLIBTOP = ..
+- INCDIR = $(INCROOT)/X11
+- ADMDIR = /usr/adm
++ XTOP = $(TOP)
++ BINDIR = /usr/X11R6/bin
++ BUILDINCROOT = $(TOP)/exports
++ BUILDINCDIR = $(BUILDINCROOT)/include
++ BUILDINCTOP = ../..
++ BUILDLIBDIR = $(TOP)/exports/lib
++ BUILDLIBTOP = ../..
++ BUILDBINDIR = $(TOP)/exports/bin
++ BUILDBINTOP = ../..
++ XBUILDINCROOT = $(XTOP)/exports
++ XBUILDINCDIR = $(XBUILDINCROOT)/include/X11
++ XBUILDINCTOP = ../../..
++ XBUILDBINDIR = $(XBUILDINCROOT)/bin
++ INCDIR = $(INCROOT)
++ ADMDIR = /var/log
+ LIBDIR = $(USRLIBDIR)/X11
++ TOP_X_INCLUDES = -I. -I../../glunix/include
+
+@@ -215,2 +326,3 @@
+ XDMDIR = $(LIBDIR)/xdm
++ XDMVARDIR = $(VARLIBDIR)/xdm
+ TWMDIR = $(LIBDIR)/twm
+@@ -220,2 +332,5 @@
+ PEXAPIDIR = $(LIBDIR)/PEX
++ LBXPROXYDIR = $(LIBDIR)/lbxproxy
++ PROXYMANAGERDIR = $(LIBDIR)/proxymngr
++ XPRINTDIR = $(LIBDIR)
+ XAPPLOADDIR = $(LIBDIR)/app-defaults
+@@ -229,3 +344,5 @@
+
+- DOCUTILSRC = $(TOP)/doc/util
++ DOCUTILSRC = $(XTOP)/doc/util
++ CLIENTSRC = $(TOP)/clients
++ DEMOSRC = $(TOP)/demos
+ XDOCMACROS = $(DOCUTILSRC)/macros.t
+@@ -233,10 +350,11 @@
+ PROGRAMSRC = $(TOP)/programs
+- LIBSRC = $(TOP)/lib
+- FONTSRC = $(TOP)/fonts
+- INCLUDESRC = $(TOP)/X11
+- SERVERSRC = $(TOP)/programs/Xserver
+- CONTRIBSRC = $(TOP)/../contrib
+- UNSUPPORTEDSRC = $(TOP)/unsupported
+- DOCSRC = $(TOP)/doc
+- RGBSRC = $(TOP)/programs/rgb
++ LIBSRC = $(XTOP)/lib
++ FONTSRC = $(XTOP)/fonts
++ INCLUDESRC = $(BUILDINCROOT)/include
++ XINCLUDESRC = $(INCLUDESRC)/X11
++ SERVERSRC = $(XTOP)/programs/Xserver
++ CONTRIBSRC = $(XTOP)/../contrib
++ UNSUPPORTEDSRC = $(XTOP)/unsupported
++ DOCSRC = $(XTOP)/doc
++ RGBSRC = $(XTOP)/programs/rgb
+ BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf
+@@ -244,4 +362,4 @@
+ FONTSERVERSRC = $(PROGRAMSRC)/xfs
+- FONTINCSRC = $(TOP)/include/fonts
+- EXTINCSRC = $(TOP)/include/extensions
++ FONTINCSRC = $(XTOP)/include/fonts
++ EXTINCSRC = $(XTOP)/include/extensions
+ TRANSCOMMSRC = $(LIBSRC)/xtrans
+@@ -249,7 +367,7 @@
+
+-# $XConsortium: sunLib.tmpl,v 1.36 94/04/08 19:13:50 rws Exp $
+-
+-# $XConsortium: sv4Lib.tmpl,v 1.19 93/12/03 10:48:36 kaleb Exp $
++ XENVLIBDIR = $(USRLIBDIR)
++ CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR)
+
+-XMULIBONLY = -lXmu
++# $XConsortium: bsdLib.tmpl /main/3 1996/09/28 16:09:25 rws $
++# $XFree86: xc/config/cf/bsdLib.tmpl,v 3.3.2.1 1997/07/27 02:41:03 dawes Exp $
+
+@@ -257,3 +375,3 @@
+
+-SOXLIBREV = 6.0
++SOXLIBREV = 6.1
+ DEPXONLYLIB =
+@@ -267,3 +385,3 @@
+
+-SOXEXTREV = 6.0
++SOXEXTREV = 6.3
+ DEPEXTENSIONLIB =
+@@ -278,2 +396,37 @@
+
++ XSSLIBSRC = $(LIBSRC)/Xss
++
++DEPXSSLIB = $(USRLIBDIR)/libXss.a
++XSSLIB = -lXss
++
++LINTXSS = $(LINTLIBDIR)/llib-lXss.ln
++
++ XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc
++
++DEPXXF86MISCLIB = $(USRLIBDIR)/libXxf86misc.a
++XXF86MISCLIB = -lXxf86misc
++
++LINTXXF86MISC = $(LINTLIBDIR)/llib-lXxf86misc.ln
++
++ XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm
++
++DEPXXF86VMLIB = $(USRLIBDIR)/libXxf86vm.a
++XXF86VMLIB = -lXxf86vm
++
++LINTXXF86VM = $(LINTLIBDIR)/llib-lXxf86vm.ln
++
++ XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga
++
++DEPXXF86DGALIB = $(USRLIBDIR)/libXxf86dga.a
++XXF86DGALIB = -lXxf86dga
++
++LINTXXF86DGA = $(LINTLIBDIR)/llib-lXxf86dga.ln
++
++ XDPMSLIBSRC = $(LIBSRC)/Xdpms
++
++DEPXDPMSLIB = $(USRLIBDIR)/libXdpms.a
++XDPMSLIB = -lXdpms
++
++LINTXDPMS = $(LINTLIBDIR)/llib-lXdpms.ln
++
+ XAUTHSRC = $(LIBSRC)/Xau
+@@ -296,3 +449,3 @@
+ DEPXMULIB =
+-XMULIB = -lXmu
++XMULIB = -lXmu $(LDPRELIBS) $(XTOOLONLYLIB) $(XONLYLIB)
+
+@@ -308,2 +461,10 @@
+
++ XPLIBSRC = $(LIBSRC)/Xp
++
++SOXPREV = 6.2
++DEPXPLIB =
++XPLIB = -lXp
++
++LINTXP = $(LINTLIBDIR)/llib-lXp.ln
++
+ TOOLKITSRC = $(LIBSRC)/Xt
+@@ -320,5 +481,13 @@
+
++ XALIBSRC = $(LIBSRC)/Xa
++
++SOXAREV = 1.0
++DEPXALIB =
++XALIB = -lXa
++
++LINTXA = $(LINTLIBDIR)/llib-lXa.ln
++
+ AWIDGETSRC = $(LIBSRC)/Xaw
+
+-SOXAWREV = 6.0
++SOXAWREV = 6.1
+ DEPXAWLIB =
+@@ -328,16 +497,2 @@
+
+- XTFSRC = $(TOP)/workInProgress/Xtf
+-
+-DEPXTFLIB = $(USRLIBDIR)/libXtf.a
+-XTFLIB = -lXtf
+-
+-LINTXTF = $(LINTLIBDIR)/llib-lXtf.ln
+-
+- FRESCOSRC = $(TOP)/workInProgress/Fresco
+-
+-DEPFRESCOLIB = $(USRLIBDIR)/libFresco.a
+-FRESCOLIB = -lFresco
+-
+-LINTFRESCO = $(LINTLIBDIR)/llib-lFresco.ln
+-
+ XILIBSRC = $(LIBSRC)/Xi
+@@ -352,3 +507,3 @@
+
+-SOXTESTREV = 6.0
++SOXTESTREV = 6.1
+ DEPXTESTLIB =
+@@ -388,3 +543,3 @@
+
+-SOICEREV = 6.0
++SOICEREV = 6.3
+ DEPICELIB =
+@@ -402,2 +557,10 @@
+
++ XKEYSRC = $(LIBSRC)/Xkey
++
++SOXKEYREV = 6.0
++DEPXKEYLIB =
++XKEYLIB = -lXkey
++
++LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln
++
+ FSLIBSRC = $(LIBSRC)/FS
+@@ -416,2 +579,25 @@
+
++ XPMLIBSRC = $(LIBSRC)/Xpm
++
++DEPXPMLIB = $(USRLIBDIR)/libXpm.a
++XPMLIB = -lXpm
++
++LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln
++
++ XKBFILELIBSRC = $(LIBSRC)/xkbfile
++
++DEPXKBFILELIB = $(USRLIBDIR)/libxkbfile.a
++XKBFILELIB = -lxkbfile
++
++LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln
++
++ XKBCOMPCMD = xkbcomp
++
++ XKBUILIBSRC = $(LIBSRC)/xkbui
++
++DEPXKBUILIB = $(USRLIBDIR)/libxkbui.a
++XKBUILIB = -lxkbui
++
++LINTXKBUI = $(LINTLIBDIR)/llib-lxkbui.ln
++
+ DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
+@@ -421,2 +607,12 @@
+ DEPLIBS3 = $(DEPLIBS)
++ DEPLIBS4 = $(DEPLIBS)
++ DEPLIBS5 = $(DEPLIBS)
++ DEPLIBS6 = $(DEPLIBS)
++ DEPLIBS7 = $(DEPLIBS)
++ DEPLIBS8 = $(DEPLIBS)
++ DEPLIBS9 = $(DEPLIBS)
++ DEPLIBS10 = $(DEPLIBS)
++
++XMULIBONLY = -lXmu
++XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+
+@@ -424,3 +620,11 @@
+
+-# -----------------------------------------------------------------------
++ USRLIBDIRPATH = $(USRLIBDIR)
++ LDPRELIBS = -L../../glunix/lib/%%%PLAT%%%
++ LDPOSTLIBS =
++ TOP_INCLUDES = $(TOP_X_INCLUDES)
++ PROJECT_DEFINES =
++
++CXXPROJECT_DEFINES =
++
++# ----------------------------------------------------------------------
+ # start of Imakefile
+@@ -428,3 +632,3 @@
+ #
+-# $Id: patch-bf,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
++# $Id: patch-bf,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+ #
+@@ -435,3 +639,3 @@
+ #
+-# $Id: patch-bf,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
++# $Id: patch-bf,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+ #
+@@ -445,3 +649,3 @@
+
+-# CONFIGH = -DCONFIGH=\"config/sol23\"
++# CONFIGH = -DCONFIGH=\"config/bsd4.4\"
+
+@@ -473,3 +677,3 @@
+
+-LIBCRYPT =
++LIBCRYPT = -lcrypt
+
+@@ -482,5 +686,3 @@
+
+-SYSLIBS = $(LIBPOSIX) $(LIBDIRECTENT) $(LIBTERMCAP) $(LIBCURSES) \
+- $(LIBNET) $(LIBINTL) $(LIBSOCKET) $(LIBSUN) $(LIBBSD) $(LIBCPOSIX) \
+- $(LIBINET) $(LIBDIRECT) $(LIBX) $(LIBC_S) $(LIBSQNT) $(LIBCRYPT)
++SYSLIBS = $(LIBPOSIX) $(LIBDIRECTENT) $(LIBTERMCAP) $(LIBCURSES) $(LIBNET) $(LIBINTL) $(LIBSOCKET) $(LIBSUN) $(LIBBSD) $(LIBCPOSIX) $(LIBINET) $(LIBDIRECT) $(LIBX) $(LIBC_S) $(LIBSQNT) $(LIBCRYPT) -lglunix
+
+@@ -503,3 +705,3 @@
+
+-CDEBUGFLAGS = -O
++CDEBUGFLAGS = -O2
+
+@@ -509,4 +711,3 @@
+ INCLUDES = -I.
+-LDLIBS = -lnsl -lsocket
+-GLUNIX_LIBS = -lglunix
++LDLIBS =
+
+@@ -515,37 +716,20 @@
+
+-SHSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
+- sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
+- sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
+- sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h \
+- sh.decls.h glob.c glob.h ${SYSSRCS}
+-SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \
+- sh.char.${SUF} sh.exp.${SUF} sh.func.${SUF} sh.glob.${SUF} \
+- sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} sh.misc.${SUF} \
+- sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} sh.sem.${SUF} \
+- sh.set.${SUF} sh.time.${SUF} glob.${SUF} ${SYSOBJS}
+-
+-TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \
+- tw.comp.c
+-TWOBJS= tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF} \
+- tw.comp.${SUF}
+-
+-EDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
+- ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
+-EDOBJS= ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
+- ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
+-
+-TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
+- tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
+- tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
+- tc.who.c tc.h
+-TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \
+- tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} \
+- tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
+- tc.vers.${SUF} tc.who.${SUF}
+-
+-MISCF = Makefile.std Fixes MAKEDIFFS MAKESHAR NewThings README FAQ \
+- WishList config_f.h eight-bit.me glob.3 patchlevel.h \
+- pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
+- README.imake complete.tcsh vmsreadme.txt Makefile.vms termcap.vms \
+- snames.h host.defs gethost.c tcsh.man2html
++SHSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h sh.decls.h glob.c glob.h ${SYSSRCS}
++
++SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} sh.char.${SUF} sh.exp.${SUF} sh.func.${SUF} sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} ${SYSOBJS}
++
++TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c tw.comp.c
++
++TWOBJS= tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF} tw.comp.${SUF}
++
++EDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
++
++EDOBJS= ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
++
++TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h tc.who.c tc.h
++
++TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} tc.vers.${SUF} tc.who.${SUF}
++
++MISCF = Makefile.std Fixes MAKEDIFFS MAKESHAR NewThings README FAQ WishList config_f.h eight-bit.me glob.3 patchlevel.h pathnames.h tcsh.man Ported src.desc Imakefile imake.config README.imake complete.tcsh vmsreadme.txt Makefile.vms termcap.vms snames.h host.defs gethost.c tcsh.man2html
++
+ CONFSRCS=config/[a-z]*
+@@ -580,6 +764,4 @@
+ @echo '#define _h_tc_const' >> $@
+- ${CC} -E $(INCLUDES) ${DFLAGS} -D_h_tc_const tc.const.c | \
+- grep 'Char STR' | \
+- sed -e 's/Char \([a-zA-Z0-9_]*\)\[\].*/extern Char \1[];/' | \
+- sort >> $@
++ ${CC} -E $(INCLUDES) ${DFLAGS} -D_h_tc_const tc.const.c | grep 'Char STR' | sed -e 's/Char \([a-zA-Z0-9_]*\)\[\].*/extern Char \1[];/' | sort >> $@
++
+ @echo '#endif /* _h_tc_const */' >> $@
+@@ -587,3 +769,3 @@
+ config.h:
+- @cp config/sol23 config.h
++ @cp config/bsd4.4 config.h
+
+@@ -615,4 +797,4 @@
+ cp ${CONFSRCS} tcsh-${VERSION}/config
+- MAKESHAR -v -n tcsh-${VERSION} tcsh-${VERSION} \
+- tcsh-${VERSION}/?* tcsh-${VERSION}/config/?*
++ MAKESHAR -v -n tcsh-${VERSION} tcsh-${VERSION} tcsh-${VERSION}/?* tcsh-${VERSION}/config/?*
++
+ rm -rf tcsh-${VERSION}
+@@ -620,3 +802,3 @@
+ world:
+- make clean ; make depend ; make tcsh ; make install
++ make clean ; make depend ; make glush ; make install
+
+@@ -639,3 +821,3 @@
+ $(RM) $@
+- $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LDLIBS) $(GLUNIX_LIBS) $(ALIB) $(EXTRA_LOAD_FLAGS)
++ $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LDLIBS) $(ALIB) $(EXTRA_LOAD_FLAGS)
+
+@@ -646,3 +828,3 @@
+ $(RM) $@
+- $(CCLINK) -o $@ $(LDOPTIONS) gethost.${SUF} $(LDLIBS) $(ALIB) $(EXTRA_LOAD_FLAGS)
++ $(CCLINK) -static -o $@ $(LDOPTIONS) gethost.${SUF} $(LDLIBS) $(ALIB) $(EXTRA_LOAD_FLAGS)
+
+@@ -651,3 +833,2 @@
+
+-
+ install:: glush
+@@ -655,6 +836,3 @@
+ # else (set -x; $(MKDIRHIER) $(DESTDIR)$(TCSH_BINDIR)); fi
+-# -if [ -f $(DESTDIR)$(TCSH_BINDIR)/tcsh ]; then cmp $(DESTDIR)$(TCSH_BINDIR)/tcsh tcsh >/dev/null 2>&1; if [ $$? -ne 0 ]; then $(MV) $(DESTDIR)$(TCSH_BINDIR)/tcsh $(DESTDIR)$(TCSH_BINDIR)/tcsh.bak; fi; fi
+ # $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) tcsh $(DESTDIR)$(TCSH_BINDIR)/tcsh;
+-# mv glush ../../bin/sun4-solaris2.4-tcp/
+-# cp glush.1 $(MANHOME)
+ gmake -f Makefile.install install
+@@ -664,12 +842,31 @@
+
+-install.man:: tcsh.man
+- @if [ -d $(DESTDIR)$(TCSH_MANDIR) ]; then set +x; \
+- else (set -x; $(MKDIRHIER) $(DESTDIR)$(TCSH_MANDIR)); fi
+- -if [ -f $(DESTDIR)$(TCSH_MANDIR)/tcsh.$(MANSUFFIX) ]; then cmp $(DESTDIR)$(TCSH_MANDIR)/tcsh.$(MANSUFFIX) tcsh.man >/dev/null 2>&1; if [ $$? -ne 0 ]; then $(MV) $(DESTDIR)$(TCSH_MANDIR)/tcsh.$(MANSUFFIX) $(DESTDIR)$(TCSH_MANDIR)/tcsh.$(MANSUFFIX).bak; fi; fi
+- $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) tcsh.man $(DESTDIR)$(TCSH_MANDIR)/tcsh.$(MANSUFFIX);
++all:: tcsh.0
+
+-depend::
+- $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS)
++tcsh.0:: tcsh.man
++ @if [ -f tcsh.man ]; \
++ then \
++ cat tcsh.man | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) >/tmp/$$$$.man; \
++ cp /tmp/$$$$.man tcsh.0; \
++ $(RM) /tmp/$$$$.man; \
++ fi
+
+-# -----------------------------------------------------------------------
++install.man::
++# @if [ -d $(DESTDIR)$(TCSH_MANDIR) ]; then set +x; \
++# else (set -x; $(MKDIRHIER) $(DESTDIR)$(TCSH_MANDIR)); fi
++# -@if [ -f tcsh.0 ]; \
++# then \
++# $(INSTALL) -c $(INSTMANFLAGS) tcsh.0 $(DESTDIR)$(TCSH_MANDIR)/tcsh.0; \
++# fi
++ gmake -f Makefile.install installman
++
++clean::
++ $(RM) tcsh.o;
++
++depend:: .depend
++
++.depend::
++ $(RM) $@
++ $(DEPEND) -f- $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) > $@
++
++# ----------------------------------------------------------------------
+ # common rules for all Makefiles - do not edit
+@@ -678,3 +875,3 @@
+ $(RM) $@
+- $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@
++ $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@
+
+@@ -683,3 +880,3 @@
+ clean::
+- $(RM_CMD) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"*
++ $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut *.core "#"*
+
+@@ -695,3 +892,5 @@
+
+-# -----------------------------------------------------------------------
++man_keywords::
++
++# ----------------------------------------------------------------------
+ # empty rules for directories that do not have SUBDIRS - do not edit
+@@ -713,4 +912,6 @@
+
+-# -----------------------------------------------------------------------
++# ----------------------------------------------------------------------
+ # dependencies generated by makedepend
++
++# dependencies are in .depend
+
diff --git a/parallel/glunix/patches/patch-bg b/parallel/glunix/patches/patch-bg
new file mode 100644
index 00000000000..f19b938918d
--- /dev/null
+++ b/parallel/glunix/patches/patch-bg
@@ -0,0 +1,36 @@
+$NetBSD: patch-bg,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glupart/glupart_script.pl.orig Wed Nov 5 15:30:11 1997
++++ progs/glupart/glupart_script.pl Thu Apr 2 21:55:30 1998
+@@ -75,3 +75,3 @@
+ my $gl_tmpFile = "$gl_dataDir/.__glupart$$-tmp";
+-my $gl_emailAdmin = "glunix-admin\@now.CS.Berkeley.EDU";
++my $gl_emailAdmin = "root";
+ my $gl_datePath = "/bin/date";
+@@ -136,3 +136,3 @@
+ &unlock();
+- open(USAGE, "|/usr/sww/bin/less") || open(USAGE, "|/bin/less") ||
++ open(USAGE, "|/usr/bin/less") || open(USAGE, "|/bin/less") ||
+ open(USAGE, "|/bin/more") || open(USAGE, ">&STDOUT");
+@@ -1491,3 +1491,4 @@
+ print "Creating directory $tmp\n";
+- mkdir($tmp, 0755);
++ mkdir $tmp, 0755 || die("$!");
++ system("/usr/sbin/chown glunix:glunix $tmp");
+ }
+@@ -1501,3 +1502,3 @@
+
+- umask 0755;
++ umask 0022;
+ foreach $f (@files) {
+@@ -1507,2 +1508,3 @@
+ print "Created file $f\n";
++ system("/usr/sbin/chown glunix:glunix $f");
+ }
+@@ -1995,3 +1997,5 @@
+ if ($command eq "install") {
+- if ($> != 0) {
++ if ($> != 0 && $< == 0) {
++ ($<,$>) = ($>,$<);
++ } else {
+ print STDERR "You must be root to do \"glupart install\"\n";
diff --git a/parallel/glunix/patches/patch-bh b/parallel/glunix/patches/patch-bh
new file mode 100644
index 00000000000..8d7b56c9404
--- /dev/null
+++ b/parallel/glunix/patches/patch-bh
@@ -0,0 +1,25 @@
+$NetBSD: patch-bh,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/tools/run_glunix_script.pl.orig Wed Nov 5 13:44:28 1997
++++ progs/tools/run_glunix_script.pl Thu Apr 2 21:40:47 1998
+@@ -15,3 +15,3 @@
+ $data_dir = "%%GLUNIX_DATA_DIR%%";
+-$release_dir = "$root_dir/release";
++$release_dir = "$root_dir";
+ $devel_dir = "$root_dir/devel";
+@@ -19,5 +19,6 @@
+ $run_glunix_agent = "%%INSTALL_DIR%%/bin/run_glunix_agent";
+-$command_master = "u"; # The preferred location of the master
++# The preferred location of the master
++$command_master = "%%MASTER_HOSTNAME%%";
+ $mail_cmd = "%%MAIL_PATH%%";
+-$admin_email = "glunix-admin\@now.cs";
++$admin_email = "root";
+ $questions_email = "glunix\@now.cs.berkeley.edu";
+@@ -550,4 +551,4 @@
+ $full_hostname = &expand_hostname($host);
+- $ping_str = `/usr/sbin/ping -v $full_hostname 2`;
+- if ($ping_str =~ m/$full_hostname.* is alive/) {
++ $ping_str = `/sbin/ping -o $full_hostname`;
++ if ($ping_str =~ m/1 packets transmitted, 1 packets received, 0% packet loss/) {
+ push(@alive, $host);
diff --git a/parallel/glunix/patches/patch-bi b/parallel/glunix/patches/patch-bi
new file mode 100644
index 00000000000..6ff34c8b795
--- /dev/null
+++ b/parallel/glunix/patches/patch-bi
@@ -0,0 +1,11 @@
+$NetBSD: patch-bi,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- glunix/src/init/glunix.h.orig Thu Oct 2 12:33:52 1997
++++ glunix/src/init/glunix.h Thu Apr 9 11:33:20 1998
+@@ -98,4 +98,4 @@
+ */
+-#define GLUNIX_BIN_DIR "/usr/now/bin"
+-#define GLUNIX_DATA_DIR "/disks/barad-dur/now/glunix/data"
++#define GLUNIX_BIN_DIR "%%%NOW_ROOT%%%/bin"
++#define GLUNIX_DATA_DIR "%%%NOW_ROOT%%%/data"
+
diff --git a/parallel/glunix/patches/patch-bj b/parallel/glunix/patches/patch-bj
new file mode 100644
index 00000000000..9b18341354f
--- /dev/null
+++ b/parallel/glunix/patches/patch-bj
@@ -0,0 +1,32 @@
+$NetBSD: patch-bj,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- glunix/src/part/mpart.cc~ Fri Sep 5 12:30:01 1997
++++ glunix/src/part/mpart.cc Thu Apr 2 09:15:10 1998
+@@ -272,3 +272,5 @@
+ // Child executes here
++#ifndef __NetBSD__
+ close(pipeFds[1]);
++#endif
+ if (dup2(pipeFds[0], STDIN_FILENO) < 0) {
+@@ -277,4 +279,7 @@
+ }
+-
++#ifdef __NetBSD__
++ if (dup2(pipeFds[1], STDOUT_FILENO) < 0) {
++#else
+ if (dup2(pipeFds[0], STDOUT_FILENO) < 0) {
++#endif
+ DE("dup2(STDOUT) failed: %s\n", strerror(errno));
+@@ -293,6 +298,11 @@
+ }
++#ifndef __NetBSD__
+ close(pipeFds[0]);
+-
++#endif
+ *pidPtr = pid;
++#ifdef __NetBSD__
++ *fdPtr = pipeFds[0];
++#else
+ *fdPtr = pipeFds[1];
++#endif
+
diff --git a/parallel/glunix/patches/patch-bk b/parallel/glunix/patches/patch-bk
new file mode 100644
index 00000000000..063c2e72192
--- /dev/null
+++ b/parallel/glunix/patches/patch-bk
@@ -0,0 +1,19 @@
+$NetBSD: patch-bk,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/tools/run_glunix_agent.pl~ Thu Oct 2 11:42:13 1997
++++ progs/tools/run_glunix_agent.pl Fri Apr 3 11:22:25 1998
+@@ -62,3 +62,3 @@
+
+- open(FD,"/bin/ps -edaf -p $pid | grep $path | grep -v grep|");
++ open(FD,"/bin/ps -ax -p $pid | grep $path | grep -v grep|");
+ while (<FD>) {
+@@ -190,3 +190,3 @@
+ while (1) {
+- $str = `/bin/ps -edaf | grep daemon | grep now/glunix/ | grep -v grep`;
++ $str = `/bin/ps -ax | grep '(daemon)' | grep -v grep`;
+ $str =~ s/^\s*//;
+@@ -211,3 +211,3 @@
+ while (1) {
+- $str = `/bin/ps -edaf | grep master | grep now/glunix/ | grep -v grep`;
++ $str = `/bin/ps -ax | grep '(master)' | grep -v grep`;
+ $str =~ s/^\s*//;
diff --git a/parallel/glunix/patches/patch-bl b/parallel/glunix/patches/patch-bl
new file mode 100644
index 00000000000..3b91149b0db
--- /dev/null
+++ b/parallel/glunix/patches/patch-bl
@@ -0,0 +1,8 @@
+$NetBSD: patch-bl,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- glunix/src/rexec/mrexec.cc~ Thu Oct 2 12:34:06 1997
++++ glunix/src/rexec/mrexec.cc Fri Apr 3 16:56:16 1998
+@@ -263,3 +263,2 @@
+ #include <pwd.h>
+-#include <time.h>
+ #include <stdio.h>
diff --git a/parallel/glunix/patches/patch-bm b/parallel/glunix/patches/patch-bm
new file mode 100644
index 00000000000..d779cd4fcc9
--- /dev/null
+++ b/parallel/glunix/patches/patch-bm
@@ -0,0 +1,8 @@
+$NetBSD: patch-bm,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- glunix/src/glib/glib.cc~ Thu Oct 2 12:33:49 1997
++++ glunix/src/glib/glib.cc Fri Apr 3 16:59:37 1998
+@@ -205,3 +205,2 @@
+ #include "csignal.h"
+-#include "lpdb.h"
+ #include "lidle.h"
diff --git a/parallel/glunix/patches/patch-bn b/parallel/glunix/patches/patch-bn
new file mode 100644
index 00000000000..aa0e01bcd74
--- /dev/null
+++ b/parallel/glunix/patches/patch-bn
@@ -0,0 +1,8 @@
+$NetBSD: patch-bn,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- glunix/src/comm/ccomm.cc~ Thu Oct 2 12:33:46 1997
++++ glunix/src/comm/ccomm.cc Fri Apr 3 17:04:02 1998
+@@ -397,3 +397,2 @@
+ #include "cdebug.h"
+-#include "ctime.h"
+ #include "clist.h"
diff --git a/parallel/glunix/patches/patch-bo b/parallel/glunix/patches/patch-bo
new file mode 100644
index 00000000000..455614df8e7
--- /dev/null
+++ b/parallel/glunix/patches/patch-bo
@@ -0,0 +1,46 @@
+$NetBSD: patch-bo,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glupart/glupart.c.orig Thu Sep 18 14:01:35 1997
++++ progs/glupart/glupart.c Thu Apr 9 11:37:35 1998
+@@ -1,18 +1,40 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <sys/param.h>
+ #include <netdb.h>
+ #include <netinet/in.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+
++#if (defined(BSD) && BSD >= 199306)
++#include <pwd.h>
++#include <grp.h>
++
++#define userId pwp->pw_uid
++#define groupId grp->gr_gid
++#else
+ #define userId GLUNIX_ACCOUNT /* This is the glunix account */
+ #define groupId GLUNIX_GROUP /* The glunix group */
++#endif
+
+-#define progPath "/usr/now/bin/glupart_script"
++#define progPath "%%%NOW_ROOT%%%/now/bin/glupart_script"
+
+ int
+ main(int argc, char **argv) {
++#if (defined(BSD) && BSD >= 199306)
++ struct passwd *pwp;
++ struct group *grp;
++
++ if ((pwp = getpwnam("glunix")) == (struct passwd *) NULL) {
++ (void) fprintf(stderr, "Error: can't get uid for `%s'\n", "glunix");
++ exit(1);
++ }
++ if ((grp = getgrnam("glunix")) == (struct group *) NULL) {
++ (void) fprintf(stderr, "Error: can't get gid for `%s'\n", "glunix");
++ exit(1);
++ }
++#endif
+ setegid(groupId);
+ /* setgid(groupId); */
+ seteuid(userId);
diff --git a/parallel/glunix/patches/patch-bp b/parallel/glunix/patches/patch-bp
new file mode 100644
index 00000000000..9c15dbfafb9
--- /dev/null
+++ b/parallel/glunix/patches/patch-bp
@@ -0,0 +1,11 @@
+$NetBSD: patch-bp,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glunix/glunix.1~ Thu Mar 27 12:11:28 1997
++++ progs/glunix/glunix.1 Thu Apr 9 11:40:46 1998
+@@ -10,4 +10,4 @@
+ All programs discussed in this overview page are located in the
+-directory <EM>/usr/now/bin</EM>. They all link with the <EM>libglunix.so</EM>
+-dynamic library in <EM>/usr/now/lib</EM>.
++directory <EM>%%%NOW_ROOT%%%/bin</EM>. They all link with the <EM>libglunix.so</EM>
++dynamic library in <EM>%%%NOW_ROOT%%%/lib</EM>.
+
diff --git a/parallel/glunix/patches/patch-bq b/parallel/glunix/patches/patch-bq
new file mode 100644
index 00000000000..8db75c26fc2
--- /dev/null
+++ b/parallel/glunix/patches/patch-bq
@@ -0,0 +1,13 @@
+$NetBSD: patch-bq,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/glurun/glurun-wrapper.pl~ Tue Jul 8 16:04:16 1997
++++ progs/glurun/glurun-wrapper.pl Thu Apr 9 11:42:57 1998
+@@ -54,5 +54,5 @@
+ # helper scripts
+-$glustat = '/usr/now/bin/glustat';
+-$glupart = '/usr/now/bin/glupart_new';
+-$glurun = '/usr/now/bin/glurun_orig';
++$glustat = '%%%NOW_ROOT%%%/bin/glustat';
++$glupart = '%%%NOW_ROOT%%%/bin/glupart_new';
++$glurun = '%%%NOW_ROOT%%%/bin/glurun_orig';
+
diff --git a/parallel/glunix/patches/patch-br b/parallel/glunix/patches/patch-br
new file mode 100644
index 00000000000..f6fd243cfee
--- /dev/null
+++ b/parallel/glunix/patches/patch-br
@@ -0,0 +1,9 @@
+$NetBSD: patch-br,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+--- progs/tools/run_glunix.c~ Wed Sep 17 14:36:56 1997
++++ progs/tools/run_glunix.c Thu Apr 9 11:48:05 1998
+@@ -7,3 +7,3 @@
+
+-#define BIN_PATH "/usr/now/bin"
++#define BIN_PATH "%%%NOW_ROOT%%%/bin"
+ char *newArgv[2] = { "run_glunix_script", NULL };
diff --git a/parallel/glunix/patches/patch-bs b/parallel/glunix/patches/patch-bs
new file mode 100644
index 00000000000..ab213779bfe
--- /dev/null
+++ b/parallel/glunix/patches/patch-bs
@@ -0,0 +1,79 @@
+$NetBSD: patch-bs,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+diff -U 1 progs/glush/config.h ../old/progs/glush/config.h
+--- progs/glush/config.h Wed Nov 5 13:43:59 1997
++++ ../old/progs/glush/config.h Thu Mar 12 02:19:30 1998
+@@ -40,3 +40,3 @@
+ */
+-#undef VFORK
++#define VFORK
+
+@@ -53,3 +53,3 @@
+ */
+-#undef BSDSIGS
++#define BSDSIGS
+
+@@ -60,3 +60,3 @@
+ */
+-#undef BSDTIMES
++#define BSDTIMES
+
+@@ -71,3 +71,3 @@
+ */
+-#undef BSDNICE
++#define BSDNICE
+
+@@ -85,6 +85,6 @@
+ * built in a BSD universe.
+- * Set SYSVREL to 1, 2, or 3, depending the version of System V
++ * Set SYSVREL to 1, 2, 3, or 4, depending the version of System V
+ * you are running. Or set it to 0 if you are not SYSV based
+ */
+-#define SYSVREL 4
++#define SYSVREL 0
+
+@@ -108,15 +108,5 @@
+ /*
+- * HAVEUTMPX Define if you have extended utmp (utmpx).
+- * (common for svr4 systems)
+- */
+-#define HAVEUTMPX
+-
+-/*
+ * UTHOST Does the utmp file have a host field?
+ */
+-#ifdef HAVEUTMPX
+-# define UTHOST
+-#else
+-# undef UTHOST
+-#endif /* HAVEUTMPX */
++#define UTHOST
+
+@@ -126,23 +116,3 @@
+ #define DIRENT
+-
+-/*
+- * ECHO_STYLE Optionally change the behavior of the builtin echo
+- * BOTH_ECHO: Support both bsd options (-n) and sysv escapes (\nnn)
+- * BSD_ECHO: Support only -n
+- * SYSV_ECHO: Support only sysv escapes (\nnn)
+- * NONE_ECHO: Pure echo.
+- */
+-#define ECHO_STYLE BSD_ECHO /* BSD options only */
+-
+ /****************** local defines *********************/
+-#ifndef BSDTIMES
+-# define NEEDgethostname
+-#endif
+-/*
+- * Shadow passwd file
+- */
+-#define PW_SHADOW
+-
+-#define SOLARIS2 23
+-
+ /****************** configurable hacks ****************/
+@@ -150,3 +120,2 @@
+ #include "config_f.h"
+-
+ #endif /* _h_config */
diff --git a/parallel/glunix/patches/patch-bt b/parallel/glunix/patches/patch-bt
new file mode 100644
index 00000000000..e5b7ba941f1
--- /dev/null
+++ b/parallel/glunix/patches/patch-bt
@@ -0,0 +1,19 @@
+$NetBSD: patch-bt,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+diff -U 1 progs/glush/config_f.h ../old/progs/glush/config_f.h
+--- progs/glush/config_f.h Thu Jul 20 11:08:43 1995
++++ ../old/progs/glush/config_f.h Thu Mar 12 01:24:31 1998
+@@ -1,2 +1,2 @@
+-/* $Header: /cvsroot/pkgsrc/parallel/glunix/patches/Attic/patch-bt,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $ */
++/* $Header: /cvsroot/pkgsrc/parallel/glunix/patches/Attic/patch-bt,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $ */
+ /*
+@@ -58,3 +58,3 @@
+ */
+-#undef NLS
++#define NLS
+
+@@ -92,3 +92,3 @@
+ */
+-#define AUTOLOGOUT
++#undef AUTOLOGOUT
+
diff --git a/parallel/glunix/patches/patch-bu b/parallel/glunix/patches/patch-bu
new file mode 100644
index 00000000000..9f62fb4b34c
--- /dev/null
+++ b/parallel/glunix/patches/patch-bu
@@ -0,0 +1,17 @@
+$NetBSD: patch-bu,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+diff -U 1 progs/glush/sh.c ../old/progs/glush/sh.c
+--- progs/glush/sh.c Tue Sep 19 11:02:07 1995
++++ ../old/progs/glush/sh.c Thu Mar 12 01:46:30 1998
+@@ -38,3 +38,3 @@
+ #include "sh.h"
+-#include "glib.h"
++/*#include "glib.h"*/
+
+@@ -1172,6 +1172,2 @@
+ sigret_t (*oparintr)() = parintr;
+-
+-/********** GLUnix -- Doug's changes ***********/
+- srcfile("/disks/barad-dur/now/glunix/data/glush.cshrc", 0, 0, NULL);
+-/***********************************************/
+
diff --git a/parallel/glunix/patches/patch-bv b/parallel/glunix/patches/patch-bv
new file mode 100644
index 00000000000..608868fa4ab
--- /dev/null
+++ b/parallel/glunix/patches/patch-bv
@@ -0,0 +1,20 @@
+$NetBSD: patch-bv,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+diff -U 1 progs/glush/sh.sem.c ../old/progs/glush/sh.sem.c
+--- progs/glush/sh.sem.c Thu Jul 20 11:09:24 1995
++++ ../old/progs/glush/sh.sem.c Thu Mar 12 01:24:34 1998
+@@ -1,2 +1,2 @@
+-/* $Header: /cvsroot/pkgsrc/parallel/glunix/patches/Attic/patch-bv,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $ */
++/* $Header: /cvsroot/pkgsrc/parallel/glunix/patches/Attic/patch-bv,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $ */
+ /*
+@@ -39,3 +39,3 @@
+
+-RCSID("$Id: patch-bv,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $")
++RCSID("$Id: patch-bv,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $")
+
+@@ -52,3 +52,3 @@
+ #if defined(__sparc__) || defined(sparc)
+-# if !defined(MACH) && SYSVREL == 0 && !defined(Lynx)
++# if !defined(MACH) && SYSVREL == 0 && !defined(Lynx) && !defined(__NetBSD__)
+ # include <vfork.h>
+
diff --git a/parallel/glunix/patches/patch-bw b/parallel/glunix/patches/patch-bw
new file mode 100644
index 00000000000..45324142967
--- /dev/null
+++ b/parallel/glunix/patches/patch-bw
@@ -0,0 +1,15 @@
+$NetBSD: patch-bw,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+
+diff -U 1 progs/glush/sh.exec.c ../old/progs/glush/sh.exec.c
+--- progs/glush/sh.exec.c Tue Jul 25 12:13:14 1995
++++ ../old/progs/glush/sh.exec.c Thu Mar 12 02:12:42 1998
+@@ -153,3 +153,3 @@
+ static int iscommand __P((Char *));
+-
++/*
+ char *index(a, b)
+@@ -167,3 +167,3 @@
+ }
+-
++*/
+ void
diff --git a/parallel/glunix/patches/patch-bx b/parallel/glunix/patches/patch-bx
new file mode 100644
index 00000000000..203befabd80
--- /dev/null
+++ b/parallel/glunix/patches/patch-bx
@@ -0,0 +1,24 @@
+$NetBSD: patch-bx,v 1.1.1.1 1998/10/21 19:59:29 garbled Exp $
+
+Use getcwd(3) in preference to getwd(3).
+
+--- progs/glush/sh.dir.c 1998/10/16 09:42:40 1.1
++++ progs/glush/sh.dir.c 1998/10/16 09:44:01
+@@ -71,7 +71,7 @@
+ static char *emsg = "tcsh: Trying to start from \"%s\"\n";
+
+ /* Don't believe the login shell home, because it may be a symlink */
+- tcp = (char *) getwd(path);
++ tcp = (char *) getcwd(path, sizeof(path));
+ if (tcp == NULL || *tcp == '\0') {
+ xprintf("tcsh: %s\n", path);
+ if (hp && *hp) {
+@@ -524,7 +524,7 @@
+ char *dptr, *ptr;
+ if (chdir(dptr = short2str(cp)) < 0)
+ stderror(ERR_SYSTEM, dptr, strerror(errno));
+- else if ((ptr = getwd(ebuf)) && *ptr != '\0') {
++ else if ((ptr = getcwd(ebuf, sizeof(ebuf))) && *ptr != '\0') {
+ xfree((ptr_t) cp);
+ cp = Strsave(str2short(ptr));
+ return dgoto(cp);
diff --git a/parallel/glunix/pkg/COMMENT b/parallel/glunix/pkg/COMMENT
new file mode 100644
index 00000000000..4472011d61e
--- /dev/null
+++ b/parallel/glunix/pkg/COMMENT
@@ -0,0 +1 @@
+A Global Layer Unix for NOW. (Network Of Workstations)
diff --git a/parallel/glunix/pkg/DESCR b/parallel/glunix/pkg/DESCR
new file mode 100644
index 00000000000..a5c02920fae
--- /dev/null
+++ b/parallel/glunix/pkg/DESCR
@@ -0,0 +1,16 @@
+Recent technology trends in high-speed/low-latency local area networks has
+lead to a convergence of hardware in massively parallel processors (MPPs)
+and Networks of Workstations (NOWs). Relative to traditional MPPs, a NOW
+offers the potential for better cost-effectiveness, increased scalability,
+and decreased hardware and software development time. The main
+differentiating point between NOWs and MPPs will soon be the operating
+system software.
+
+Our system, called GLUnix, is built as a layer on top of existing
+operating systems. This strategy makes the system quickly portable, tracks
+vendor software upgrades, and reduces development time. Our work is an
+example of "higher-order" systems research where new systems can be built
+quickly by mapping new services onto the functionality provided by the
+layer beneath.
+
+see: http://now.cs.berkeley.edu
diff --git a/parallel/glunix/pkg/MESSAGE b/parallel/glunix/pkg/MESSAGE
new file mode 100644
index 00000000000..f2b3b580739
--- /dev/null
+++ b/parallel/glunix/pkg/MESSAGE
@@ -0,0 +1,30 @@
+QUICK START GUIDE:
+
+Change your directory to the now installation base, eg:
+${NOW_ROOT}/bin. Run ./glupart install as root.
+
+You must initialize the partition management system to
+understand the machines in your cluster. The tool to use is
+"glupart". You will need to do a "glupart machine <name> new" for
+each new machine. Multiple machines can be added at a time using a
+comma-separated list of names. You can also do "glupart -help" for
+more detailed information.
+
+To run GLUnix, you need a single machine which is able to do a root
+rsh (or ssh or kerberized rsh) without a password to all of the
+machines you want to run GLUnix on. Call this trusted machine the
+"master" machine. The scripts that get GLUnix running initially (the
+run_glunix_* scripts) need to run an rsh command on each node in order
+to set up GLUnix. Log on to the master machine and run "run_glunix
+-start <nodes>" where "<nodes>" is the list of nodes you want to run
+GLUnix on: generally a comma-separated list of machines. (You can do
+"run_glunix -help" to see all the options.) If the names of some of
+the machines are of the form of some base string followed by
+consecutive numbers (our machines are u0, u1, u2, u3, u4), then these
+machines can be abbreviated to the run_glunix command as "u0..u4".
+Here is a sample run_glunix command:
+
+ run_glunix -start thunk,sparc,u0..u110,pc0..pc9,dawn0..dawn30,cayuse
+
+Once the run_glunix command has successfully completed, you can run
+"glustat" to find out how many nodes came up.
diff --git a/parallel/glunix/pkg/PLIST b/parallel/glunix/pkg/PLIST
new file mode 100644
index 00000000000..828726eb21f
--- /dev/null
+++ b/parallel/glunix/pkg/PLIST
@@ -0,0 +1,126 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $
+now/include/glib/debug.h
+now/include/glib/idle.h
+now/include/glib/perf.h
+now/include/glib/types.h
+now/include/glib.h
+now/include/glib_idle.h
+now/include/glib_perf.h
+now/include/glib_stat.h
+now/lib/perl-lib/Time/CTime.pm
+now/lib/perl-lib/Time/DaysInMonth.pm
+now/lib/perl-lib/Time/JulianDay.pm
+now/lib/perl-lib/Time/ParseDate.pm
+now/lib/perl-lib/Time/Timezone.pm
+now/lib/perl-lib/set.pl
+now/lib/libglunix.a
+now/lib/libglunix.so.1.0
+now/bin/${MACHINE_ARCH}-${OPSYS}-tcp/master
+now/bin/${MACHINE_ARCH}-${OPSYS}-tcp/daemon
+now/bin/GLUnix-bin
+now/bin/GLUnix-bin-script
+now/bin/glupart
+now/bin/run_glunix
+now/bin/S99gluguard-admin
+now/bin/S99gluguard-d
+now/bin/S99gluguard-m
+now/bin/gluadmin
+now/bin/glubatch
+now/bin/gludebug
+now/bin/gluenv
+now/bin/gluguard
+now/bin/gluguard-admin
+now/bin/gluguard-d
+now/bin/gluguard-m
+now/bin/gluinstall
+now/bin/glukill
+now/bin/glumake
+now/bin/glumonitor
+now/bin/glupartInit
+now/bin/glupart_script
+now/bin/gluperf
+now/bin/glups
+now/bin/gluptime
+now/bin/glurun
+now/bin/glush
+@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (/usr/bin/grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells
+@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (/usr/bin/grep -v %D/%F /etc/shells.bak) >/etc/shells
+now/bin/glustat
+now/bin/glutestnode
+now/bin/mhtml2html
+now/bin/msleep
+now/bin/run_glunix_agent
+now/bin/run_glunix_script
+now/bin/sudoas
+now/bin/timelimit
+now/man/mhtml3/Glib_SetPartition.3
+now/man/mhtml3/Glib_AmIStartup.3
+now/man/mhtml3/Glib_GetHostByVnn.3
+now/man/mhtml3/Glib_GetMyNpid.3
+now/man/mhtml3/Glib_GetMyVnn.3
+now/man/mhtml3/Glib_GetNumAvailableNodes.3
+now/man/mhtml3/Glib_GetParallelDegree.3
+now/man/mhtml3/Glib_GetTotalNodes.3
+now/man/mhtml3/Glib_Initialize.3
+now/man/mhtml3/Glib_Spawn.3
+now/man/mhtml3/Glib_GetPartition.3
+now/man/mhtml3/Glib.3
+now/man/mhtml1/glustat.1
+now/man/mhtml1/gluadmin.1
+now/man/mhtml1/glubatch.1
+now/man/mhtml1/gludebug.1
+now/man/mhtml1/gluenv.1
+now/man/mhtml1/glukill.1
+now/man/mhtml1/glupart.1
+now/man/mhtml1/glupartInit.1
+now/man/mhtml1/gluperf.1
+now/man/mhtml1/glups.1
+now/man/mhtml1/gluptime.1
+now/man/mhtml1/glurun.1
+now/man/mhtml1/MHTML.1
+now/man/mhtml1/glush.1
+now/man/mhtml1/glunix.1
+now/man/man1/glustat.1
+now/man/man1/gluadmin.1
+now/man/man1/glubatch.1
+now/man/man1/gludebug.1
+now/man/man1/gluenv.1
+now/man/man1/glukill.1
+now/man/man1/glupart.1
+now/man/man1/glupartInit.1
+now/man/man1/gluperf.1
+now/man/man1/glups.1
+now/man/man1/gluptime.1
+now/man/man1/glurun.1
+now/man/man1/MHTML.1
+now/man/man1/glush.1
+now/man/man1/glunix.1
+now/man/html1/glustat.html
+now/man/html1/gluadmin.html
+now/man/html1/glubatch.html
+now/man/html1/gludebug.html
+now/man/html1/gluenv.html
+now/man/html1/glukill.html
+now/man/html1/glupart.html
+now/man/html1/glupartInit.html
+now/man/html1/gluperf.html
+now/man/html1/glups.html
+now/man/html1/gluptime.html
+now/man/html1/glurun.html
+now/man/html1/MHTML.html
+now/man/html1/glush.html
+now/man/html1/glunix.html
+@dirrm now/lib/${MACHINE_ARCH}-${OPSYS}-tcp
+@dirrm now/lib/perl-lib/Time
+@dirrm now/lib/perl-lib
+@dirrm now/bin/${MACHINE_ARCH}-${OPSYS}-tcp
+@dirrm now/man/mhtml3
+@dirrm now/man/mhtml1
+@dirrm now/man/html1
+@dirrm now/man/man1
+@dirrm now/man
+@dirrm now/lib
+@dirrm now/bin
+@dirrm now/include/glib
+@dirrm now/include
+@unexec /bin/rm -rf %D/now/data
diff --git a/parallel/glunix/scripts/post-patch b/parallel/glunix/scripts/post-patch
new file mode 100755
index 00000000000..e2b335e259b
--- /dev/null
+++ b/parallel/glunix/scripts/post-patch
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+cd $WRKSRC/progs
+
+sed "s+%%%NOW_ROOT%%%+$NOW_ROOT+" glupart/glupart.c > bak
+mv bak glupart/glupart.c
+sed "s+%%%NOW_ROOT%%%+$NOW_ROOT+" glunix/glunix.1 > bak
+mv bak glunix/glunix.1
+sed "s+%%%NOW_ROOT%%%+$NOW_ROOT+" glurun/glurun-wrapper.pl > bak
+mv bak glurun/glurun-wrapper.pl
+sed "s+%%%NOW_ROOT%%%+$NOW_ROOT+" tools/run_glunix.c > bak
+mv bak tools/run_glunix.c
+
+sed "s+%%%PLAT%%%+$ARCH-NetBSD-tcp+" glush/Makefile > bak
+mv bak glush/Makefile
+
+cd $WRKSRC/glunix
+sed "s+%%%NOW_ROOT%%%+$NOW_ROOT+" src/init/glunix.h > bak
+mv bak src/init/glunix.h
+
diff --git a/parallel/glunix/scripts/pre-fetch b/parallel/glunix/scripts/pre-fetch
new file mode 100755
index 00000000000..d422e428767
--- /dev/null
+++ b/parallel/glunix/scripts/pre-fetch
@@ -0,0 +1,30 @@
+#!/bin/sh
+if [ -f $DISTDIR/glunix-release-1-0a.tar.gz ]; then
+ exit 0
+fi
+
+echo ""
+echo "The authors of glunix would like to keep track of"
+echo "who thier user community is. They promise that the"
+echo "information obtained will not be used for marketing"
+echo "of any kind."
+echo ""
+echo -n "Please enter your Name: "
+
+read dname
+if [ "$dname" = "" ]; then
+ echo "Please run make again, and enter your name."
+ exit 1
+fi
+echo -n "Please enter your email address: "
+read email
+if [ "$email" = "" ]; then
+ echo "Please run make again, and enter your email."
+ exit 1
+fi
+
+name=`echo $dname | sed 's/ /+/'`
+nmail=`echo $email | sed 's/ /+/'`
+
+ftp "http://now.cs.berkeley.edu/cgi-bin/glunix_download.pl?name=$name&email=$nmail&use=NetBSD+pkg+system+download."
+$RM "glunix_download.pl?name=$name&email=$email&use=NetBSD+pkg+system+download."