From: Rich Felker Date: Thu, 5 Mar 2015 03:10:01 +0000 (-0500) Subject: add legacy functions from sysinfo.h duplicating sysconf functionality X-Git-Tag: v1.1.7~17 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2b42c8cb37a3ef115bd04de8637078e43cd72f37;p=oweals%2Fmusl.git add legacy functions from sysinfo.h duplicating sysconf functionality --- diff --git a/src/conf/legacy.c b/src/conf/legacy.c new file mode 100644 index 00000000..f1d9e325 --- /dev/null +++ b/src/conf/legacy.c @@ -0,0 +1,22 @@ +#include +#include + +int get_nprocs_conf() +{ + return sysconf(_SC_NPROCESSORS_CONF); +} + +int get_nprocs() +{ + return sysconf(_SC_NPROCESSORS_ONLN); +} + +long get_phys_pages() +{ + return sysconf(_SC_PHYS_PAGES); +} + +long get_avphys_pages() +{ + return sysconf(_SC_AVPHYS_PAGES); +}