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 70b9ceb..294b3aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-11-20  Bruno Haible  <bruno@clisp.org>
 
 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.
        * lib/vasnprintf.c (VASNPRINTF): Fix comment.
 
        Fix a comment.
        * lib/vasnprintf.c (VASNPRINTF): Fix comment.
 
index 90b568e..80481e9 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 
 #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
 # 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.  */
      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;
 
   {
     cpu_set_t set;
 
@@ -94,7 +94,7 @@ num_processors_via_affinity_mask (void)
           return count;
       }
   }
           return count;
       }
   }
-#elif HAVE_PTHREAD_AFFINITY_NP && defined __NetBSD__ && 0
+#elif HAVE_PTHREAD_GETAFFINITY_NP && defined __NetBSD__ && 0
   {
     cpuset_t *set;
 
   {
     cpuset_t *set;