diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-09-27 13:30:09 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-09-27 13:30:09 +0000 |
commit | 3cfd5f9b0feeeb79974dce3e33a79450bfb18ffa (patch) | |
tree | 30ad8640246c4865135beae34f8402c292fbc057 /cpp/src/IceGrid/PlatformInfo.cpp | |
parent | Fixes to support a little more information for nodes. (diff) | |
download | ice-3cfd5f9b0feeeb79974dce3e33a79450bfb18ffa.tar.bz2 ice-3cfd5f9b0feeeb79974dce3e33a79450bfb18ffa.tar.xz ice-3cfd5f9b0feeeb79974dce3e33a79450bfb18ffa.zip |
Win32 fixes
Diffstat (limited to 'cpp/src/IceGrid/PlatformInfo.cpp')
-rw-r--r-- | cpp/src/IceGrid/PlatformInfo.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp index 347ea5f19db..607a88f3101 100644 --- a/cpp/src/IceGrid/PlatformInfo.cpp +++ b/cpp/src/IceGrid/PlatformInfo.cpp @@ -7,7 +7,11 @@ // // ********************************************************************** +#include <Ice/LocalException.h> +#include <Ice/LoggerUtil.h> + #include <IceGrid/PlatformInfo.h> +#include <IceGrid/TraceLevels.h> #if !defined(_WIN32) # include <sys/utsname.h> @@ -26,7 +30,7 @@ using namespace std; using namespace IceGrid; -PlatformInfo::PlatformInfo() +PlatformInfo::PlatformInfo(const TraceLevelsPtr& traceLevels) : _traceLevels(traceLevels) { // // Initialization of the necessary data structures to get the load average. @@ -78,7 +82,9 @@ PlatformInfo::PlatformInfo() // // Get the number of processors. // -#if defined(__APPLE__) +#if defined(_WIN32) + _info.nProcessors = 1; +#elif defined(__APPLE__) static int ncpu[2] = { CTL_HW, HW_NCPU }; size_t sz = sizeof(_info.nProcessors); if(sysctl(ncpu, 2, &_info.nProcessors, &sz, 0, 0) == -1) |