summaryrefslogtreecommitdiffstats
path: root/plugins/common.h
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-08-19 20:47:36 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-08-19 20:47:36 (GMT)
commit5f79e3e9f62ca5487d9881973149136ba1d19d3e (patch)
treef79271783e73d4ed452f510cac3efc6d240750a6 /plugins/common.h
parenta0640011730d830c562c87ca0bc6237c404146ea (diff)
downloadmonitoring-plugins-5f79e3e9f62ca5487d9881973149136ba1d19d3e.tar.gz
Clean up check for _SC_NPROCESSORS_ONLN
Closes #62.
Diffstat (limited to 'plugins/common.h')
-rw-r--r--plugins/common.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/common.h b/plugins/common.h
index 858329f..8f05c15 100644
--- a/plugins/common.h
+++ b/plugins/common.h
@@ -82,14 +82,12 @@
82 getting that data 82 getting that data
83 Will return -1 if cannot get data 83 Will return -1 if cannot get data
84*/ 84*/
85#ifdef HAVE_SYSCONF__SC_NPROCESSORS_ONLN 85#if defined(HAVE_SYSCONF__SC_NPROCESSORS_ONLN)
86#define GET_NUMBER_OF_CPUS() sysconf(_SC_NPROCESSORS_ONLN) 86# define GET_NUMBER_OF_CPUS() sysconf(_SC_NPROCESSORS_ONLN)
87#elif defined (HAVE_SYSCONF__SC_NPROCESSORS_CONF)
88# define GET_NUMBER_OF_CPUS() sysconf(_SC_NPROCESSORS_CONF)
87#else 89#else
88# ifdef HAVE_SYSCONF__SC_NPROCESSORS_CONF 90# define GET_NUMBER_OF_CPUS() -1
89# define GET_NUMBER_OF_CPUS() sysconf(_SC_NPROCESSORS_CONF)
90# else
91# define GET_NUMBER_OF_CPUS() -1
92# endif
93#endif 91#endif
94 92
95#ifdef TIME_WITH_SYS_TIME 93#ifdef TIME_WITH_SYS_TIME