fix sigemptyset and sigfillset for mips
they were leaving junk in the upper bits.
This commit is contained in:
parent
cffb9e1ee2
commit
0753b1faf0
2 changed files with 10 additions and 1 deletions
|
|
@ -4,6 +4,10 @@
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,13 @@ int sigfillset(sigset_t *set)
|
|||
#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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue