From: Jeremy Harris Date: Wed, 9 Jan 2019 16:49:52 +0000 (+0000) Subject: JSON: avoid recent library version usage X-Git-Tag: exim-4.93-RC0~284^2~25 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9669c6e06fa8441557a70ba0759eda19287681ad;p=exim.git JSON: avoid recent library version usage Also create feature-macro --- diff --git a/src/src/lookups/json.c b/src/src/lookups/json.c index 013013ae8..5fe1f1c5d 100644 --- a/src/src/lookups/json.c +++ b/src/src/lookups/json.c @@ -69,8 +69,8 @@ do_cache = do_cache; /* Keep picky compilers happy */ rewind(f); if (!(j = json_loadf(f, 0, &jerr))) { - enum json_error_code je = json_error_code(&jerr); - *errmsg = string_sprintf("json err %d on open", je); + *errmsg = string_sprintf("json error on open: %.*s\n", + JSON_ERROR_TEXT_LENGTH, jerr.text); return FAIL; } j0 = j; diff --git a/src/src/macro_predef.c b/src/src/macro_predef.c index 84a33282d..f92671ae2 100644 --- a/src/src/macro_predef.c +++ b/src/src/macro_predef.c @@ -222,6 +222,9 @@ due to conflicts with other common macros. */ #ifdef LOOKUP_IBASE builtin_macro_create(US"_HAVE_LOOKUP_IBASE"); #endif +#ifdef LOOKUP_LDAP + builtin_macro_create(US"_HAVE_LOOKUP_JSON"); +#endif #ifdef LOOKUP_LDAP builtin_macro_create(US"_HAVE_LOOKUP_LDAP"); #endif