diff options
| author | Eli Zaretskii | 2020-06-28 18:26:20 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2020-06-28 18:26:20 +0300 |
| commit | 162f375bac22786d95a253f03de0148be4fe3201 (patch) | |
| tree | 8c0c21467f302e779cc6fb9de18fd4de27fc9d8c /src | |
| parent | e4028d15153a29966425d93be6374fae770d14a8 (diff) | |
| download | emacs-162f375bac22786d95a253f03de0148be4fe3201.tar.gz emacs-162f375bac22786d95a253f03de0148be4fe3201.zip | |
MS-Windows fixes as followup to import of Gnulib 'getrandom'
* nt/mingw-cfg.site (gl_cv_lib_assume_bcrypt): Set to "no" to
disable linking against bcrypt.dll. (Bug#42095)
* src/gnutls.c (gnutls_rnd) [WINDOWSNT]: Don't define a function
pointer, and don't load it from GnuTLS DLL.
(w32_gnutls_rnd) [WINDOWSNT]: Delete unused function.
* src/fns.c (gnutls_rnd) [WINDOWSNT]: Don't redirect to
w32_gnutls_rnd.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 4 | ||||
| -rw-r--r-- | src/gnutls.c | 11 |
2 files changed, 0 insertions, 15 deletions
| @@ -39,10 +39,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 39 | #include "puresize.h" | 39 | #include "puresize.h" |
| 40 | #include "gnutls.h" | 40 | #include "gnutls.h" |
| 41 | 41 | ||
| 42 | #if defined WINDOWSNT && defined HAVE_GNUTLS3 | ||
| 43 | # define gnutls_rnd w32_gnutls_rnd | ||
| 44 | #endif | ||
| 45 | |||
| 46 | static void sort_vector_copy (Lisp_Object, ptrdiff_t, | 42 | static void sort_vector_copy (Lisp_Object, ptrdiff_t, |
| 47 | Lisp_Object *restrict, Lisp_Object *restrict); | 43 | Lisp_Object *restrict, Lisp_Object *restrict); |
| 48 | enum equal_kind { EQUAL_NO_QUIT, EQUAL_PLAIN, EQUAL_INCLUDING_PROPERTIES }; | 44 | enum equal_kind { EQUAL_NO_QUIT, EQUAL_PLAIN, EQUAL_INCLUDING_PROPERTIES }; |
diff --git a/src/gnutls.c b/src/gnutls.c index 70176c41cdd..416fb154701 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -230,7 +230,6 @@ DEF_DLL_FN (const char *, gnutls_compression_get_name, | |||
| 230 | DEF_DLL_FN (unsigned, gnutls_safe_renegotiation_status, (gnutls_session_t)); | 230 | DEF_DLL_FN (unsigned, gnutls_safe_renegotiation_status, (gnutls_session_t)); |
| 231 | 231 | ||
| 232 | # ifdef HAVE_GNUTLS3 | 232 | # ifdef HAVE_GNUTLS3 |
| 233 | DEF_DLL_FN (int, gnutls_rnd, (gnutls_rnd_level_t, void *, size_t)); | ||
| 234 | DEF_DLL_FN (const gnutls_mac_algorithm_t *, gnutls_mac_list, (void)); | 233 | DEF_DLL_FN (const gnutls_mac_algorithm_t *, gnutls_mac_list, (void)); |
| 235 | # ifdef HAVE_GNUTLS_MAC_GET_NONCE_SIZE | 234 | # ifdef HAVE_GNUTLS_MAC_GET_NONCE_SIZE |
| 236 | DEF_DLL_FN (size_t, gnutls_mac_get_nonce_size, (gnutls_mac_algorithm_t)); | 235 | DEF_DLL_FN (size_t, gnutls_mac_get_nonce_size, (gnutls_mac_algorithm_t)); |
| @@ -381,7 +380,6 @@ init_gnutls_functions (void) | |||
| 381 | # endif | 380 | # endif |
| 382 | LOAD_DLL_FN (library, gnutls_safe_renegotiation_status); | 381 | LOAD_DLL_FN (library, gnutls_safe_renegotiation_status); |
| 383 | # ifdef HAVE_GNUTLS3 | 382 | # ifdef HAVE_GNUTLS3 |
| 384 | LOAD_DLL_FN (library, gnutls_rnd); | ||
| 385 | LOAD_DLL_FN (library, gnutls_mac_list); | 383 | LOAD_DLL_FN (library, gnutls_mac_list); |
| 386 | # ifdef HAVE_GNUTLS_MAC_GET_NONCE_SIZE | 384 | # ifdef HAVE_GNUTLS_MAC_GET_NONCE_SIZE |
| 387 | LOAD_DLL_FN (library, gnutls_mac_get_nonce_size); | 385 | LOAD_DLL_FN (library, gnutls_mac_get_nonce_size); |
| @@ -519,7 +517,6 @@ init_gnutls_functions (void) | |||
| 519 | # define gnutls_x509_crt_import fn_gnutls_x509_crt_import | 517 | # define gnutls_x509_crt_import fn_gnutls_x509_crt_import |
| 520 | # define gnutls_x509_crt_init fn_gnutls_x509_crt_init | 518 | # define gnutls_x509_crt_init fn_gnutls_x509_crt_init |
| 521 | # ifdef HAVE_GNUTLS3 | 519 | # ifdef HAVE_GNUTLS3 |
| 522 | # define gnutls_rnd fn_gnutls_rnd | ||
| 523 | # define gnutls_mac_list fn_gnutls_mac_list | 520 | # define gnutls_mac_list fn_gnutls_mac_list |
| 524 | # ifdef HAVE_GNUTLS_MAC_GET_NONCE_SIZE | 521 | # ifdef HAVE_GNUTLS_MAC_GET_NONCE_SIZE |
| 525 | # define gnutls_mac_get_nonce_size fn_gnutls_mac_get_nonce_size | 522 | # define gnutls_mac_get_nonce_size fn_gnutls_mac_get_nonce_size |
| @@ -573,14 +570,6 @@ init_gnutls_functions (void) | |||
| 573 | # undef gnutls_free | 570 | # undef gnutls_free |
| 574 | # define gnutls_free (*gnutls_free_func) | 571 | # define gnutls_free (*gnutls_free_func) |
| 575 | 572 | ||
| 576 | /* This wrapper is called from fns.c, which doesn't know about the | ||
| 577 | LOAD_DLL_FN stuff above. */ | ||
| 578 | int | ||
| 579 | w32_gnutls_rnd (gnutls_rnd_level_t level, void *data, size_t len) | ||
| 580 | { | ||
| 581 | return gnutls_rnd (level, data, len); | ||
| 582 | } | ||
| 583 | |||
| 584 | # endif /* WINDOWSNT */ | 573 | # endif /* WINDOWSNT */ |
| 585 | 574 | ||
| 586 | 575 | ||