From eb99e8c483a70764408868602ef322602e9e72ce Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 9 Nov 2020 11:48:42 +0100 Subject: Require at least libgpg-error 1.36 * configure.ac (NEED_GPG_ERROR_VERSION): Require 1.36. * src/cJSON.c: Remove code for older version. * src/engine.c (gpgme_get_engine_info): Ditto. * src/gpgme-json.c: Ditto. * src/op-support.c: Ditto. * src/util.h: Ditto. -- Libgpg-error 1.36 has been released more than 18 months ago so it is time to avoid hacks and require this verion. This will for example help Kleopatra to support PIV cards and improves the gpgme-json. Signed-off-by: Werner Koch --- src/cJSON.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'src/cJSON.c') diff --git a/src/cJSON.c b/src/cJSON.c index f233848e..7769b0eb 100644 --- a/src/cJSON.c +++ b/src/cJSON.c @@ -66,25 +66,14 @@ #define wipememory(_ptr,_len) wipememory2(_ptr,0,_len) /* We use malloc function wrappers from gpgrt (aka libgpg-error). */ -#if GPGRT_VERSION_NUMBER >= 0x011c00 /* 1.28 */ -# include -# define xtrycalloc(a,b) gpgrt_calloc ((a), (b)) -# define xtrystrdup(a) gpgrt_strdup ((a)) -# define xfree(a) gpgrt_free ((a)) -# if CALLOC_ONLY -# define xtrymalloc(a) gpgrt_calloc (1, (a)) -# else -# define xtrymalloc(a) gpgrt_malloc ((a)) -# endif -#else /* Without gpgrt (aka libgpg-error). */ -# define xtrycalloc(a,b) calloc ((a), (b)) -# define xtrystrdup(a) strdup ((a)) -# define xfree(a) free ((a)) -# if CALLOC_ONLY -# define xtrymalloc(a) calloc (1, (a)) -# else -# define xtrymalloc(a) malloc ((a)) -# endif +#include +#define xtrycalloc(a,b) gpgrt_calloc ((a), (b)) +#define xtrystrdup(a) gpgrt_strdup ((a)) +#define xfree(a) gpgrt_free ((a)) +#if CALLOC_ONLY +# define xtrymalloc(a) gpgrt_calloc (1, (a)) +#else +# define xtrymalloc(a) gpgrt_malloc ((a)) #endif -- cgit v1.2.3