they were leaving junk in the upper bits.
int sigemptyset(sigset_t *set)
{
set->__bits[0] = 0;
- if (sizeof(long)==4) set->__bits[1] = 0;
+ if (sizeof(long)==4 || _NSIG > 65) set->__bits[1] = 0;
+ if (sizeof(long)==4 && _NSIG > 65) {
+ set->__bits[2] = 0;
+ set->__bits[3] = 0;
+ }
return 0;
}
#if ULONG_MAX == 0xffffffff
set->__bits[0] = 0x7ffffffful;
set->__bits[1] = 0xfffffffcul;
+ if (_NSIG > 65) {
+ set->__bits[2] = 0xfffffffful;
+ set->__bits[3] = 0xfffffffful;
+ }
#else
set->__bits[0] = 0xfffffffc7ffffffful;
+ if (_NSIG > 65) set->__bits[1] = 0xfffffffffffffffful;
#endif
return 0;
}