Date: Thu, 20 Jan 2000 00:45:51 +0100 From: Anton Berezin <tobez@plab.ku.dk> To: Satoshi Asami <asami@cs.berkeley.edu> Cc: current@FreeBSD.ORG Subject: Re: sigisempty? Message-ID: <20000120004551.A13892@plab.ku.dk> In-Reply-To: <200001191503.HAA04869@silvia.hip.berkeley.edu>; from asami@cs.berkeley.edu on Wed, Jan 19, 2000 at 07:03:04AM -0800 References: <200001191503.HAA04869@silvia.hip.berkeley.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <tobez@plab.ku.dk> The Protein Laboratory, University of Copenhagen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000120004551.A13892>