From bb068603890060dfa20426192518aafcb1763e1c Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Thu, 4 Jan 2001 02:52:13 +0000 Subject: [PATCH] CPU detection for IRIX. --- lib/isc/unix/os.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/isc/unix/os.c b/lib/isc/unix/os.c index a8c11e9772..c6bcbf0a31 100644 --- a/lib/isc/unix/os.c +++ b/lib/isc/unix/os.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: os.c,v 1.5 2000/08/01 01:31:25 tale Exp $ */ +/* $Id: os.c,v 1.6 2001/01/04 02:52:13 bwelling Exp $ */ #include @@ -27,8 +27,12 @@ unsigned int isc_os_ncpus(void) { long ncpus = 1; -#if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN) +#if defined(HAVE_SYSCONF) +#if defined(_SC_NPROCESSORS_ONLN) ncpus = sysconf(_SC_NPROCESSORS_ONLN); +#elif defined(_SC_NPROC_ONLN) + ncpus = sysconf(_SC_NPROC_ONLN); +#endif if (ncpus <= 0) ncpus = 1; #endif