On Wed, Jan 19, 2000 at 07:03:04AM -0800, Satoshi Asami wrote:

> How do I test if sigset_t is empty in -current?  The xview sources
> have this macro:
> 
> #define sigisempty(s)   (!(*(s)))
> 
> which is ok for the old sigset_t (unsigned int) but obviously won't
> work for the new one since it's a struct.

The very same file nfty.h already has a hack for SVR4:

#ifdef SVR4
#define sigisempty(s)   (!(((s)->__sigbits[0]) | ((s)->__sigbits[1])   \
                        | ((s)->__sigbits[2]) | ((s)->__sigbits[3])))

When I compiled xview on a -current machine I just did it the very same
hacky way:

#define sigisempty(s)   (!(((s)->__bits[0]) | ((s)->__bits[1])   \
                        | ((s)->__bits[2]) | ((s)->__bits[3])))

Of course, the #if for FreeBSD and its version is necessary.

Cheers,
-- 
Anton Berezin <[EMAIL PROTECTED]>
The Protein Laboratory, University of Copenhagen


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to