summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/kmp.h')
-rw-r--r--openmp/runtime/src/kmp.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h
index 3a99cded773..c09f4b2d7ec 100644
--- a/openmp/runtime/src/kmp.h
+++ b/openmp/runtime/src/kmp.h
@@ -544,11 +544,15 @@ typedef int PACKED_REDUCTION_METHOD_T;
#if KMP_OS_WINDOWS
#define USE_CBLKDATA
+#if KMP_MSVC_COMPAT
#pragma warning(push)
#pragma warning(disable : 271 310)
+#endif
#include <windows.h>
+#if KMP_MSVC_COMPAT
#pragma warning(pop)
#endif
+#endif
#if KMP_OS_UNIX
#include <dlfcn.h>
@@ -560,7 +564,7 @@ typedef int PACKED_REDUCTION_METHOD_T;
// GROUP_AFFINITY is already defined for _MSC_VER>=1600 (VS2010 and later).
#if KMP_OS_WINDOWS
-#if _MSC_VER < 1600
+#if _MSC_VER < 1600 && KMP_MSVC_COMPAT
typedef struct GROUP_AFFINITY {
KAFFINITY Mask;
WORD Group;
OpenPOWER on IntegriCloud