<<On Wed, 19 Jan 2000 07:03:04 -0800 (PST), [EMAIL PROTECTED] (Satoshi Asami) said:

> 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.

int
sigisempty(sigset_t *my_sigset)
{
        static sigset_t empty_ss;
        static int emptied;

        if (!emptied) {
                sigemptyset(&empty_ss);
                emptied++;
        }

        return (memcmp(my_sigset, &empty_ss, sizeof empty_ss) == 0);
}

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
[EMAIL PROTECTED]  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA|                     - Susan Aglukark and Chad Irschick


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

Reply via email to