aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/editinteractor.cpp
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2016-02-22 18:07:41 +0000
committerAndre Heinecke <[email protected]>2016-02-22 18:07:41 +0000
commit433bb8e84b2d1e50b5c5b9f7f2006b60cd7d7785 (patch)
tree48029996a5cb1d65bba513e53da21fd48c3ea00e /lang/cpp/src/editinteractor.cpp
parentInitial checkin of gpgmepp sources (diff)
downloadgpgme-433bb8e84b2d1e50b5c5b9f7f2006b60cd7d7785.tar.gz
gpgme-433bb8e84b2d1e50b5c5b9f7f2006b60cd7d7785.zip
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.
Diffstat (limited to 'lang/cpp/src/editinteractor.cpp')
-rw-r--r--lang/cpp/src/editinteractor.cpp29
1 files changed, 4 insertions, 25 deletions
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 <config-gpgme++.h>
-
#include "editinteractor.h"
#include "callbacks.h"
#include "error.h"
-#ifdef HAVE_GPGME_GPG_ERROR_WRAPPERS
#include <gpgme.h>
-#else
-#include <gpg-error.h>
-#endif
#ifdef _WIN32
# include <io.h>
@@ -42,6 +36,10 @@
#include <cerrno>
#include <cstring>
+#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) {