[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b30ee0c: Avoid link errors with older versions of G
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master b30ee0c: Avoid link errors with older versions of GnuTLS |
Date: |
Sat, 15 Jul 2017 09:54:54 -0400 (EDT) |
branch: master
commit b30ee0c9225bad6e3fd0b511a6c5d9a64b8fd66a
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid link errors with older versions of GnuTLS
* src/gnutls.c (Fgnutls_ciphers, gnutls_symmetric_aead)
(Fgnutls_macs, Fgnutls_digests): Conditionally compile code that
calls GnuTLS functions which might be unavailable in older
versions of GnuTLS.
---
src/gnutls.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gnutls.c b/src/gnutls.c
index 5e14a3a..e6f01a9 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1852,6 +1852,7 @@ The alist key is the cipher name. */)
{
Lisp_Object ciphers = Qnil;
+#ifdef HAVE_GNUTLS3_CIPHER
const gnutls_cipher_algorithm_t *gciphers = gnutls_cipher_list ();
for (ptrdiff_t pos = 0; gciphers[pos] != GNUTLS_CIPHER_NULL; pos++)
{
@@ -1877,6 +1878,7 @@ The alist key is the cipher name. */)
ciphers = Fcons (cp, ciphers);
}
+#endif
return ciphers;
}
@@ -2176,6 +2178,7 @@ name. */)
(void)
{
Lisp_Object mac_algorithms = Qnil;
+#ifdef HAVE_GNUTLS3_HMAC
const gnutls_mac_algorithm_t *macs = gnutls_mac_list ();
for (ptrdiff_t pos = 0; macs[pos] != 0; pos++)
{
@@ -2197,6 +2200,7 @@ name. */)
make_number (gnutls_mac_get_nonce_size (gma)));
mac_algorithms = Fcons (mp, mac_algorithms);
}
+#endif
return mac_algorithms;
}
@@ -2210,6 +2214,7 @@ method name. */)
(void)
{
Lisp_Object digest_algorithms = Qnil;
+#ifdef HAVE_GNUTLS3_DIGEST
const gnutls_digest_algorithm_t *digests = gnutls_digest_list ();
for (ptrdiff_t pos = 0; digests[pos] != 0; pos++)
{
@@ -2226,6 +2231,7 @@ method name. */)
digest_algorithms = Fcons (mp, digest_algorithms);
}
+#endif
return digest_algorithms;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master b30ee0c: Avoid link errors with older versions of GnuTLS,
Eli Zaretskii <=