nproc: Fix condition.
authorBruno Haible <bruno@clisp.org>
Sat, 20 Nov 2010 12:42:17 +0000 (13:42 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 20 Nov 2010 12:42:17 +0000 (13:42 +0100)
* lib/nproc.c: Test HAVE_PTHREAD_GETAFFINITY_NP, not
HAVE_PTHREAD_AFFINITY_NP.

ChangeLog
lib/nproc.c

index 70b9ceb2dddc99fac340b4b189b43c87487b20f5..294b3aabff5b297d9fe3b66a1ad43e277e269e07 100644 (file)
--- 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.
index 90b568eb37ff083073b595b5592a1830eca44cf0..80481e9405aa576665f4f8d9bfbc41a6a5f1d78b 100644 (file)
@@ -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 @@ num_processors_via_affinity_mask (void)
      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 @@ num_processors_via_affinity_mask (void)
           return count;
       }
   }
-#elif HAVE_PTHREAD_AFFINITY_NP && defined __NetBSD__ && 0
+#elif HAVE_PTHREAD_GETAFFINITY_NP && defined __NetBSD__ && 0
   {
     cpuset_t *set;