From owner-freebsd-current Wed Jan 19 15:46:10 2000 Delivered-To: freebsd-current@freebsd.org Received: from plab.ku.dk (plab.ku.dk [130.225.105.65]) by hub.freebsd.org (Postfix) with ESMTP id 1312115341 for ; Wed, 19 Jan 2000 15:46:07 -0800 (PST) (envelope-from tobez@plab.ku.dk) Received: (from tobez@localhost) by plab.ku.dk (8.9.3/8.9.3) id AAA14011; Thu, 20 Jan 2000 00:45:51 +0100 (CET) (envelope-from tobez) Date: Thu, 20 Jan 2000 00:45:51 +0100 From: Anton Berezin To: Satoshi Asami Cc: current@FreeBSD.ORG Subject: Re: sigisempty? Message-ID: <20000120004551.A13892@plab.ku.dk> References: <200001191503.HAA04869@silvia.hip.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001191503.HAA04869@silvia.hip.berkeley.edu>; from asami@cs.berkeley.edu on Wed, Jan 19, 2000 at 07:03:04AM -0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 The Protein Laboratory, University of Copenhagen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message