From cdae524b282ef0ea67c3880b3e0f852c84c351ce Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 26 Feb 2013 17:06:39 +0100 Subject: w32: Hacks for building with 32 bit mingw64. * configure.ac (INSERT__TYPEDEFS_FOR_GPGME_H): Add hacks for 32 bit mingw64. * src/util.h [W32]: Include winsock2.h before windows to make mingw64 happy. * src/w32-util.c (_WIN32_IE): Need to use 5.1 for mingw64. -- It is not clear to me what mingw64 wants to achieve with their POSIX hacks. In particular the off64_t stuff looks quite strange given that Windows has a pretty stable API for close to 2 decades. Thus I can't say whether it will really work when build with that toolchain. --- src/w32-util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/w32-util.c') diff --git a/src/w32-util.c b/src/w32-util.c index 7feaf6b9..a90f4056 100644 --- a/src/w32-util.c +++ b/src/w32-util.c @@ -44,7 +44,11 @@ #include #include -#define _WIN32_IE 0x0400 /* Required for SHGetSpecialFolderPathA. */ +#if __MINGW64_VERSION_MAJOR >= 2 +# define _WIN32_IE 0x0501 /* Required by mingw64 toolkit. */ +#else +# define _WIN32_IE 0x0400 /* Required for SHGetSpecialFolderPathA. */ +#endif /* We need to include the windows stuff here prior to shlobj.h so that we get the right winsock version. This is usually done in util.h -- cgit v1.2.3