Add POSIX NSIG_MAX & _SC_NSIG

Signed-off-by: Ricardo Branco <rbranco@suse.de>
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1710
Closes: https://github.com/freebsd/freebsd-src/pull/1710
This commit is contained in:
Ricardo Branco 2025-05-25 11:48:04 +02:00 committed by Warner Losh
parent 94828b3380
commit 86f06e612b
3 changed files with 7 additions and 0 deletions

View file

@ -139,6 +139,7 @@
#if __POSIX_VISIBLE >= 202405
#define GETENTROPY_MAX 256
#define NSIG_MAX 128 /* _SIG_MAXSIG from <signal.h> */
#endif
#include <sys/limits.h>

View file

@ -295,6 +295,10 @@ typedef __useconds_t useconds_t;
#define _SC_UEXTERR_MAXLEN 123 /* user */
#endif
#if __POSIX_VISIBLE >= 202405
#define _SC_NSIG 124
#endif
/* Extensions found in Solaris and Linux. */
#define _SC_PHYS_PAGES 121

View file

@ -287,6 +287,8 @@ do_NAME_MAX:
mib[0] = CTL_P1003_1B;
mib[1] = CTL_P1003_1B_MQ_OPEN_MAX;
goto yesno;
case _SC_NSIG:
return (_SIG_MAXSIG);
case _SC_PAGESIZE:
return (getpagesize());
case _SC_RTSIG_MAX: