Cleanup the uv_import check

The uv_import() is not needed anymore, so we can remove the autoconf
check for it.
This commit is contained in:
Ondřej Surý 2021-05-27 13:05:46 +02:00
parent db8ff45f0b
commit 7b02848865
5 changed files with 3 additions and 50 deletions

View file

@ -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@

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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);