diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-01-09 11:45:37 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-01-09 11:45:37 -0600 |
commit | e9de57c22ec7de6c148bab3fefa54584a6039ab8 (patch) | |
tree | 89fee1a1df9783e5bd07f8fe1aa60fb1a4ef6617 /getconf | |
parent | b87ab558c6082608dbee68f9a2219bb5fbeee86d (diff) | |
download | shimmy-e9de57c22ec7de6c148bab3fefa54584a6039ab8.tar.gz shimmy-e9de57c22ec7de6c148bab3fefa54584a6039ab8.tar.bz2 shimmy-e9de57c22ec7de6c148bab3fefa54584a6039ab8.tar.xz shimmy-e9de57c22ec7de6c148bab3fefa54584a6039ab8.zip |
getconf(1): Add _NPROCESSORS_ONLN variable on supported systems
Diffstat (limited to 'getconf')
-rw-r--r-- | getconf/getconf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/getconf/getconf.c b/getconf/getconf.c index 01265f1..fc707c6 100644 --- a/getconf/getconf.c +++ b/getconf/getconf.c @@ -322,6 +322,11 @@ const var_map_t sysconf_vars[] = { #else /* NetBSD */ { "_XOPEN_VERSION", _UNDEFINED_VARIABLE_ }, #endif +#if defined(_SC_NPROCESSORS_ONLN) + { "_NPROCESSORS_ONLN", _SC_NPROCESSORS_ONLN }, +#else /* only available on Linux, Solaris, AIX, Mac OS X */ + { "_NPROCESSORS_ONLN", _UNDEFINED_VARIABLE_ }, +#endif { "POSIX2_LINE_MAX", SHIMMY_POSIX2_LINE_MAX }, { "INT_MAX", SHIMMY_INT_MAX } |