From: Chris Zheng Date: Wed, 3 Dec 2014 14:38:39 +0000 (+0100) Subject: Fix gnutls.c build on MinGW X-Git-Tag: emacs-25.0.90~2635^2~216 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=38aaf904c7f0feda58a1c321af6042ab29ee7716;p=emacs.git Fix gnutls.c build on MinGW Fixes: debbugs:19231 * gnutls.c (init_gnutls_functions, gnutls_certificate_details): Use gnutls_sign_get_name directly because gnutls_sign_algorithm_get_name is a macro on MinGW. (init_gnutls_functions): Load missing gnutls_server_name_set. --- diff --git a/src/ChangeLog b/src/ChangeLog index 7dc2b928f1e..a48788380f9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2014-12-03 Chris Zheng (tiny change) + + * gnutls.c (init_gnutls_functions, gnutls_certificate_details): + Use gnutls_sign_get_name directly because + gnutls_sign_algorithm_get_name is a macro on MinGW (bug#19231). + (init_gnutls_functions): Load missing gnutls_server_name_set. + 2014-12-02 Eli Zaretskii * bidi.c (bidi_find_first_overridden): New function. diff --git a/src/gnutls.c b/src/gnutls.c index 752df3c8edd..7c61445de92 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -185,7 +185,7 @@ DEF_GNUTLS_FN (int, gnutls_x509_crt_get_key_id, (gnutls_x509_crt_t, unsigned int, unsigned char *, size_t *_size)); DEF_GNUTLS_FN (const char*, gnutls_sec_param_get_name, (gnutls_sec_param_t)); -DEF_GNUTLS_FN (const char*, gnutls_sign_algorithm_get_name, +DEF_GNUTLS_FN (const char*, gnutls_sign_get_name, (gnutls_sign_algorithm_t)); DEF_GNUTLS_FN (int, gnutls_server_name_set, (gnutls_session_t, gnutls_server_name_type_t, @@ -265,7 +265,8 @@ init_gnutls_functions (void) LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_signature); LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_key_id); LOAD_GNUTLS_FN (library, gnutls_sec_param_get_name); - LOAD_GNUTLS_FN (library, gnutls_sign_algorithm_get_name); + LOAD_GNUTLS_FN (library, gnutls_sign_get_name); + LOAD_GNUTLS_FN (library, gnutls_server_name_set); max_log_level = global_gnutls_log_level; @@ -337,7 +338,7 @@ init_gnutls_functions (void) #define fn_gnutls_x509_crt_get_signature gnutls_x509_crt_get_signature #define fn_gnutls_x509_crt_get_key_id gnutls_x509_crt_get_key_id #define fn_gnutls_sec_param_get_name gnutls_sec_param_get_name -#define fn_gnutls_sign_algorithm_get_name gnutls_sign_algorithm_get_name +#define fn_gnutls_sign_get_name gnutls_sign_get_name #define fn_gnutls_server_name_set gnutls_server_name_set #endif /* !WINDOWSNT */ @@ -928,7 +929,7 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) err = fn_gnutls_x509_crt_get_signature_algorithm (cert); if (err >= GNUTLS_E_SUCCESS) { - const char *name = fn_gnutls_sign_algorithm_get_name (err); + const char *name = fn_gnutls_sign_get_name (err); if (name) res = nconc2 (res, list2 (intern (":signature-algorithm"), build_string (name)));