From 433bb8e84b2d1e50b5c5b9f7f2006b60cd7d7785 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Mon, 22 Feb 2016 19:07:41 +0100 Subject: Remove feature check ifdefs * lang/cpp/src/assuanresult.cpp, lang/cpp/src/callbacks.cpp, lang/cpp/src/configuration.cpp, lang/cpp/src/context.cpp, lang/cpp/src/context_glib.cpp, lang/cpp/src/context_qt.cpp, lang/cpp/src/context_vanilla.cpp, lang/cpp/src/data.cpp, lang/cpp/src/decryptionresult.cpp, lang/cpp/src/defaultassuantransaction.cpp, lang/cpp/src/editinteractor.cpp, lang/cpp/src/encryptionresult.cpp, lang/cpp/src/engineinfo.cpp, lang/cpp/src/eventloopinteractor.cpp, lang/cpp/src/global.h, lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, lang/cpp/src/importresult.cpp, lang/cpp/src/interfaces/assuantransaction.h, lang/cpp/src/key.cpp, lang/cpp/src/keygenerationresult.cpp, lang/cpp/src/keylistresult.cpp, lang/cpp/src/scdgetinfoassuantransaction.cpp, lang/cpp/src/signingresult.cpp, lang/cpp/src/trustitem.cpp, lang/cpp/src/util.h, lang/cpp/src/verificationresult.cpp, lang/cpp/src/vfsmountresult.cpp: Remove feature checks. --- lang/cpp/src/editinteractor.cpp | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'lang/cpp/src/editinteractor.cpp') diff --git a/lang/cpp/src/editinteractor.cpp b/lang/cpp/src/editinteractor.cpp index 0c5f7783..edb1ac85 100644 --- a/lang/cpp/src/editinteractor.cpp +++ b/lang/cpp/src/editinteractor.cpp @@ -20,17 +20,11 @@ Boston, MA 02110-1301, USA. */ -#include - #include "editinteractor.h" #include "callbacks.h" #include "error.h" -#ifdef HAVE_GPGME_GPG_ERROR_WRAPPERS #include -#else -#include -#endif #ifdef _WIN32 # include @@ -42,6 +36,10 @@ #include #include +#ifndef GPG_ERR_ALREADY_SIGNED +# define GPG_ERR_ALREADY_SIGNED GPG_ERR_USER_1 +#endif + using namespace GpgME; static const char *status_to_string(unsigned int status); @@ -69,18 +67,7 @@ private: { size_t toWrite = count; while (toWrite > 0) { -#ifdef HAVE_GPGME_IO_READWRITE const int n = gpgme_io_write(fd, buf, toWrite); -#else -# ifdef Q_OS_WIN - DWORD n; - if (!WriteFile((HANDLE)fd, buf, toWrite, &n, NULL)) { - return -1; - } -# else - const int n = write(fd, buf, toWrite); -# endif -#endif if (n < 0) { return n; } @@ -124,11 +111,7 @@ public: } // if there's a result, write it: if (*result) { -#ifdef HAVE_GPGME_GPG_ERROR_WRAPPERS gpgme_err_set_errno(0); -#else - gpg_err_set_errno(0); -#endif const ssize_t len = std::strlen(result); if (writeAll(fd, result, len) != len) { err = Error::fromSystemError(); @@ -138,11 +121,7 @@ public: goto error; } } -#ifdef HAVE_GPGME_GPG_ERROR_WRAPPERS gpgme_err_set_errno(0); -#else - gpg_err_set_errno(0); -#endif if (writeAll(fd, "\n", 1) != 1) { err = Error::fromSystemError(); if (ei->debug) { -- cgit v1.2.3