Thus spake Satoshi - Ports Wraith - Asami ([EMAIL PROTECTED]):

> Langer.  It has a nice feature of working for both -current and
> -stable without any additional #ifdef's.  I hope it's ok.

I now saw Garret Wollman's function.
I like the use of the static-vars.

The use of sigemptyset makes it more transparenter for later changes,
that I hope won't occur, but at the moment it doesn't matter since
sigemptyset is 

int
sigemptyset(set)
        sigset_t *set;
{
        int i;

        for (i = 0; i < _SIG_WORDS; i++)
                set->__bits[i] = 0;
        return (0);
}

I attached a patch against patch-lo anyways (sorry ;-)

Alex
-- 
I doubt, therefore I might be. 
--- /tmp/xview/patches/patch-lo Thu Jan 20 04:38:25 2000
+++ patch-lo    Mon Jan 24 17:14:58 2000
@@ -20,15 +20,17 @@
        union   wait status;            /* Return value from wait3 */
  #else SVR4
        int     status;         /* Return value from wait3 */
-@@ -188,7 +197,12 @@
+@@ -188,7 +197,14 @@
  #define sigisempty(s)   (!(((s)->__sigbits[0]) | ((s)->__sigbits[1])   \
                          | ((s)->__sigbits[2]) | ((s)->__sigbits[3])))
  #else
 -#define sigisempty(s)   (!(*(s)))
 +static int
 +sigisempty (sigset_t *s) {
-+      sigset_t n;      
-+      bzero(&n, sizeof(sigset_t));
++      static sigset_t n;      
++      static int emptied = 0;
++      if (!emptied)
++              sigemptyset(&n), emptied++;
 +      return (! memcmp(&n, s, sizeof(sigset_t)));
 +}
  #endif

Reply via email to