diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-01-21 07:50:54 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-01-21 07:50:54 +0100 |
commit | b0117f0d18ec9ffea9eba5c4b00ef101ecfb7e15 (patch) | |
tree | 0eb461bf12364ab5c2a65f45e33be209214ee145 /src/core | |
parent | b30ad7d7f600a3d36046bf1d8006ddc96dd778bf (diff) | |
download | weechat-b0117f0d18ec9ffea9eba5c4b00ef101ecfb7e15.zip |
core: add gnutls version in #if compiler directives
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-hook.c | 2 | ||||
-rw-r--r-- | src/core/wee-hook.h | 4 | ||||
-rw-r--r-- | src/core/wee-network.c | 11 |
3 files changed, 7 insertions, 10 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 5de382d27..70c70934d 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -2167,7 +2167,7 @@ hook_connect_gnutls_set_certificates (gnutls_session_t tls_session, const gnutls_datum_t *req_ca, int nreq, const gnutls_pk_algorithm_t *pk_algos, int pk_algos_len, -#if LIBGNUTLS_VERSION_NUMBER >= 0x020b00 +#if LIBGNUTLS_VERSION_NUMBER >= 0x020b00 /* 2.11.0 */ gnutls_retr2_st *answer) #else gnutls_retr_st *answer) diff --git a/src/core/wee-hook.h b/src/core/wee-hook.h index 4b0d51cd2..882ffc5c2 100644 --- a/src/core/wee-hook.h +++ b/src/core/wee-hook.h @@ -245,7 +245,7 @@ typedef int (gnutls_callback_t)(void *data, gnutls_session_t tls_session, const gnutls_datum_t *req_ca, int nreq, const gnutls_pk_algorithm_t *pk_algos, int pk_algos_len, -#if LIBGNUTLS_VERSION_NUMBER >= 0x020b00 +#if LIBGNUTLS_VERSION_NUMBER >= 0x020b00 /* 2.11.0 */ gnutls_retr2_st *answer, #else gnutls_retr_st *answer, @@ -502,7 +502,7 @@ extern int hook_connect_gnutls_set_certificates (gnutls_session_t tls_session, const gnutls_datum_t *req_ca, int nreq, const gnutls_pk_algorithm_t *pk_algos, int pk_algos_len, -#if LIBGNUTLS_VERSION_NUMBER >= 0x020b00 +#if LIBGNUTLS_VERSION_NUMBER >= 0x020b00 /* 2.11.0 */ gnutls_retr2_st *answer); #else gnutls_retr_st *answer); diff --git a/src/core/wee-network.c b/src/core/wee-network.c index 19517d48b..1ec64b028 100644 --- a/src/core/wee-network.c +++ b/src/core/wee-network.c @@ -127,17 +127,14 @@ network_init_gnutls () gnutls_certificate_allocate_credentials (&gnutls_xcred); network_set_gnutls_ca_file (); -#if LIBGNUTLS_VERSION_NUMBER >= 0x02090a - /* for gnutls >= 2.9.10 */ +#if LIBGNUTLS_VERSION_NUMBER >= 0x02090a /* 2.9.10 */ gnutls_certificate_set_verify_function (gnutls_xcred, &hook_connect_gnutls_verify_certificates); #endif -#if LIBGNUTLS_VERSION_NUMBER >= 0x020b00 - /* for gnutls >= 2.11.0 */ +#if LIBGNUTLS_VERSION_NUMBER >= 0x020b00 /* 2.11.0 */ gnutls_certificate_set_retrieve_function (gnutls_xcred, &hook_connect_gnutls_set_certificates); #else - /* for gnutls < 2.11.0 */ gnutls_certificate_client_set_retrieve_function (gnutls_xcred, &hook_connect_gnutls_set_certificates); #endif @@ -1299,7 +1296,7 @@ network_connect_gnutls_handshake_fd_cb (void *arg_hook_connect, int fd) { fcntl (HOOK_CONNECT(hook_connect, sock), F_SETFL, HOOK_CONNECT(hook_connect, handshake_fd_flags)); -#if LIBGNUTLS_VERSION_NUMBER < 0x02090a +#if LIBGNUTLS_VERSION_NUMBER < 0x02090a /* 2.9.10 */ /* * gnutls only has the gnutls_certificate_set_verify_function() * function since version 2.9.10. We need to call our verify @@ -1529,7 +1526,7 @@ network_connect_child_read_cb (void *arg_hook_connect, int fd) } fcntl (HOOK_CONNECT(hook_connect, sock), F_SETFL, HOOK_CONNECT(hook_connect, handshake_fd_flags)); -#if LIBGNUTLS_VERSION_NUMBER < 0x02090a +#if LIBGNUTLS_VERSION_NUMBER < 0x02090a /* 2.9.10 */ /* * gnutls only has the gnutls_certificate_set_verify_function() * function since version 2.9.10. We need to call our verify |