Mercurial > hg > octave-kai > gnulib-hg
changeset 13884:b85247a468f0
nproc: Fix condition.
* lib/nproc.c: Test HAVE_PTHREAD_GETAFFINITY_NP, not
HAVE_PTHREAD_AFFINITY_NP.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 20 Nov 2010 13:42:17 +0100 |
parents | 92b602471ee0 |
children | 87a95303747f |
files | ChangeLog lib/nproc.c |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-11-20 Bruno Haible <bruno@clisp.org> + + nproc: Fix condition. + * lib/nproc.c: Test HAVE_PTHREAD_GETAFFINITY_NP, not + HAVE_PTHREAD_AFFINITY_NP. + 2010-11-20 Bruno Haible <bruno@clisp.org> Fix a comment.
--- a/lib/nproc.c +++ b/lib/nproc.c @@ -24,7 +24,7 @@ #include <stdlib.h> #include <unistd.h> -#if HAVE_PTHREAD_AFFINITY_NP && 0 +#if HAVE_PTHREAD_GETAFFINITY_NP && 0 # include <pthread.h> # include <sched.h> #endif @@ -71,7 +71,7 @@ Therefore this code is not enabled. glibc >= 2.3.4 has sched_getaffinity whereas NetBSD 5 has sched_getaffinity_np. */ -#if HAVE_PTHREAD_AFFINITY_NP && defined __GLIBC__ && 0 +#if HAVE_PTHREAD_GETAFFINITY_NP && defined __GLIBC__ && 0 { cpu_set_t set; @@ -94,7 +94,7 @@ return count; } } -#elif HAVE_PTHREAD_AFFINITY_NP && defined __NetBSD__ && 0 +#elif HAVE_PTHREAD_GETAFFINITY_NP && defined __NetBSD__ && 0 { cpuset_t *set;