summaryrefslogtreecommitdiffstats
path: root/external/gpgmepp/w32-fix-win32-macro.patch.1
diff options
context:
space:
mode:
Diffstat (limited to 'external/gpgmepp/w32-fix-win32-macro.patch.1')
-rw-r--r--external/gpgmepp/w32-fix-win32-macro.patch.1175
1 files changed, 175 insertions, 0 deletions
diff --git a/external/gpgmepp/w32-fix-win32-macro.patch.1 b/external/gpgmepp/w32-fix-win32-macro.patch.1
new file mode 100644
index 000000000..70a8b5ffe
--- /dev/null
+++ b/external/gpgmepp/w32-fix-win32-macro.patch.1
@@ -0,0 +1,175 @@
+diff -ur gpgmepp.org/lang/cpp/src/callbacks.cpp gpgmepp/lang/cpp/src/callbacks.cpp
+--- gpgmepp.org/lang/cpp/src/callbacks.cpp 2016-10-18 19:22:02.000000000 +0200
++++ gpgmepp/lang/cpp/src/callbacks.cpp 2017-11-20 18:03:04.290060900 +0100
+@@ -38,7 +38,9 @@
+ #include <cassert>
+ #include <cerrno>
+ #include <cstring>
++#if HAVE_UNISTD_H
+ #include <unistd.h>
++#endif
+ #include <stdlib.h>
+
+ static inline gpgme_error_t make_err_from_syserror()
+diff -ur gpgmepp.org/lang/cpp/src/data.h gpgmepp/lang/cpp/src/data.h
+--- gpgmepp.org/lang/cpp/src/data.h 2017-03-24 15:20:32.000000000 +0100
++++ gpgmepp/lang/cpp/src/data.h 2017-11-20 17:23:24.802711200 +0100
+@@ -31,6 +31,11 @@
+ #include <algorithm>
+ #include <memory>
+
++#ifdef _MSC_VER
++# include <BaseTsd.h>
++typedef SSIZE_T ssize_t;
++#endif
++
+ namespace GpgME
+ {
+
+diff -ur gpgmepp.org/lang/cpp/src/editinteractor.cpp gpgmepp/lang/cpp/src/editinteractor.cpp
+--- gpgmepp.org/lang/cpp/src/editinteractor.cpp 2017-03-09 09:01:10.000000000 +0100
++++ gpgmepp/lang/cpp/src/editinteractor.cpp 2017-11-20 18:09:33.022674700 +0100
+@@ -30,9 +30,11 @@
+
+ #include <gpgme.h>
+
+-#ifdef _WIN32
++#ifdef _MSC_VER
+ # include <io.h>
+-#include <windows.h>
++# include <windows.h>
++# include <BaseTsd.h>
++ typedef SSIZE_T ssize_t;
+ #else
+ # include <unistd.h>
+ #endif
+diff -ur gpgmepp.org/lang/cpp/src/gpgmepp_export.h gpgmepp/lang/cpp/src/gpgmepp_export.h
+--- gpgmepp.org/lang/cpp/src/gpgmepp_export.h 2016-08-04 15:03:09.000000000 +0200
++++ gpgmepp/lang/cpp/src/gpgmepp_export.h 2017-11-20 16:57:47.805691100 +0100
+@@ -29,14 +29,14 @@
+ # ifndef GPGMEPP_EXPORT
+ # ifdef BUILDING_GPGMEPP
+ /* We are building this library */
+-# ifdef WIN32
++# ifdef _MSC_VER
+ # define GPGMEPP_EXPORT __declspec(dllexport)
+ # else
+ # define GPGMEPP_EXPORT __attribute__((visibility("default")))
+ # endif
+ # else
+ /* We are using this library */
+-# ifdef WIN32
++# ifdef _MSC_VER
+ # define GPGMEPP_EXPORT __declspec(dllimport)
+ # else
+ # define GPGMEPP_EXPORT __attribute__((visibility("default")))
+@@ -45,7 +45,7 @@
+ # endif
+
+ # ifndef GPGMEPP_NO_EXPORT
+-# ifdef WIN32
++# ifdef _MSC_VER
+ # define GPGMEPP_NO_EXPORT
+ # else
+ # define GPGMEPP_NO_EXPORT __attribute__((visibility("hidden")))
+@@ -54,7 +54,11 @@
+ #endif
+
+ #ifndef GPGMEPP_DEPRECATED
+-# define GPGMEPP_DEPRECATED __attribute__ ((__deprecated__))
++# ifdef _MSC_VER
++# define GPGMEPP_DEPRECATED __declspec(deprecated("deprecated"))
++# else
++# define GPGMEPP_DEPRECATED __attribute__ ((__deprecated__))
++# endif
+ #endif
+
+ #ifndef GPGMEPP_DEPRECATED_EXPORT
+diff -ur gpgmepp.org/lang/cpp/src/interfaces/dataprovider.h gpgmepp/lang/cpp/src/interfaces/dataprovider.h
+--- gpgmepp.org/lang/cpp/src/interfaces/dataprovider.h 2016-05-17 14:32:37.000000000 +0200
++++ gpgmepp/lang/cpp/src/interfaces/dataprovider.h 2017-11-20 18:03:11.332715700 +0100
+@@ -29,6 +29,11 @@
+
+ #include <gpg-error.h>
+
++#ifdef _MSC_VER
++# include <BaseTsd.h>
++typedef SSIZE_T ssize_t;
++#endif
++
+ namespace GpgME
+ {
+
+diff -ur gpgmepp.org/lang/cpp/src/key.cpp gpgmepp/lang/cpp/src/key.cpp
+--- gpgmepp.org/lang/cpp/src/key.cpp 2017-03-20 20:10:15.000000000 +0100
++++ gpgmepp/lang/cpp/src/key.cpp 2017-11-20 17:44:50.321858800 +0100
+@@ -33,10 +33,16 @@
+ #include <gpgme.h>
+
+ #include <string.h>
++#if HAVE_STRINGS_H
+ #include <strings.h>
++#endif
+ #include <istream>
+ #include <iterator>
+
++#ifdef _MSC_VER
++# define strcasecmp _stricmp
++#endif
++
+ const GpgME::Key::Null GpgME::Key::null;
+
+ namespace GpgME
+diff -ur gpgmepp.org/lang/cpp/src/key.h gpgmepp/lang/cpp/src/key.h
+--- gpgmepp.org/lang/cpp/src/key.h 2017-03-20 20:10:15.000000000 +0100
++++ gpgmepp/lang/cpp/src/key.h 2017-11-20 17:07:51.551632000 +0100
+@@ -30,7 +30,6 @@
+ #include "gpgmefw.h"
+
+ #include <memory>
+-#include <sys/time.h>
+
+ #include <vector>
+ #include <algorithm>
+diff -ur gpgmepp.org/lang/qt/src/qgpgme_export.h gpgmepp/lang/qt/src/qgpgme_export.h
+--- gpgmepp.org/lang/qt/src/qgpgme_export.h 2016-11-03 17:32:30.000000000 +0100
++++ gpgmepp/lang/qt/src/qgpgme_export.h 2017-11-20 16:58:27.395388000 +0100
+@@ -39,14 +39,14 @@
+ # ifndef QGPGME_EXPORT
+ # ifdef BUILDING_QGPGME
+ /* We are building this library */
+-# ifdef WIN32
++# ifdef _WIN32
+ # define QGPGME_EXPORT __declspec(dllexport)
+ # else
+ # define QGPGME_EXPORT __attribute__((visibility("default")))
+ # endif
+ # else
+ /* We are using this library */
+-# ifdef WIN32
++# ifdef _WIN32
+ # define QGPGME_EXPORT __declspec(dllimport)
+ # else
+ # define QGPGME_EXPORT __attribute__((visibility("default")))
+@@ -55,7 +55,7 @@
+ # endif
+
+ # ifndef QGPGME_NO_EXPORT
+-# ifdef WIN32
++# ifdef _WIN32
+ # define QGPGME_NO_EXPORT
+ # else
+ # define QGPGME_NO_EXPORT __attribute__((visibility("hidden")))
+@@ -64,7 +64,11 @@
+ #endif
+
+ #ifndef QGPGME_DEPRECATED
+-# define QGPGME_DEPRECATED __attribute__ ((__deprecated__))
++# ifdef _MSC_VER
++# define QGPGME_DEPRECATED __declspec(deprecated("deprecated"))
++# else
++# define QGPGME_DEPRECATED __attribute__ ((__deprecated__))
++# endif
+ #endif
+
+ #ifndef QGPGME_DEPRECATED_EXPORT