Skip to content

Commit

Permalink
WIN32: Fix building for (some) MinGW64 toolchains.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Dec 14, 2015
1 parent 35244a8 commit 862e430
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions backends/taskbar/win32/win32-taskbar.cpp
Expand Up @@ -32,18 +32,28 @@
#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
#include <windows.h>
#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>
Expand Down

0 comments on commit 862e430

Please sign in to comment.