summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceGrid/PlatformInfo.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp
index d2b2e813997..67bc0a95db5 100644
--- a/cpp/src/IceGrid/PlatformInfo.cpp
+++ b/cpp/src/IceGrid/PlatformInfo.cpp
@@ -188,7 +188,26 @@ PlatformInfo::PlatformInfo(const string& prefix,
os << osInfo.dwMajorVersion << "." << osInfo.dwMinorVersion;
_release = os.str();
_version = osInfo.szCSDVersion;
- _machine = "x86"; // TODO?
+
+ switch(sysInfo.wProcessorArchitecture)
+ {
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+ case 9: // PROCESSOR_ARCHITECTURE_AMD64
+#else
+ case PROCESSOR_ARCHITECTURE_AMD64:
+#endif
+ _machine = "x64";
+ break;
+ case PROCESSOR_ARCHITECTURE_IA64:
+ _machine = "IA64";
+ break;
+ case PROCESSOR_ARCHITECTURE_INTEL:
+ _machine = "x86";
+ break;
+ default:
+ _machine = "unknown";
+ break;
+ };
#else
struct utsname utsinfo;
uname(&utsinfo);