diff options
author | Werner Koch <wk@gnupg.org> | 2009-01-27 12:30:02 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2009-01-27 12:30:02 +0100 |
commit | 51e483168584dd088f9af29f80a1db7dd26d4d34 (patch) | |
tree | 39641ac9c27d7732900e1b8540bd56132362783e /jnlib | |
parent | Print more directories with gpgconf --list-dirs. (diff) | |
download | gnupg2-51e483168584dd088f9af29f80a1db7dd26d4d34.tar.xz gnupg2-51e483168584dd088f9af29f80a1db7dd26d4d34.zip |
Add a Geldkarte gadget application.
Minor other changes.
Diffstat (limited to 'jnlib')
-rw-r--r-- | jnlib/ChangeLog | 5 | ||||
-rw-r--r-- | jnlib/t-support.c | 30 |
2 files changed, 35 insertions, 0 deletions
diff --git a/jnlib/ChangeLog b/jnlib/ChangeLog index 4a420744e..651ed799f 100644 --- a/jnlib/ChangeLog +++ b/jnlib/ChangeLog @@ -1,3 +1,8 @@ +2009-01-22 Werner Koch <wk@g10code.com> + + * t-support.c (gpg_err_code_from_errno) + (gpg_err_code_from_syserror): New. + 2008-11-20 Werner Koch <wk@g10code.com> * argparse.c (arg_parse): Fix last change. 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; +} + + + |