| From edde5c93099d2ba504e6a7dc21c7563359a3e0e5 Mon Sep 17 00:00:00 2001 |
| From: Igor Matuszewski <igor@sequoia-pgp.org> |
| Date: Mon, 23 Mar 2020 19:25:57 +0100 |
| Subject: [PATCH] mingw-w64-capnproto: Define _WIN32_WINNT before other include |
| |
| Even though it was previously done before including windows.h directly, |
| the mingw-w64 headers, which are included by other standard headers, do |
| define this themselves. |
| Therefore, we should define that ourselves if we want to explicitly |
| support other version, before including every other header. |
| --- |
| .../src/kj/filesystem-disk-win32.c++ | 10 ++++------ |
| 1 file changed, 4 insertions(+), 6 deletions(-) |
| |
| diff --git a/src/kj/filesystem-disk-win32.c++ b/src/kj/filesystem-disk-win32.c++ |
| index 48ce0c143..2b49b8255 100644 |
| --- a/src/kj/filesystem-disk-win32.c++ |
| +++ b/src/kj/filesystem-disk-win32.c++ |
| @@ -20,6 +20,10 @@ |
| // THE SOFTWARE. |
| |
| #if _WIN32 |
| +// Request Vista-level APIs. |
| +#define WINVER 0x0600 |
| +#define _WIN32_WINNT 0x0600 |
| +#define WIN32_LEAN_AND_MEAN |
| // For Unix implementation, see filesystem-disk-unix.c++. |
| |
| #include "filesystem.h" |
| @@ -29,12 +33,6 @@ |
| #include <algorithm> |
| #include <wchar.h> |
| |
| -// Request Vista-level APIs. |
| -#define WINVER 0x0600 |
| -#define _WIN32_WINNT 0x0600 |
| - |
| -#define WIN32_LEAN_AND_MEAN // ::eyeroll:: |
| - |
| #include <windows.h> |
| #include <winioctl.h> |
| #include "windows-sanity.h" |
| -- |
| 2.25.2 |
| |