summaryrefslogtreecommitdiff
path: root/lang/snobol/patches
diff options
context:
space:
mode:
Diffstat (limited to 'lang/snobol/patches')
-rw-r--r--lang/snobol/patches/patch-aa20
-rw-r--r--lang/snobol/patches/patch-ab78
-rw-r--r--lang/snobol/patches/patch-ac12
-rw-r--r--lang/snobol/patches/patch-ad21
4 files changed, 102 insertions, 29 deletions
diff --git a/lang/snobol/patches/patch-aa b/lang/snobol/patches/patch-aa
index 06971db1560..c3af099fec9 100644
--- a/lang/snobol/patches/patch-aa
+++ b/lang/snobol/patches/patch-aa
@@ -1,12 +1,10 @@
-$NetBSD: patch-aa,v 1.1.1.1 2000/03/11 06:01:56 wiz Exp $
+$NetBSD: patch-aa,v 1.2 2001/02/06 18:13:52 wiz Exp $
---- ./configure.orig Fri Jul 18 23:43:30 1997
-+++ ./configure Sat Mar 11 03:56:00 2000
-@@ -1,6 +1,6 @@
- #!/bin/sh
-
--if autoconf "$@" > config.m4.tmp; then
-+if ./autoconf "$@" > config.m4.tmp; then
- rm -f config.m4
- mv config.m4.tmp config.m4
- else
+--- ./doc/head.orig Thu Jan 25 07:23:12 2001
++++ ./doc/head Thu Jan 25 07:22:50 2001
+@@ -0,0 +1,5 @@
++[This document is publically posted at ftp://ftp.snobol4.com/vanilla.zip
++ and zipped within PM.EXE as SNOBOL4.MAN. This is actually for the MSDOS
++ version of SNOBOL4, but is a very good starting point to learn the Unix
++ version. Pardon the references to DOS. References to code snippets may
++ be found in vanilla.zip. This is a NetBSD package, John Refling, 2001.]
diff --git a/lang/snobol/patches/patch-ab b/lang/snobol/patches/patch-ab
index 0008bddc98b..3b0e61a5a3a 100644
--- a/lang/snobol/patches/patch-ab
+++ b/lang/snobol/patches/patch-ab
@@ -1,21 +1,63 @@
-$NetBSD: patch-ab,v 1.1.1.1 2000/03/11 06:01:56 wiz Exp $
+$NetBSD: patch-ab,v 1.2 2001/02/06 18:13:52 wiz Exp $
---- ./Makefile2.m4.orig Thu Aug 7 07:34:47 1997
-+++ ./Makefile2.m4 Sat Mar 11 04:24:21 2000
-@@ -48,13 +48,13 @@
- SNOLIB_FILE=snolib.a
+--- ./lib/bsd/mstime.c.orig Wed Oct 30 12:39:40 1996
++++ ./lib/bsd/mstime.c Thu Jan 25 07:08:41 2001
+@@ -12,11 +12,56 @@
+ * (and you don't need to know HZ)
+ */
- # directory name for default SNOLIB (used by -INCLUDE and LOAD())
--SNOLIB_DIR=/usr/local/lib/snobol4
-+SNOLIB_DIR=${PREFIX}/lib/snobol4
++/* Added by refling@comet.lbl.gov to compensate for the fact that the usec
++ value can go backwards within the same sec on NetBSD. Problem has been
++ noted on sparc and i386. It really only appears in the test routine
++ where times are differenced, causing negative numbers to be generated.
++ This WILL cause the build to fail consistently on my sparc LX, but not
++ on the i386, even though the problem can be demonstrated there. See
++ NetBSD PR bin/10201.
++
++ The simple solution here is to have a persistent variable, and if the
++ usec value returned from getrusage() is LESS than the previous one
++ (stored in the persistent variable), use the previous one. This is
++ only when the second counter is the same between the previous and
++ current usec. This will make time stand still, but at least it
++ won't go backwards!
++
++ This could also be added to the definition of the NetBSD getrusage()
++ function to prevent it from returning bogus values in the first place,
++ if the real cause of the problem can't be tracked down.
++
++ Note that the patch to snobol4 (in this file) will not need to be
++ changed even if/when getrusage() is ultimately fixed. The only expense
++ is a few extra numerical comparisons. Typically, one doesn't take time
++ measurements too often. */
++
++static long prev_sec = 0;
++static long prev_usec = 0;
++
+ int_t
+ mstime() {
+ struct rusage ru;
++ long cur_usec, cur_sec;
- # default name for installed binary
--BINDEST=/usr/local/bin/snobol4
-+BINDEST=${PREFIX}/bin/snobol4
-
- # default name for installed man page
--MANDEST=/usr/local/man/man1/snobol4.1
-+MANDEST=${PREFIX}/man/man1/snobol4.1
-
- ########
- # default lib source files
+ getrusage( RUSAGE_SELF, &ru ); /* XXX check return? */
+- return(ru.ru_utime.tv_sec * 1000 +
+- ru.ru_utime.tv_usec / 1000);
++ cur_usec = ru.ru_utime.tv_usec;
++ cur_sec = ru.ru_utime.tv_sec;
++ if (prev_usec > cur_usec && prev_sec == cur_sec) {
++ cur_usec = prev_usec;
++// prev_sec = cur_sec; /* this is redundant in this case, since == */
++// prev_usec = cur_usec; /* this is also redundant */
++// system("echo a >> /tmp/caught_problem");
++ }
++ else {
++ prev_sec = cur_sec;
++ prev_usec = cur_usec;
++ }
++ return(cur_sec * 1000 +
++ cur_usec / 1000);
++
++// this is what it was....
++// getrusage( RUSAGE_SELF, &ru ); /* XXX check return? */
++// return(ru.ru_utime.tv_sec * 1000 +
++// ru.ru_utime.tv_usec / 1000);
+ }
diff --git a/lang/snobol/patches/patch-ac b/lang/snobol/patches/patch-ac
new file mode 100644
index 00000000000..8d8c5fd5c9c
--- /dev/null
+++ b/lang/snobol/patches/patch-ac
@@ -0,0 +1,12 @@
+$NetBSD: patch-ac,v 1.1 2001/02/06 18:13:53 wiz Exp $
+
+--- ./configure.orig Fri Jul 18 14:43:30 1997
++++ ./configure Thu Jan 25 07:08:41 2001
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+
+-if autoconf "$@" > config.m4.tmp; then
++if ./autoconf "$@" > config.m4.tmp; then
+ rm -f config.m4
+ mv config.m4.tmp config.m4
+ else
diff --git a/lang/snobol/patches/patch-ad b/lang/snobol/patches/patch-ad
new file mode 100644
index 00000000000..6e3efaa7f42
--- /dev/null
+++ b/lang/snobol/patches/patch-ad
@@ -0,0 +1,21 @@
+$NetBSD: patch-ad,v 1.1 2001/02/06 18:13:53 wiz Exp $
+
+--- ./Makefile2.m4.orig Wed Aug 6 22:34:47 1997
++++ ./Makefile2.m4 Thu Jan 25 07:08:42 2001
+@@ -48,13 +48,13 @@
+ SNOLIB_FILE=snolib.a
+
+ # directory name for default SNOLIB (used by -INCLUDE and LOAD())
+-SNOLIB_DIR=/usr/local/lib/snobol4
++SNOLIB_DIR=${PREFIX}/lib/snobol4
+
+ # default name for installed binary
+-BINDEST=/usr/local/bin/snobol4
++BINDEST=${PREFIX}/bin/snobol4
+
+ # default name for installed man page
+-MANDEST=/usr/local/man/man1/snobol4.1
++MANDEST=${PREFIX}/man/man1/snobol4.1
+
+ ########
+ # default lib source files