Merge branch 'vendor/BINUTILS221'
[dragonfly.git] / contrib / opie / libmissing / sigaddset.c
1 /* sigaddset.c: A replacement for the sigaddset function
2
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>.
8
9         History:
10
11         Created by cmetz for OPIE 2.2.
12 */
13
14 #include "opie_cfg.h"
15
16 #ifndef _NSIG
17 #ifdef NSIG
18 #define _NSIG NSIG
19 #else /* NSIG */
20 #define _NSIG 32
21 #endif /* NSIG */
22 #endif /* _NSIG */
23
24 #include "opie.h"
25
26 int sigaddset FUNCTION((set, signum), sigset_t *set AND int signum)
27 {
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) */
34
35         return 0;
36 }