[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106759: Allow Emacs on w32 to build
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106759: Allow Emacs on w32 to build against and work with GnuTLS 3.x. |
Date: |
Sun, 01 Jan 2012 18:26:51 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106759
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2012-01-01 18:26:51 +0200
message:
Allow Emacs on w32 to build against and work with GnuTLS 3.x.
src/gnutls.c (init_gnutls_functions): Load gnutls_check_version.
Load gnutls_transport_set_lowat only if GnuTLS version is below
2.11.1.
(emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
GnuTLS versions below 2.11.1.
lisp/term/w32-win.el (dynamic-library-alist) <gnutls>: Load
libgnutls-28.dll, from GnuTLS version 3.x, in preference to
libgnutls-26.dll.
modified:
lisp/ChangeLog
lisp/term/w32-win.el
src/ChangeLog
src/gnutls.c
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-12-31 14:43:38 +0000
+++ b/lisp/ChangeLog 2012-01-01 16:26:51 +0000
@@ -1,3 +1,9 @@
+2012-01-01 Eli Zaretskii <address@hidden>
+
+ * term/w32-win.el (dynamic-library-alist) <gnutls>: Load
+ libgnutls-28.dll, from GnuTLS version 3.x, in preference to
+ libgnutls-26.dll.
+
2011-12-31 Andreas Schwab <address@hidden>
* emacs-lisp/bytecomp.el (byte-compile-file): Fix indentation.
=== modified file 'lisp/term/w32-win.el'
--- a/lisp/term/w32-win.el 2011-10-26 13:42:33 +0000
+++ b/lisp/term/w32-win.el 2012-01-01 16:26:51 +0000
@@ -210,7 +210,7 @@
'(gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
'(glib "libglib-2.0-0.dll")
'(gobject "libgobject-2.0-0.dll")
- '(gnutls "libgnutls-26.dll")))
+ '(gnutls "libgnutls-28.dll" "libgnutls-26.dll")))
;;; multi-tty support
(defvar w32-initialized nil
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-12-31 08:36:43 +0000
+++ b/src/ChangeLog 2012-01-01 16:26:51 +0000
@@ -1,3 +1,11 @@
+2012-01-01 Eli Zaretskii <address@hidden>
+
+ * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
+ Load gnutls_transport_set_lowat only if GnuTLS version is below
+ 2.11.1.
+ (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
+ GnuTLS versions below 2.11.1.
+
2011-12-31 Antoine Levitt <address@hidden>
* xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
=== modified file 'src/gnutls.c'
--- a/src/gnutls.c 2011-10-27 08:07:28 +0000
+++ b/src/gnutls.c 2012-01-01 16:26:51 +0000
@@ -125,6 +125,7 @@
(gnutls_session_t, const void *, size_t));
DEF_GNUTLS_FN (const char *, gnutls_strerror, (int));
DEF_GNUTLS_FN (void, gnutls_transport_set_errno, (gnutls_session_t, int));
+DEF_GNUTLS_FN (const char *, gnutls_check_version, (const char *));
DEF_GNUTLS_FN (void, gnutls_transport_set_lowat, (gnutls_session_t, int));
DEF_GNUTLS_FN (void, gnutls_transport_set_ptr2,
(gnutls_session_t, gnutls_transport_ptr_t,
@@ -184,7 +185,11 @@
LOAD_GNUTLS_FN (library, gnutls_record_send);
LOAD_GNUTLS_FN (library, gnutls_strerror);
LOAD_GNUTLS_FN (library, gnutls_transport_set_errno);
- LOAD_GNUTLS_FN (library, gnutls_transport_set_lowat);
+ LOAD_GNUTLS_FN (library, gnutls_check_version);
+ /* We don't need to call gnutls_transport_set_lowat in GnuTLS 2.11.1
+ and later, and the function was removed entirely in 3.0.0. */
+ if (!fn_gnutls_check_version ("2.11.1"))
+ LOAD_GNUTLS_FN (library, gnutls_transport_set_lowat);
LOAD_GNUTLS_FN (library, gnutls_transport_set_ptr2);
LOAD_GNUTLS_FN (library, gnutls_transport_set_pull_function);
LOAD_GNUTLS_FN (library, gnutls_transport_set_push_function);
@@ -282,7 +287,12 @@
(Note: this is probably not strictly necessary as the lowat
value is only used when no custom pull/push functions are
set.) */
- fn_gnutls_transport_set_lowat (state, 0);
+ /* According to GnuTLS NEWS file, lowat level has been set to
+ zero by default in version 2.11.1, and the function
+ gnutls_transport_set_lowat was removed from the library in
+ version 2.99.0. */
+ if (!fn_gnutls_check_version ("2.11.1"))
+ fn_gnutls_transport_set_lowat (state, 0);
#else
/* This is how GnuTLS takes sockets: as file descriptors passed
in. For an Emacs process socket, infd and outfd are the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106759: Allow Emacs on w32 to build against and work with GnuTLS 3.x.,
Eli Zaretskii <=