From 57c3ef1d31e041cfefe17fac0c2f432761e4de23 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Tue, 20 Jan 2015 10:57:26 -0500
Subject: [PATCH] Suppress deprecation warnings for GetVersionEx on Intel
 compiler

In commit 29ffaf43 (Suppress deprecation warnings for GetVersionEx,
2014-09-25) we used #pragma to disable warnings on MSVC.  Update
the logic to use the proper warning number for the Intel compiler.

Change-Id: Idddca1814c645b76f7e823c0028ee2209ee4fb57
---
 ProcessWin32.c        | 12 ++++++++++--
 SystemInformation.cxx |  6 +++++-
 SystemTools.cxx       |  6 +++++-
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/ProcessWin32.c b/ProcessWin32.c
index ef71f26..c2965ea 100644
--- a/ProcessWin32.c
+++ b/ProcessWin32.c
@@ -340,7 +340,11 @@ kwsysProcess* kwsysProcess_New(void)
   osv.dwOSVersionInfoSize = sizeof(osv);
 #ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
 # pragma warning (push)
-# pragma warning (disable:4996)
+# ifdef __INTEL_COMPILER
+#  pragma warning (disable:1478)
+# else
+#  pragma warning (disable:4996)
+# endif
 #endif
   GetVersionEx(&osv);
 #ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
@@ -2382,7 +2386,11 @@ static kwsysProcess_List* kwsysProcess_List_New(void)
   osv.dwOSVersionInfoSize = sizeof(osv);
 #ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
 # pragma warning (push)
-# pragma warning (disable:4996)
+# ifdef __INTEL_COMPILER
+#  pragma warning (disable:1478)
+# else
+#  pragma warning (disable:4996)
+# endif
 #endif
   GetVersionEx(&osv);
 #ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index 3d5e728..9c7ceee 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -5069,7 +5069,11 @@ bool SystemInformationImplementation::QueryOSInformation()
   osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEXW);
 #ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
 # pragma warning (push)
-# pragma warning (disable:4996)
+# ifdef __INTEL_COMPILER
+#  pragma warning (disable:1478)
+# else
+#  pragma warning (disable:4996)
+# endif
 #endif
   bOsVersionInfoEx = GetVersionExW ((OSVERSIONINFOW*)&osvi);
   if (!bOsVersionInfoEx)
diff --git a/SystemTools.cxx b/SystemTools.cxx
index c2b6097..2708211 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -4732,7 +4732,11 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion()
 
 #ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
 # pragma warning (push)
-# pragma warning (disable:4996)
+# ifdef __INTEL_COMPILER
+#  pragma warning (disable:1478)
+# else
+#  pragma warning (disable:4996)
+# endif
 #endif
   bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *)&osvi);
   if (!bOsVersionInfoEx)
-- 
GitLab