From 519305feb888b529c005b40445d041a088a2f8fc Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 26 Aug 2014 17:47:22 +0200 Subject: 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. --- common/util.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'common/util.h') 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 /* We need this for the memory function protos. */ #include /* We need errno. */ -#include /* We need gpg_error_t. */ +#include /* 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, -- cgit v1.2.3