aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2015-12-14 17:15:18 +0100
committerJohannes Schickel2015-12-14 17:15:18 +0100
commit862e4302a71ed55e157bb2c46664d71eb9563899 (patch)
tree02920b9c9bb8c1a77cb1623b04a01ff1d01af190
parent35244a8643b53fdf753b4650c5cd0f1ad3829b9b (diff)
downloadscummvm-rg350-862e4302a71ed55e157bb2c46664d71eb9563899.tar.gz
scummvm-rg350-862e4302a71ed55e157bb2c46664d71eb9563899.tar.bz2
scummvm-rg350-862e4302a71ed55e157bb2c46664d71eb9563899.zip
WIN32: Fix building for (some) MinGW64 toolchains.
-rw-r--r--backends/taskbar/win32/win32-taskbar.cpp20
1 files changed, 15 insertions, 5 deletions
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 <sdkddkver.h>
+
// 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 <SDKDDKVer.h>
- #endif
#endif
#include <shlobj.h>