commit | aa7ea4121f2671b22eaa87e39a33cca72938aab7 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri Jan 24 11:38:05 2025 -0800 |
committer | Elliott Hughes <enh@google.com> | Fri Jan 24 11:38:05 2025 -0800 |
tree | ae67fb13ebd3c001e05dda9578c5dc68e60403b2 | |
parent | d597a90b4bf8441b779b1500bed7c7d0dc66a97a [diff] |
Add _SC_NSIG. https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/sysconf.html (2024) says "Austin Group Defect 741 is applied, adding _SC_NSIG". Change-Id: Ic8372105bac153403ab41369805c46322c25013e
diff --git a/libc/bionic/sysconf.cpp b/libc/bionic/sysconf.cpp index 571370c..03822ed 100644 --- a/libc/bionic/sysconf.cpp +++ b/libc/bionic/sysconf.cpp
@@ -210,6 +210,7 @@ // are vestigial anyway, so the "maximum maximum" of NGROUPS_MAX is a good // enough answer for _SC_NGROUPS_MAX... return NGROUPS_MAX; + case _SC_NSIG: return NSIG; case _SC_PASS_MAX: return PASS_MAX; case _SC_2_C_BIND: return _POSIX2_C_BIND; case _SC_2_C_DEV: return _POSIX2_C_DEV;
diff --git a/libc/include/bits/sysconf.h b/libc/include/bits/sysconf.h index ecf26ba..303f7c6 100644 --- a/libc/include/bits/sysconf.h +++ b/libc/include/bits/sysconf.h
@@ -328,6 +328,8 @@ #define _SC_LEVEL4_CACHE_ASSOC 0x009c /** sysconf() query for the L4 cache line size. Not available on all architectures. */ #define _SC_LEVEL4_CACHE_LINESIZE 0x009d +/** sysconf() query equivalent to NSIG. Available from API level 37. */ +#define _SC_NSIG 0x009e __BEGIN_DECLS