#include #include int sigismember(const sigset_t *set, int sig) { unsigned s = sig-1U; if (s >= _NSIG-1) { errno = EINVAL; return -1; } return !!(set->__bits[s/8/sizeof *set->__bits] & 1UL<<(s&8*sizeof *set->__bits-1)); }