From: Ondřej Surý Date: Thu, 27 May 2021 11:05:46 +0000 (+0200) Subject: Cleanup the uv_import check X-Git-Tag: v9.17.14~13^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b02848865131dd9636ce25a4a4d9d7ca705c2f2;p=thirdparty%2Fbind9.git Cleanup the uv_import check The uv_import() is not needed anymore, so we can remove the autoconf check for it. --- diff --git a/config.h.win32 b/config.h.win32 index bd583dbe906..c76993dd8a8 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -379,13 +379,10 @@ typedef __int64 off_t; #define SSL_CTX_UP_REF 1 /* Define to 1 if you have the `uv_handle_get_data' function. */ -@HAVE_UV_HANDLE_GET_DATA@ +#define HAVE_UV_HANDLE_GET_DATA 1 /* Define to 1 if you have the `uv_handle_set_data' function. */ -@HAVE_UV_HANDLE_SET_DATA@ - -/* Define to 1 if you have the `uv_import' function. */ -@HAVE_UV_IMPORT@ +#define HAVE_UV_HANDLE_SET_DATA 1 /* GSSAPI Related defines */ @HAVE_GSSAPI@ diff --git a/configure.ac b/configure.ac index 9b991414195..467c7d14d7b 100644 --- a/configure.ac +++ b/configure.ac @@ -600,7 +600,7 @@ LIBS="$LIBS $LIBUV_LIBS" # Those functions are only provided in newer versions of libuv, we'll be emulating them # for now -AC_CHECK_FUNCS([uv_handle_get_data uv_handle_set_data uv_import uv_udp_connect uv_translate_sys_error uv_sleep]) +AC_CHECK_FUNCS([uv_handle_get_data uv_handle_set_data uv_udp_connect uv_translate_sys_error uv_sleep]) AX_RESTORE_FLAGS([libuv]) # libnghttp2 diff --git a/util/copyrights b/util/copyrights index 22a6cbc9080..9e4beecd80d 100644 --- a/util/copyrights +++ b/util/copyrights @@ -2260,4 +2260,3 @@ ./win32utils/Configure PERL 2013,2014,2015,2016,2017,2018,2019,2020,2021 ./win32utils/GeoIP.diff X 2013,2018,2019,2020,2021 ./win32utils/bind9.sln.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./win32utils/libuv.diff X 2020,2021 diff --git a/win32utils/Configure b/win32utils/Configure index c5870ea78aa..c3903f0a842 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -172,9 +172,6 @@ my @substdefh = ("PACKAGE_VERSION_MAJOR", "WITH_IDN", "CPU_RELAX", "VALIDATION_DEFAULT", - "HAVE_UV_HANDLE_GET_DATA", - "HAVE_UV_HANDLE_SET_DATA", - "HAVE_UV_IMPORT", ); # for platform.h @@ -1276,13 +1273,6 @@ if ($use_libuv eq "auto") { if ($use_libuv eq "auto") { die "can't find an libuv built directory at sibling root\n"; } - - # When a libuv version exposing uv_import() and uv_export() is released, the - # following three config.h macros will need to be conditionally defined for - # that libuv version and all later ones. - # $configdefh{"HAVE_UV_HANDLE_SET_DATA"} = 1; - # $configdefh{"HAVE_UV_HANDLE_GET_DATA"} = 1; - # $configdefh{"HAVE_UV_IMPORT"} = 1; } # falls into (so no else) if ($use_libuv eq "yes") { @@ -1309,12 +1299,6 @@ if ($use_libuv eq "yes") { $configinc{"LIBUV_INC"} = "$libuv_inc"; $configlib{"LIBUV_LIB"} = "$libuv_lib"; $configdll{"LIBUV_DLL"} = "$libuv_dll"; - # When a libuv version exposing uv_import() and uv_export() is released, the - # following three config.h macros will need to be conditionally defined for - # that libuv version and all later ones. - # $configdefh{"HAVE_UV_HANDLE_SET_DATA"} = 1; - # $configdefh{"HAVE_UV_HANDLE_GET_DATA"} = 1; - # $configdefh{"HAVE_UV_IMPORT"} = 1; } # with-nghttp2 diff --git a/win32utils/libuv.diff b/win32utils/libuv.diff deleted file mode 100644 index 41f3796cccc..00000000000 --- a/win32utils/libuv.diff +++ /dev/null @@ -1,27 +0,0 @@ -To make TCP listening properly multithreaded, we need to have the -uv_export() and uv_import() functions that were removed from libuv. -The alternative is passing sockets over IPC, which is complicated and -error prone. - -To make it simple, we export two internal functions from libuv; they will -be used in lib/isc/netmgr/uv-compat.c by our versions of the uv_export() -and uv_import() functions. - -diff --git a/src/win/internal.h b/src/win/internal.h -index 058ddb8e..a9dc4168 100644 ---- a/src/win/internal.h -+++ b/src/win/internal.h -@@ -92,11 +92,11 @@ void uv_process_tcp_connect_req(uv_loop_t* loop, uv_tcp_t* handle, - void uv_tcp_close(uv_loop_t* loop, uv_tcp_t* tcp); - void uv_tcp_endgame(uv_loop_t* loop, uv_tcp_t* handle); - --int uv__tcp_xfer_export(uv_tcp_t* handle, -+UV_EXTERN int uv__tcp_xfer_export(uv_tcp_t* handle, - int pid, - uv__ipc_socket_xfer_type_t* xfer_type, - uv__ipc_socket_xfer_info_t* xfer_info); --int uv__tcp_xfer_import(uv_tcp_t* tcp, -+UV_EXTERN int uv__tcp_xfer_import(uv_tcp_t* tcp, - uv__ipc_socket_xfer_type_t xfer_type, - uv__ipc_socket_xfer_info_t* xfer_info); -