diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2011-05-04 16:03:16 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2011-05-04 16:03:16 +0200 |
commit | 3bf83113b672b7124b26fe09ecaa26f7f91e782b (patch) | |
tree | 94ecb3c6640253c7044ab3db6d4c951ad5d7d93e /nt | |
parent | 7594b1024250e0103f62f0be671617b7166fdfda (diff) | |
download | emacs-3bf83113b672b7124b26fe09ecaa26f7f91e782b.tar.gz |
Implement dynamic loading of GnuTLS on Windows.
* lisp/term/w32-win.el (dynamic-library-alist): Add `gnutls'.
* nt/INSTALL: Clarify GnuTLS support.
* src/callproc.c, src/emacs.c: Include lisp.h before src/w32.h, not after.
* src/gnutls.c (Qgnutls_dll): Define.
(DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
(gnutls_*): Declare function pointers.
(init_gnutls_functions): New function to initialize function pointers.
(emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
(emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
(emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
(emacs_gnutls_write, emacs_gnutls_read)
(emacs_gnutls_handle_error, Fgnutls_error_fatalp)
(Fgnutls_available_p): New function.
(Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
(syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
(syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
* src/gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
(emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
(emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
Declare.
* src/w32.c (QCloaded_from, Vlibrary_cache): Define.
(w32_delayed_load): Move from image.c. When loading a library, record
its filename in the :loaded-from property of the library id.
(globals_of_w32) <QCloaded_from, Vlibrary_cache>:
Initialize and staticpro them.
(emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
* src/image.c: Include w32.h.
(Vimage_type_cache): Delete.
(syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
(CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
(w32_delayed_load): Move to w32.c.
* src/process.c: Include lisp.h before src/w32.h, not after.
(wait_reading_process_output): Call emacs_gnutls_record_check_pending
instead of gnutls_record_check_pending.
* src/w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
Diffstat (limited to 'nt')
-rw-r--r-- | nt/ChangeLog | 4 | ||||
-rw-r--r-- | nt/INSTALL | 15 |
2 files changed, 14 insertions, 5 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 6543f94c4b5..869511954ed 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2011-05-04 Juanma Barranquero <lekktu@gmail.com> + + * INSTALL: Clarify GnuTLS support. + 2011-04-30 Eli Zaretskii <eliz@gnu.org> * config.nt (HAVE_LONG_LONG_INT, HAVE_UNSIGNED_LONG_LONG_INT): diff --git a/nt/INSTALL b/nt/INSTALL index dc57cd20b8c..2a1a9aaab12 100644 --- a/nt/INSTALL +++ b/nt/INSTALL @@ -325,12 +325,17 @@ * Optional GnuTLS support - You can build Emacs with GnuTLS support. Put the gnutls/gnutls.h header in - the include path and link to the appropriate libraries (gnutls.dll and - gcrypt.dll) with the --lib option. + If configure.bat finds the gnutls/gnutls.h file in the include path, + Emacs is built with GnuTLS support by default; to avoid that you can + pass the argument --without-gnutls. - You can get pre-built binaries and an installer at - http://josefsson.org/gnutls4win/. + In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must + be able to find the relevant DLLs during startup; failure to do so + is not an error, but GnuTLS won't be available to the running + session. + + You can get pre-built binaries (including any required DLL and the + gnutls.h file) and an installer at http://josefsson.org/gnutls4win/. * Experimental SVG support |