diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/gpgmepp/w32-fix-win32-macro.patch.1 | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | external/gpgmepp/w32-fix-win32-macro.patch.1 | 176 |
1 files changed, 176 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..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 <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 +@@ -33,9 +33,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 +@@ -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 <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 +@@ -34,11 +34,17 @@ + #include <gpgme.h> + + #include <string.h> ++#if HAVE_STRINGS_H + #include <strings.h> ++#endif + #include <cassert> + #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 +@@ -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 |