summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemInformation.cxx
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2008-10-16 23:30:49 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2008-10-16 23:30:49 (GMT)
commit8e5886e6529ddf47a0b3dc96849817b17c371fb2 (patch)
treec193039d27a0d5dcfbbfcbcf1e98ef1334038caf /Source/kwsys/SystemInformation.cxx
parentb55f7a261f9aa57aca528e4f4e047e87a003b3fd (diff)
downloadCMake-8e5886e6529ddf47a0b3dc96849817b17c371fb2.zip
CMake-8e5886e6529ddf47a0b3dc96849817b17c371fb2.tar.gz
CMake-8e5886e6529ddf47a0b3dc96849817b17c371fb2.tar.bz2
ENH: fix for Vista
Diffstat (limited to 'Source/kwsys/SystemInformation.cxx')
-rw-r--r--Source/kwsys/SystemInformation.cxx23
1 files changed, 15 insertions, 8 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 373f959..45fc9b6 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -2980,15 +2980,22 @@ bool SystemInformationImplementation::QueryOSInformation()
{
if (osvi.wProductType == VER_NT_WORKSTATION)
{
-// VER_SUITE_PERSONAL may not be defined
-#ifdef VER_SUITE_PERSONAL
- if (osvi.wSuiteMask & VER_SUITE_PERSONAL)
+ if (osvi.dwMajorVersion == 6)
{
- this->OSRelease += " Personal";
+ this->OSRelease = "Vista";
}
- else
+// VER_SUITE_PERSONAL may not be defined
+#ifdef VER_SUITE_PERSONAL
+ else
{
- this->OSRelease += " Professional";
+ if (osvi.wSuiteMask & VER_SUITE_PERSONAL)
+ {
+ this->OSRelease += " Personal";
+ }
+ else
+ {
+ this->OSRelease += " Professional";
+ }
}
#endif
}
@@ -3015,7 +3022,7 @@ bool SystemInformationImplementation::QueryOSInformation()
}
}
- sprintf (operatingSystem, "%s(Build %ld)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF);
+ sprintf (operatingSystem, "%s (Build %ld)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF);
this->OSVersion = operatingSystem;
}
else
@@ -3095,7 +3102,7 @@ bool SystemInformationImplementation::QueryOSInformation()
else
{
// Windows 2000 and everything else.
- sprintf (operatingSystem,"%s(Build %ld)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF);
+ sprintf (operatingSystem,"%s (Build %ld)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF);
this->OSVersion = operatingSystem;
}
break;