diff options
author | Brad King <brad.king@kitware.com> | 2014-09-26 13:34:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-09-26 13:34:26 (GMT) |
commit | 208530090dd2707d39f2264b3a7dfe2c0428b583 (patch) | |
tree | ea9eb190258a4f2311796b0f1639731755ab1ff6 /Source/kwsys/SystemInformation.cxx | |
parent | 4551a53c119b71473feaa9342d891c098819e8aa (diff) | |
parent | a79ff0e4ed526f8ac0bb8f00201abf3d145fd7dd (diff) | |
download | CMake-208530090dd2707d39f2264b3a7dfe2c0428b583.zip CMake-208530090dd2707d39f2264b3a7dfe2c0428b583.tar.gz CMake-208530090dd2707d39f2264b3a7dfe2c0428b583.tar.bz2 |
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/SystemInformation.cxx')
-rw-r--r-- | Source/kwsys/SystemInformation.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index 2521aac..84b5f39 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -60,6 +60,9 @@ #if defined(_WIN32) # include <windows.h> +# if defined(_MSC_VER) && _MSC_VER >= 1800 +# define KWSYS_WINDOWS_DEPRECATED_GetVersionEx +# endif # include <errno.h> # if defined(KWSYS_SYS_HAS_PSAPI) # include <psapi.h> @@ -3786,7 +3789,7 @@ bool SystemInformationImplementation::QueryLinuxMemory() return false; } - if( unameInfo.release!=0 && strlen(unameInfo.release)>=3 ) + if( strlen(unameInfo.release)>=3 ) { // release looks like "2.6.3-15mdk-i686-up-4GB" char majorChar=unameInfo.release[0]; @@ -5063,6 +5066,10 @@ bool SystemInformationImplementation::QueryOSInformation() // Try calling GetVersionEx using the OSVERSIONINFOEX structure. ZeroMemory (&osvi, sizeof (OSVERSIONINFOEXW)); osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEXW); +#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx +# pragma warning (push) +# pragma warning (disable:4996) +#endif bOsVersionInfoEx = GetVersionExW ((OSVERSIONINFOW*)&osvi); if (!bOsVersionInfoEx) { @@ -5072,6 +5079,9 @@ bool SystemInformationImplementation::QueryOSInformation() return false; } } +#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx +# pragma warning (pop) +#endif switch (osvi.dwPlatformId) { |