From 862e4302a71ed55e157bb2c46664d71eb9563899 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 14 Dec 2015 17:15:18 +0100 Subject: WIN32: Fix building for (some) MinGW64 toolchains. --- backends/taskbar/win32/win32-taskbar.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'backends/taskbar') diff --git a/backends/taskbar/win32/win32-taskbar.cpp b/backends/taskbar/win32/win32-taskbar.cpp index d45253c676..0192b1dc03 100644 --- a/backends/taskbar/win32/win32-taskbar.cpp +++ b/backends/taskbar/win32/win32-taskbar.cpp @@ -32,6 +32,21 @@ #if defined(__GNUC__) && defined(__MINGW32__) && !defined(__MINGW64__) #include "backends/taskbar/win32/mingw-compat.h" #else + // We use functionality introduced with Win7 in this file. + // To assure that including the respective system headers gives us all + // required definitions we set Win7 as minimum version we target. + // See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#macros_for_conditional_declarations + #undef _WIN32_WINNT + #define _WIN32_WINNT _WIN32_WINNT_WIN7 + + // TODO: We might not need to include this file, the MSDN docs are + // not really helpful to decide whether we require it or not. + // + // Casing of the name is a bit of a mess. MinGW64 seems to use all + // lowercase, while MSDN docs suggest "SdkDdkVer.h". We are stuck with + // what MinGW64 uses... + #include + // We need certain functions that are excluded by default #undef NONLS #undef NOICONS @@ -39,11 +54,6 @@ #if defined(ARRAYSIZE) #undef ARRAYSIZE #endif - - #if defined(_MSC_VER) - // Default MSVC headers for ITaskbarList3 and IShellLink - #include - #endif #endif #include -- cgit v1.2.3