]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix gnutls.c build on MinGW
authorChris Zheng <chriszheng99@gmail.com>
Wed, 3 Dec 2014 14:38:39 +0000 (15:38 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 3 Dec 2014 14:40:18 +0000 (15:40 +0100)
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.

src/ChangeLog
src/gnutls.c

index 7dc2b928f1ed188af58a6d981b3b360eb9d8b4f8..a48788380f92661da418ef737d233ef9cdb491ed 100644 (file)
@@ -1,3 +1,10 @@
+2014-12-03  Chris Zheng  <chriszheng99@gmail.com>  (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  <eliz@gnu.org>
 
        * bidi.c (bidi_find_first_overridden): New function.
index 752df3c8edd7c5e7168715564b0ad30ff753cade..7c61445de92d2c637180286fb0e2b70577570013 100644 (file)
@@ -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)));