8000 Add POSIX NSIG_MAX & _SC_NSIG · freebsd/freebsd-src@f459f50 · GitHub
[go: up one dir, main page]

Skip to content

Commit f459f50

Browse files
Add POSIX NSIG_MAX & _SC_NSIG
Signed-off-by: Ricardo Branco <rbranco@suse.de>
1 parent 14ec281 commit f459f50

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

include/limits.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139

140140
#if __POSIX_VISIBLE >= 202405
141141
#define GETENTROPY_MAX 256
142+
#define NSIG_MAX 128 /* _SIG_MAXSIG from <signal.h> */
142143
#endif
143144

144145
#include <sys/limits.h>

include/unistd.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <sys/unistd.h>
3737
#include <sys/_null.h>
3838
#include <sys/_types.h>
39+
#include <sys/_sigset.h>
3940

4041
#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
4142
#include <ssp/unistd.h>
@@ -294,6 +295,10 @@ typedef __useconds_t useconds_t;
294295
#define _SC_CPUSET_SIZE 122
295296
#endif
296297

298+
#if __POSIX_VISIBLE >= 202405
299+
#define _SC_NSIG 123
300+
#endif
301+
297302
/* Extensions found in Solaris and Linux. */
298303
#define _SC_PHYS_PAGES 121
299304

lib/libc/gen/sysconf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ sysconf(int name)
286286
mib[0] = CTL_P1003_1B;
287287
mib[1] = CTL_P1003_1B_MQ_OPEN_MAX;
288288
goto yesno;
289+
case _SC_NSIG:
290+
return (_SIG_MAXSIG);
289291
case _SC_PAGESIZE:
290292
return (getpagesize());
291293
case _SC_RTSIG_MAX:

0 commit comments

Comments
 (0)
0