Gitweb:
https://git.exim.org/exim.git/commitdiff/9669c6e06fa8441557a70ba0759eda19287681ad
Commit: 9669c6e06fa8441557a70ba0759eda19287681ad
Parent: 11b31159ac7d1acef923c29053fc3d9c6bbf5c12
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Wed Jan 9 16:49:52 2019 +0000
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Thu Jan 10 15:23:49 2019 +0000
JSON: avoid recent library version usage
Also create feature-macro
---
src/src/lookups/json.c | 4 ++--
src/src/macro_predef.c | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/src/lookups/json.c b/src/src/lookups/json.c
index 013013a..5fe1f1c 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 84a3328..f92671a 100644
--- a/src/src/macro_predef.c
+++ b/src/src/macro_predef.c
@@ -223,6 +223,9 @@ due to conflicts with other common macros. */
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
#ifdef EXPERIMENTAL_LMDB