Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62053 - trunk/libs/thread/src/pthread
From: anthony_at_[hidden]
Date: 2010-05-17 04:22:15


Author: anthonyw
Date: 2010-05-17 04:22:14 EDT (Mon, 17 May 2010)
New Revision: 62053
URL: http://svn.boost.org/trac/boost/changeset/62053

Log:
Test for __APPLE__ before _GNU_SOURCE so we can compile on Intel/Darwin

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-05-17 04:22:14 EDT (Mon, 17 May 2010)
@@ -381,12 +381,12 @@
     {
 #if defined(PTW32_VERSION) || defined(__hpux)
         return pthread_num_processors_np();
-#elif defined(_GNU_SOURCE)
- return get_nprocs();
 #elif defined(__APPLE__) || defined(__FreeBSD__)
         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;


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