Commit dc79845a authored by Chris Zheng's avatar Chris Zheng Committed by Eli Zaretskii

Support GnuTLS v3.4 and later on MS-Windows

* src/gnutls.c (syms_of_gnutls) <libgnutls-version>: New DEFSYM.
* lisp/term/w32-win.el (dynamic-library-alist): Determine which
GnuTLS DLL to load according to value of libgnutls-version.

Fixes: bug#20294

Copyright-paperwork-exempt: yes
parent 279558f4
......@@ -214,6 +214,8 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
(defvar libgif-version)
(defvar libjpeg-version)
(defvar libgnutls-version) ; gnutls.c
;;; Set default known names for external libraries
(setq dynamic-library-alist
(list
......@@ -266,7 +268,9 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
'(gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
'(glib "libglib-2.0-0.dll")
'(gobject "libgobject-2.0-0.dll")
'(gnutls "libgnutls-28.dll" "libgnutls-26.dll")
(if (>= libgnutls-version 30400)
'(gnutls "libgnutls-30.dll")
'(gnutls "libgnutls-28.dll" "libgnutls-26.dll"))
'(libxml2 "libxml2-2.dll" "libxml2.dll")
'(zlib "zlib1.dll" "libz-1.dll")))
......
......@@ -1645,6 +1645,16 @@ DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0,
void
syms_of_gnutls (void)
{
DEFSYM (Qlibgnutls_version, "libgnutls-version");
Fset (Qlibgnutls_version,
#ifdef HAVE_GNUTLS
make_number (GNUTLS_VERSION_MAJOR * 10000
+ GNUTLS_VERSION_MINOR * 100
+ GNUTLS_VERSION_PATCH)
#else
make_number (-1)
#endif
);
#ifdef HAVE_GNUTLS
gnutls_global_initialized = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment