You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2012/08/08 16:09:30 UTC

svn commit: r1370779 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp

Author: tabish
Date: Wed Aug  8 14:09:30 2012
New Revision: 1370779

URL: http://svn.apache.org/viewvc?rev=1370779&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQCPP-417 HPUX aCC

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp?rev=1370779&r1=1370778&r2=1370779&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp Wed Aug  8 14:09:30 2012
@@ -51,6 +51,9 @@
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
+#if defined(__HP_aCC)
+#include <sys/mpctl.h>
+#endif
 
 #include <cstdlib>
 
@@ -511,6 +514,8 @@ int System::availableProcessors() {
     len = sizeof(numCpus);
     sysctl(mib, 2, &numCpus, &len, NULL, 0);
 
+#elif defined(__HP_aCC)
+    numCpus = (int)mpctl(MPC_GETNUMSPUS, NULL, NULL);
 #else
 
     // returns number of online(_SC_NPROCESSORS_ONLN) processors, number configured(_SC_NPROCESSORS_CONF)