Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63701 - trunk/libs/thread/src/pthread
From: anthony_at_[hidden]
Date: 2010-07-06 11:12:22


Author: anthonyw
Date: 2010-07-06 11:12:21 EDT (Tue, 06 Jul 2010)
New Revision: 63701
URL: http://svn.boost.org/trac/boost/changeset/63701

Log:
Moved the test for _GNU_SOURCE to last to try and fix issue #4395

Text files modified:
   trunk/libs/thread/src/pthread/thread.cpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/libs/thread/src/pthread/thread.cpp
==============================================================================
--- trunk/libs/thread/src/pthread/thread.cpp (original)
+++ trunk/libs/thread/src/pthread/thread.cpp 2010-07-06 11:12:21 EDT (Tue, 06 Jul 2010)
@@ -379,11 +379,11 @@
         int count;
         size_t size=sizeof(count);
         return sysctlbyname("hw.ncpu",&count,&size,NULL,0)?0:count;
-#elif defined(_GNU_SOURCE)
- return get_nprocs();
 #elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN)
         int const count=sysconf(_SC_NPROCESSORS_ONLN);
         return (count>0)?count:0;
+#elif defined(_GNU_SOURCE)
+ return get_nprocs();
 #else
         return 0;
 #endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk