+2014-12-11 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * emacs.c (main): Always include gnutls.h and run syms_of_gnutls.
+
+ * gnutls.h: Always declare syms_of_gnutls.
+
+ * gnutls.c (Fgnutls_available_p syms_of_gnutls): Move later for
+ clarity. Let the availability check return Qnil when the GnuTLS
+ integration is not available, instead of erroring out.
+ (Bug#19346)
+
2014-12-10 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (move_it_in_display_line_to, display_line): Don't
return emacs_gnutls_deinit (proc);
}
-DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0,
- doc: /* Return t if GnuTLS is available in this instance of Emacs. */)
- (void)
-{
-#ifdef WINDOWSNT
- Lisp_Object found = Fassq (Qgnutls_dll, Vlibrary_cache);
- if (CONSP (found))
- return XCDR (found);
- else
- {
- Lisp_Object status;
- status = init_gnutls_functions () ? Qt : Qnil;
- Vlibrary_cache = Fcons (Fcons (Qgnutls_dll, status), Vlibrary_cache);
- return status;
- }
-#else
- return Qt;
-#endif
-}
-
-
/* Initializes global GnuTLS state to defaults.
Call `gnutls-global-deinit' when GnuTLS usage is no longer needed.
Returns zero on success. */
return gnutls_make_error (ret);
}
+DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0,
+ doc: /* Return t if GnuTLS is available in this instance of Emacs. */)
+ (void)
+{
+#ifdef WINDOWSNT
+ Lisp_Object found = Fassq (Qgnutls_dll, Vlibrary_cache);
+ if (CONSP (found))
+ return XCDR (found);
+ else
+ {
+ Lisp_Object status;
+ status = init_gnutls_functions () ? Qt : Qnil;
+ Vlibrary_cache = Fcons (Fcons (Qgnutls_dll, status), Vlibrary_cache);
+ return status;
+ }
+#else
+ return Qt;
+#endif
+}
+
void
syms_of_gnutls (void)
{
global_gnutls_log_level = 0;
}
+#else
+
+DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0,
+ doc: /* Return t if GnuTLS is available in this instance of Emacs. */)
+ (void)
+{
+ return Qnil;
+}
+
+void
+syms_of_gnutls (void)
+{
+ defsubr (&Sgnutls_available_p);
+}
+
#endif /* HAVE_GNUTLS */