summaryrefslogtreecommitdiff
path: root/shells/scsh/patches/patch-ah
blob: 449a99da734de81e1197043794791c8bd49236aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-ah,v 1.2 2001/10/02 11:07:15 seb Exp $

--- scsh/bsd/sigset.h.orig	Tue May 16 09:52:02 2000
+++ scsh/bsd/sigset.h
@@ -9,7 +9,25 @@
 #define split_sigset(mask, hip, lop) \
 	((*(hip)=(mask.__bits[0]>>24)&0xff), \
 	 (*(lop)=(mask.__bits[0]&0xffffff)))
+
+#elif defined (__NetBSD__) && defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 103080000)
+
+#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: */