Commit 162f375b authored by Eli Zaretskii's avatar Eli Zaretskii

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.
parent e4028d15
Pipeline #5959 failed with stage
in 26 seconds
......@@ -153,3 +153,6 @@ gl_cv_warn_c__Wredundant_decls=no
# missing prototype, since lib/unistd.h, where Gnulib has its
# prototype, isn't built on Windows.
gl_cv_func_copy_file_range=yes
# We don't want to build Emacs so it depends on bcrypt.dll, since then
# it will refuse to start on systems where that DLL is absent.
gl_cv_lib_assume_bcrypt=no
......@@ -39,10 +39,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include "puresize.h"
#include "gnutls.h"
#if defined WINDOWSNT && defined HAVE_GNUTLS3
# define gnutls_rnd w32_gnutls_rnd
#endif
static void sort_vector_copy (Lisp_Object, ptrdiff_t,
Lisp_Object *restrict, Lisp_Object *restrict);
enum equal_kind { EQUAL_NO_QUIT, EQUAL_PLAIN, EQUAL_INCLUDING_PROPERTIES };
......
......@@ -230,7 +230,6 @@ DEF_DLL_FN (const char *, gnutls_compression_get_name,
DEF_DLL_FN (unsigned, gnutls_safe_renegotiation_status, (gnutls_session_t));
# ifdef HAVE_GNUTLS3
DEF_DLL_FN (int, gnutls_rnd, (gnutls_rnd_level_t, void *, size_t));
DEF_DLL_FN (const gnutls_mac_algorithm_t *, gnutls_mac_list, (void));
# ifdef HAVE_GNUTLS_MAC_GET_NONCE_SIZE
DEF_DLL_FN (size_t, gnutls_mac_get_nonce_size, (gnutls_mac_algorithm_t));
......@@ -381,7 +380,6 @@ init_gnutls_functions (void)
# endif
LOAD_DLL_FN (library, gnutls_safe_renegotiation_status);
# ifdef HAVE_GNUTLS3
LOAD_DLL_FN (library, gnutls_rnd);
LOAD_DLL_FN (library, gnutls_mac_list);
# ifdef HAVE_GNUTLS_MAC_GET_NONCE_SIZE
LOAD_DLL_FN (library, gnutls_mac_get_nonce_size);
......@@ -519,7 +517,6 @@ init_gnutls_functions (void)
# define gnutls_x509_crt_import fn_gnutls_x509_crt_import
# define gnutls_x509_crt_init fn_gnutls_x509_crt_init
# ifdef HAVE_GNUTLS3
# define gnutls_rnd fn_gnutls_rnd
# define gnutls_mac_list fn_gnutls_mac_list
# ifdef HAVE_GNUTLS_MAC_GET_NONCE_SIZE
# define gnutls_mac_get_nonce_size fn_gnutls_mac_get_nonce_size
......@@ -573,14 +570,6 @@ init_gnutls_functions (void)
# undef gnutls_free
# define gnutls_free (*gnutls_free_func)
/* This wrapper is called from fns.c, which doesn't know about the
LOAD_DLL_FN stuff above. */
int
w32_gnutls_rnd (gnutls_rnd_level_t level, void *data, size_t len)
{
return gnutls_rnd (level, data, len);
}
# endif /* WINDOWSNT */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment