mirror of
https://github.com/sheumann/hush.git
synced 2024-12-23 05:29:58 +00:00
Fix sigaddset/sigdelset/sigismember macros to support signals above 16.
The versions in the GNO 2.0.6 headers are broken--they don't account for int being 16-bit, so they cut off the higher signals.
This commit is contained in:
parent
01dbfccea6
commit
ba2aa925bc
@ -24,6 +24,15 @@
|
||||
# define sigemptyset(s) __sigemptyset(s)
|
||||
# define sigisemptyset(s) __sigisemptyset(s)
|
||||
#endif
|
||||
#ifdef __GNO__
|
||||
/* Redefine these because GNO 2.0.6 definitions only support signals up to 16 */
|
||||
# undef sigaddset
|
||||
# undef sigdelset
|
||||
# undef sigismember
|
||||
# define sigaddset(set, signo) (*(set) |= (sigset_t)1 << ((signo) - 1), 0)
|
||||
# define sigdelset(set, signo) (*(set) &= ~((sigset_t)1 << ((signo) - 1)), 0)
|
||||
# define sigismember(set, signo) ((*(set) & ((sigset_t)1 << ((signo) - 1))) != 0)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
Loading…
Reference in New Issue
Block a user