From f021f13b26967ba016d26ec410bd5666a03a33c4 Mon Sep 17 00:00:00 2001 From: marting Date: Tue, 16 May 2000 07:46:13 +0000 Subject: [PATCH] fix for new FreeBSD signal mask representation --- scsh/bsd/sigset.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scsh/bsd/sigset.h b/scsh/bsd/sigset.h index f30fa8c..3c62453 100644 --- a/scsh/bsd/sigset.h +++ b/scsh/bsd/sigset.h @@ -1,10 +1,19 @@ /* Convert between a lo24/hi integer-pair bitset and a sigset_t value. ** These macros are OS-dependent, and must be defined per-OS. */ +#include +#if defined __FreeBSD_version && __FreeBSD_version > 400000 +#define make_sigset(maskp, hi, lo)(*maskp.__bits[0] = ((hi)<<24)|(lo)) +/* Not a procedure: */ +#define split_sigset(mask, hip, lop) \ + ((*(hip)=(mask.__bits[0]>>24)&0xff), \ + (*(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