From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- external/gpgmepp/w32-fix-win32-macro.patch.1 | 176 +++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 external/gpgmepp/w32-fix-win32-macro.patch.1 (limited to 'external/gpgmepp/w32-fix-win32-macro.patch.1') 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..8ab7b0fab --- /dev/null +++ b/external/gpgmepp/w32-fix-win32-macro.patch.1 @@ -0,0 +1,176 @@ +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 +@@ -40,7 +40,9 @@ + #include + #include + #include ++#if HAVE_UNISTD_H + #include ++#endif + #include + + 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 + #include + ++#ifdef _MSC_VER ++# include ++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 +@@ -33,9 +33,11 @@ + + #include + +-#ifdef _WIN32 ++#ifdef _MSC_VER + # include +-#include ++# include ++# include ++ typedef SSIZE_T ssize_t; + #else + # include + #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 +@@ -30,14 +30,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"))) +@@ -46,7 +46,7 @@ + # endif + + # ifndef GPGMEPP_NO_EXPORT +-# ifdef WIN32 ++# ifdef _MSC_VER + # define GPGMEPP_NO_EXPORT + # else + # define GPGMEPP_NO_EXPORT __attribute__((visibility("hidden"))) +@@ -55,7 +55,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 +@@ -31,6 +31,11 @@ + + #include + ++#ifdef _MSC_VER ++# include ++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 +@@ -34,11 +34,17 @@ + #include + + #include ++#if HAVE_STRINGS_H + #include ++#endif + #include + #include + #include + ++#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 +-#include + + #include + #include +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 +@@ -40,14 +40,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"))) +@@ -56,7 +56,7 @@ + # endif + + # ifndef QGPGME_NO_EXPORT +-# ifdef WIN32 ++# ifdef _WIN32 + # define QGPGME_NO_EXPORT + # else + # define QGPGME_NO_EXPORT __attribute__((visibility("hidden"))) +@@ -65,7 +65,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 -- cgit v1.2.3