Add w64-mingw32 compatibility patches.
authorWerner Koch <wk@gnupg.org>
Mon, 29 Apr 2013 08:18:59 +0000 (10:18 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 29 Apr 2013 08:24:21 +0000 (10:24 +0200)
* patches/gpgme-1.4.0/01-off_t.postcfg-build:  New.
* patches/gpgol-1.1.3/01-w64-ming64.patch:  New.
* Makefile.am (EXTRA_DIST): Add them.

Makefile.am
patches/gpgme-1.4.0/01-off_t.postcfg-build [new file with mode: 0755]
patches/gpgol-1.1.3/01-w64-ming64.patch [new file with mode: 0755]

index 6884b50..2b7a2c3 100644 (file)
@@ -72,13 +72,14 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
        patches/dirmngr-1.0.3/01-ldaphttp.patch \
        patches/dirmngr-1.1.0/01-mmap.patch \
        patches/gpgol-0.9.91/01-gpgme.patch \
+        patches/gpgol-1.1.3/01-w64-ming64.patch  \
         patches/gpa-0.9.0/01-title-prop.patch \
        patches/libetpan-0.57/01-gnutls_compat.patch \
         patches/scute-1.2.0/01-bugfixes.patch \
         patches/scute-1.3.0/01-wsastartup.patch \
         patches/claws-mail-3.8.0cvs30/01-glib-h-only.patch \
-       patches/gnutls-2.12.21/01-openssl-wincrypt.patch
-
+       patches/gnutls-2.12.21/01-openssl-wincrypt.patch \
+        patches/gpgme-1.4.0/01-off_t.postcfg-build
 
 copy-news:
        cp NEWS doc/website/NEWS.last
diff --git a/patches/gpgme-1.4.0/01-off_t.postcfg-build b/patches/gpgme-1.4.0/01-off_t.postcfg-build
new file mode 100755 (executable)
index 0000000..dd882c4
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+patch -p0 -f $* < $0
+exit $?
+
+The _FILE_OFFSET_BITS check is also employed for Windows but does not
+work reliable and is not needed anyway.  Will be fixed in 1.4.1.  For
+the time being we need to patch the generated header (thus the
+.postcfg-build suffix of this file)
+
+
+--- src/gpgme.h~       2013-04-26 17:49:31.659676656 +0200
++++ src/gpgme.h        2013-04-29 09:35:18.085078818 +0200
+@@ -90,17 +90,6 @@
+    API incompatibilities.  */
+ #define GPGME_VERSION_NUMBER 0x010400
+
+-/* Check for a matching _FILE_OFFSET_BITS definition.  */
+-#if 64
+-#ifndef _FILE_OFFSET_BITS
+-#error GPGME was compiled with _FILE_OFFSET_BITS = 64, please see the section "Largefile support (LFS)" in the GPGME manual.
+-#else
+-#if (_FILE_OFFSET_BITS) != (64)
+-#error GPGME was compiled with a different value for _FILE_OFFSET_BITS, namely 64, please see the section "Largefile support (LFS)" in the GPGME manual.
+-#endif
+-#endif
+-#endif
+-
+
\f
+ /* Some opaque data types used by GPGME.  */
diff --git a/patches/gpgol-1.1.3/01-w64-ming64.patch b/patches/gpgol-1.1.3/01-w64-ming64.patch
new file mode 100755 (executable)
index 0000000..f8572af
--- /dev/null
@@ -0,0 +1,36 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+Fix an w64-mingw32 incompatibility.
+
+
+diff --git a/src/common.c b/src/common.c
+index 43239c7..68cae2d 100644
+--- a/src/common.c
++++ b/src/common.c
+@@ -18,6 +18,7 @@
+  */
+
+ #include <config.h>
++#define OEMRESOURCE    /* Required for OBM_CHECKBOXES.  */
+ #include <windows.h>
+ #include <shlobj.h>
+ #ifndef CSIDL_APPDATA
+diff --git a/src/ext-commands.cpp b/src/ext-commands.cpp
+index 04140c5..85feb2d 100644
+--- a/src/ext-commands.cpp
++++ b/src/ext-commands.cpp
+@@ -21,7 +21,11 @@
+ #include <config.h>
+ #endif
+
+-#define _WIN32_IE 0x400 /* Need TBIF_COMMAND et al.  */
++/* Need TBIF_COMMAND et al. (0x0400 would be sufficient but elsewhere
++   we require 0x600 anyway). */
++#ifndef _WIN32_IE
++# define _WIN32_IE 0x0600
++#endif
+ #include <windows.h>
+
+ #include "mymapi.h"