aboutsummaryrefslogtreecommitdiffstats
path: root/agent/agent.h
diff options
context:
space:
mode:
Diffstat (limited to 'agent/agent.h')
-rw-r--r--agent/agent.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/agent/agent.h b/agent/agent.h
index bd7b36a5d..cc4bb7a20 100644
--- a/agent/agent.h
+++ b/agent/agent.h
@@ -21,10 +21,25 @@
#ifndef AGENT_H
#define AGENT_H
+#ifdef GPG_ERR_SOURCE_DEFAULT
+#error GPG_ERR_SOURCE_DEFAULT already defined
+#endif
+#define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_GPGAGENT
+#include <gpg-error.h>
+#include <errno.h>
+
#include <gcrypt.h>
#include "../common/util.h"
#include "../common/errors.h"
+/* Convenience function to be used instead of returning the old
+ GNUPG_Out_Of_Core. */
+static __inline__ gpg_error_t
+out_of_core (void)
+{
+ return gpg_error (gpg_err_code_from_errno (errno));
+}
+
#define MAX_DIGEST_LEN 24
/* A large struct name "opt" to keep global flags */