Support dynamic loading of libjansson on MS-Windows
commit2b8a1b76920dbdfc39dab2ec29ab7650bf779275
authorEli Zaretskii <eliz@gnu.org>
Sun, 10 Dec 2017 16:36:37 +0000 (10 18:36 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 10 Dec 2017 16:36:37 +0000 (10 18:36 +0200)
tree2080a70b7238f63578d103dae8331e24840edc1c
parentf856d1e4489eac45afab865838abb2b16fb1f14f
Support dynamic loading of libjansson on MS-Windows

* src/json.c [WINDOWSNT]: Define fn_* function pointers to jansson
functions.
(json_delete) [WINDOWSNT]: A wrapper around fn_json_delete, needed
by json_decref.
(init_json_functions) [WINDOWSNT]: New function.
(Fjson_serialize, Fjson_insert, Fjson_parse_string)
(Fjson_parse_buffer) [WINDOWSNT]: Call init_json_functions if
needed, and record JSON in Vlibrary_cache.
* src/emacs.c (main): Don't call init_json on WINDOWSNT.
* src/w32fns.c (syms_of_w32fns): DEFSYM "json".

* lisp/term/w32-win.el (dynamic-library-alist): Add JSON DLL to
the list.

* configure.ac (HAVE_JSON): Empty JSON_LIBS for MinGW.

* nt/INSTALL.W64:
* nt/INSTALL: Add information about libjansson.
configure.ac
lisp/term/w32-win.el
nt/INSTALL
nt/INSTALL.W64
src/emacs.c
src/json.c
src/w32fns.c