ncurses: Add few missing dependencies.
[dragonfly.git] / contrib / opie / libmissing / sigaddset.c
blob56a613bf68c95802171dd419de97cafd9789342a
1 /* sigaddset.c: A replacement for the sigaddset function
3 %%% copyright-cmetz
4 This software is Copyright 1996 by Craig Metz, All Rights Reserved.
5 The Inner Net License Version 2 applies to this software.
6 You should have received a copy of the license with this software. If
7 you didn't get a copy, you may request one from <license@inner.net>.
9 History:
11 Created by cmetz for OPIE 2.2.
14 #include "opie_cfg.h"
16 #ifndef _NSIG
17 #ifdef NSIG
18 #define _NSIG NSIG
19 #else /* NSIG */
20 #define _NSIG 32
21 #endif /* NSIG */
22 #endif /* _NSIG */
24 #include "opie.h"
26 int sigaddset FUNCTION((set, signum), sigset_t *set AND int signum)
28 #if sizeof(sigset_t) != sizeof(int)
29 Sorry, we don't currently support your system.
30 #else /* sizeof(sigset_t) != sizeof(int) */
31 if (set && (signum > 0) && (signum < _NSIG))
32 *set |= 1 << (signum - 1);
33 #endif /* sizeof(sigset_t) != sizeof(int) */
35 return 0;