summaryrefslogtreecommitdiffstats
path: root/ProcessWin32.c
diff options
context:
space:
mode:
authorKWSys Robot <kwrobot@kitware.com>2014-09-25 12:49:50 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-26 13:34:21 (GMT)
commita79ff0e4ed526f8ac0bb8f00201abf3d145fd7dd (patch)
tree3a943ae63db55d0597a5dbbd797fdd94951a7270 /ProcessWin32.c
parent92b582a67e3ea29d7a958952c0a3dfd7706b2c9f (diff)
downloadCMake-a79ff0e4ed526f8ac0bb8f00201abf3d145fd7dd.zip
CMake-a79ff0e4ed526f8ac0bb8f00201abf3d145fd7dd.tar.gz
CMake-a79ff0e4ed526f8ac0bb8f00201abf3d145fd7dd.tar.bz2
KWSys 2014-09-25 (29ffaf43)
Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ 29ffaf43 | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' fb77be5a..29ffaf43 Brad King (1): 29ffaf43 Suppress deprecation warnings for GetVersionEx Sean McBride (1): 6aa1f800 SystemInformation: Fix clang -Wtautological-pointer-compare warning Change-Id: I29f3dcf2a32e1b80bade233987eb091038aace65
Diffstat (limited to 'ProcessWin32.c')
-rw-r--r--ProcessWin32.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ProcessWin32.c b/ProcessWin32.c
index c8ec754..ef71f26 100644
--- a/ProcessWin32.c
+++ b/ProcessWin32.c
@@ -36,6 +36,9 @@ a UNIX-style select system call.
#pragma warning (push, 1)
#endif
#include <windows.h> /* Windows API */
+#if defined(_MSC_VER) && _MSC_VER >= 1800
+# define KWSYS_WINDOWS_DEPRECATED_GetVersionEx
+#endif
#include <string.h> /* strlen, strdup */
#include <stdio.h> /* sprintf */
#include <io.h> /* _unlink */
@@ -335,7 +338,14 @@ kwsysProcess* kwsysProcess_New(void)
windows. */
ZeroMemory(&osv, sizeof(osv));
osv.dwOSVersionInfoSize = sizeof(osv);
+#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
+# pragma warning (push)
+# pragma warning (disable:4996)
+#endif
GetVersionEx(&osv);
+#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
+# pragma warning (pop)
+#endif
if(osv.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
/* Win9x no longer supported. */
@@ -2370,7 +2380,14 @@ static kwsysProcess_List* kwsysProcess_List_New(void)
/* Select an implementation. */
ZeroMemory(&osv, sizeof(osv));
osv.dwOSVersionInfoSize = sizeof(osv);
+#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
+# pragma warning (push)
+# pragma warning (disable:4996)
+#endif
GetVersionEx(&osv);
+#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
+# pragma warning (pop)
+#endif
self->NT4 = (osv.dwPlatformId == VER_PLATFORM_WIN32_NT &&
osv.dwMajorVersion < 5)? 1:0;