aboutsummaryrefslogtreecommitdiffstats
path: root/jnlib/t-support.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-01-27 11:30:02 +0000
committerWerner Koch <[email protected]>2009-01-27 11:30:02 +0000
commit51e483168584dd088f9af29f80a1db7dd26d4d34 (patch)
tree39641ac9c27d7732900e1b8540bd56132362783e /jnlib/t-support.c
parentPrint more directories with gpgconf --list-dirs. (diff)
downloadgnupg-51e483168584dd088f9af29f80a1db7dd26d4d34.tar.gz
gnupg-51e483168584dd088f9af29f80a1db7dd26d4d34.zip
Add a Geldkarte gadget application.
Minor other changes.
Diffstat (limited to '')
-rw-r--r--jnlib/t-support.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/jnlib/t-support.c b/jnlib/t-support.c
index 9b84634f8..126104846 100644
--- a/jnlib/t-support.c
+++ b/jnlib/t-support.c
@@ -22,9 +22,11 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <assert.h>
#include "t-support.h"
+
/* Replacements for the malloc functions as used here. */
static void
@@ -107,3 +109,31 @@ gcry_free (void *a)
if (a)
free (a);
}
+
+
+
+/* Stubs for gpg-error functions required because some compilers do
+ not eliminate the supposed-to-be-unused-inline-functions and thus
+ require functions called from these inline fucntions. Although we
+ do not use gpg-error, gpg-error.h may get included via gcrypt.h if
+ it happens to be used used in libjnlib-config.h. */
+int
+gpg_err_code_from_errno (int err)
+{
+ assert (!"stub function");
+ return -1;
+}
+
+
+/* Retrieve the error code directly from the ERRNO variable. This
+ returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped
+ (report this) and GPG_ERR_MISSING_ERRNO if ERRNO has the value 0. */
+int
+gpg_err_code_from_syserror (void)
+{
+ assert (!"stub function");
+ return -1;
+}
+
+
+