diff options
author | Werner Koch <[email protected]> | 2014-08-26 15:47:22 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-08-26 15:47:54 +0000 |
commit | 519305feb888b529c005b40445d041a088a2f8fc (patch) | |
tree | 74994a5b568e059982ca83a0daa8b7d96035355d /common/util.h | |
parent | gpg: Allow for positional parameters in the passphrase prompt. (diff) | |
download | gnupg-519305feb888b529c005b40445d041a088a2f8fc.tar.gz gnupg-519305feb888b529c005b40445d041a088a2f8fc.zip |
Switch to the libgpg-error provided estream.
* configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14.
(GPGRT_ENABLE_ES_MACROS): Define.
(estream_INIT): Remove.
* m4/estream.m4: Remove.
* common/estream-printf.c, common/estream-printf.h: Remove.
* common/estream.c, common/estream.h: Remove.
* common/init.c (_init_common_subsystems): Call gpgrt initialization.
Diffstat (limited to 'common/util.h')
-rw-r--r-- | common/util.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/common/util.h b/common/util.h index 4dad163c3..dd5fdb14c 100644 --- a/common/util.h +++ b/common/util.h @@ -33,16 +33,12 @@ #include <gcrypt.h> /* We need this for the memory function protos. */ #include <errno.h> /* We need errno. */ -#include <gpg-error.h> /* We need gpg_error_t. */ +#include <gpg-error.h> /* We need gpg_error_t and estream. */ /* Hash function used with libksba. */ #define HASH_FNC ((void (*)(void *, const void*,size_t))gcry_md_write) -/* Estream replaces most uses of stdio. */ -#include "../common/estream.h" -#include "../common/estream-printf.h" - /* Get all the stuff from jnlib. */ #include "../common/logging.h" #include "../common/argparse.h" @@ -57,13 +53,13 @@ /* Redefine asprintf by our estream version which uses our own memory allocator.. */ -#define asprintf estream_asprintf -#define vasprintf estream_vasprintf +#define asprintf gpgrt_asprintf +#define vasprintf gpgrt_vasprintf /* Due to a bug in mingw32's snprintf related to the 'l' modifier and for increased portability we use our snprintf on all systems. */ #undef snprintf -#define snprintf estream_snprintf +#define snprintf gpgrt_snprintf /* GCC attributes. */ @@ -278,6 +274,8 @@ const char *gnupg_cipher_algo_name (int algo); const char *print_fname_stdout (const char *s); const char *print_fname_stdin (const char *s); +void print_utf8_buffer3 (estream_t fp, const void *p, size_t n, + const char *delim); void print_utf8_buffer2 (estream_t fp, const void *p, size_t n, int delim); void print_utf8_buffer (estream_t fp, const void *p, size_t n); void print_hexstring (FILE *fp, const void *buffer, size_t length, |