From 2dfa53af63f08e3d09a7de3320f90dc04dac9d63 Mon Sep 17 00:00:00 2001 From: Robin Westberg Date: Mon, 9 Apr 2018 10:09:38 +0200 Subject: [PATCH] 8199736: Define WIN32_LEAN_AND_MEAN before including windows.h Reviewed-by: erikj, ihse, kbarrett, dholmes --- make/autoconf/flags-cflags.m4 | 2 +- src/hotspot/os/windows/os_windows.cpp | 2 ++ src/hotspot/share/interpreter/bytecodes.cpp | 2 +- src/hotspot/share/utilities/ostream.cpp | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index b8e1f5214c7..ac70ffd7813 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -453,7 +453,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE \ -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL" - ALWAYS_DEFINES_JVM="-DNOMINMAX" + ALWAYS_DEFINES_JVM="-DNOMINMAX -DWIN32_LEAN_AND_MEAN" fi ############################################################################### diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp index eab2b84ebd9..44b146363e7 100644 --- a/src/hotspot/os/windows/os_windows.cpp +++ b/src/hotspot/os/windows/os_windows.cpp @@ -99,6 +99,8 @@ // for enumerating dll libraries #include #include +#include +#include // for timer info max values which include all bits #define ALL_64_BITS CONST64(-1) diff --git a/src/hotspot/share/interpreter/bytecodes.cpp b/src/hotspot/share/interpreter/bytecodes.cpp index 7e171b9a99b..e377e36b88c 100644 --- a/src/hotspot/share/interpreter/bytecodes.cpp +++ b/src/hotspot/share/interpreter/bytecodes.cpp @@ -45,7 +45,7 @@ BasicType Bytecodes::_result_type [Bytecodes::number_of_codes]; s_char Bytecodes::_depth [Bytecodes::number_of_codes]; u_char Bytecodes::_lengths [Bytecodes::number_of_codes]; Bytecodes::Code Bytecodes::_java_code [Bytecodes::number_of_codes]; -u_short Bytecodes::_flags [(1< #include #include +#elif defined(_WINDOWS) +#include #endif // Network access