summaryrefslogtreecommitdiff
path: root/shells/scsh
diff options
context:
space:
mode:
authorsommerfeld <sommerfeld@pkgsrc.org>1999-06-04 16:00:04 +0000
committersommerfeld <sommerfeld@pkgsrc.org>1999-06-04 16:00:04 +0000
commitb22d570bfe7fb37e34d7393151ebfa54429e3124 (patch)
tree02e54222e50341f7ae86a1424cdca61ae39d0482 /shells/scsh
parent27f1a8cb2743664881bd9039ad519a2685b0596a (diff)
downloadpkgsrc-b22d570bfe7fb37e34d7393151ebfa54429e3124.tar.gz
Let this build again; for bonus points, teach it about SIGPWR.
Diffstat (limited to 'shells/scsh')
-rw-r--r--shells/scsh/patches/patch-af40
-rw-r--r--shells/scsh/patches/patch-ag14
-rw-r--r--shells/scsh/patches/patch-ah31
3 files changed, 85 insertions, 0 deletions
diff --git a/shells/scsh/patches/patch-af b/shells/scsh/patches/patch-af
new file mode 100644
index 00000000000..65d005b3c5b
--- /dev/null
+++ b/shells/scsh/patches/patch-af
@@ -0,0 +1,40 @@
+$NetBSD: patch-af,v 1.1 1999/06/04 16:00:04 sommerfeld Exp $
+
+*** scsh/bsd/sigset.h.original Fri Oct 13 23:33:55 1995
+--- scsh/bsd/sigset.h Fri Jun 4 10:55:41 1999
+***************
+*** 2,10 ****
+--- 2,34 ----
+ ** These macros are OS-dependent, and must be defined per-OS.
+ */
+
++ #if defined(__NetBSD__)
++ #include <sys/param.h>
++ #endif
++
++ #if defined(__NetBSD__) && defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 103080000)
++ /* Barf */
++
++ #if _NSIG > 48
++ #error Too many signals! Fix scsh to save more of them!
++ #endif
++
++ #define make_sigset(maskp, hi, lo) do { __sigemptyset(maskp); \
++ (maskp)->__bits[0] = ((hi)<<24)|(lo); \
++ (maskp)->__bits[1] = ((hi)>>8); \
++ } while(0)
++
++ /* Not a procedure: */
++ #define split_sigset(mask, hip, lop) \
++ ((*(hip)=((mask.__bits[0]>>24)&0xff) | (mask.__bits[1]<<8)), \
++ (*(lop)=(mask.__bits[0]&0xffffff)))
++
++ #else
++
+ #define make_sigset(maskp, hi, lo) (*maskp=((hi)<<24)|(lo))
+
+ /* Not a procedure: */
+ #define split_sigset(mask, hip, lop) \
+ ((*(hip)=(mask>>24)&0xff), \
+ (*(lop)=(mask&0xffffff)))
++ #endif
diff --git a/shells/scsh/patches/patch-ag b/shells/scsh/patches/patch-ag
new file mode 100644
index 00000000000..4426a2f569b
--- /dev/null
+++ b/shells/scsh/patches/patch-ag
@@ -0,0 +1,14 @@
+$NetBSD: patch-ag,v 1.1 1999/06/04 16:00:04 sommerfeld Exp $
+
+--- scsh/bsd/signals.scm.~1~ Thu Sep 12 02:00:17 1996
++++ scsh/bsd/signals.scm Fri Jun 4 11:15:50 1999
+@@ -65,6 +65,9 @@
+ ;; User defined
+ (usr1 30) ; user defined signal 1
+ (usr2 31) ; user defined signal 2
++
++ ;; NetBSD 1.4
++ (pwr 32) ; impending power failure
+ )
+
+ (define signals-ignored-by-default
diff --git a/shells/scsh/patches/patch-ah b/shells/scsh/patches/patch-ah
new file mode 100644
index 00000000000..65c96b9375c
--- /dev/null
+++ b/shells/scsh/patches/patch-ah
@@ -0,0 +1,31 @@
+$NetBSD: patch-ah,v 1.1 1999/06/04 16:00:04 sommerfeld Exp $
+
+--- scsh/bsd/signals1.c.~1~ Thu Sep 12 02:01:30 1996
++++ scsh/bsd/signals1.c Fri Jun 4 11:33:37 1999
+@@ -5,6 +5,10 @@
+ /* Make sure our exports match up w/the implementation: */
+ #include "../signals1.h"
+
++#if defined(__NetBSD__)
++#include <sys/param.h>
++#endif
++
+ /* This table converts Unix signal numbers to S48/scsh interrupt numbers.
+ ** If the signal doesn't have an interrupt number, the entry is -1.
+ ** (Only asynchronous signals have interrupt numbers.)
+@@ -45,10 +49,13 @@
+ scshint_winch, /* SIGWINCH */
+ scshint_info, /* SIGINFO */
+ scshint_usr1, /* SIGUSR1 */
+- scshint_usr2 /* SIGUSR2 */
++ scshint_usr2, /* SIGUSR2 */
++#if defined(__NetBSD__) && defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 103080000)
++ scshint_pwr, /* SIGPWR */
++#endif
+ };
+
+-const int max_sig = 31; /* SIGUSR2 */
++const int max_sig = (sizeof(sig2int)/sizeof(int)) - 1;
+
+ /*
+ scshint_alarm