diff --git a/lang/cpp/src/callbacks.cpp b/lang/cpp/src/callbacks.cpp --- a/lang/cpp/src/callbacks.cpp +++ b/lang/cpp/src/callbacks.cpp @@ -41,7 +41,9 @@ #include #include #include -#include +#ifndef _MSC_VER + #include +#endif static inline gpgme_error_t make_err_from_syserror() { diff --git a/lang/cpp/src/data.h b/lang/cpp/src/data.h --- a/lang/cpp/src/data.h +++ b/lang/cpp/src/data.h @@ -31,6 +31,12 @@ #include // FILE #include #include +#include + +#ifdef _MSC_VER +# include // ssize_t on Windows +# define ssize_t SSIZE_T +#endif namespace GpgME { diff --git a/lang/cpp/src/editinteractor.cpp b/lang/cpp/src/editinteractor.cpp --- a/lang/cpp/src/editinteractor.cpp +++ b/lang/cpp/src/editinteractor.cpp @@ -40,6 +40,11 @@ # include #endif +#ifdef _MSC_VER +# include // ssize_t on Windows +# define ssize_t SSIZE_T +#endif + #include #include #include diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -30,7 +30,7 @@ #include "gpgmefw.h" #include -#include +#include #include #include