mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge #7506 'deps: update libuv'
This commit is contained in:
commit
c45a859171
@ -731,7 +731,7 @@ describe('jobs', function()
|
|||||||
local children
|
local children
|
||||||
retry(nil, nil, function()
|
retry(nil, nil, function()
|
||||||
children = meths.get_proc_children(ppid)
|
children = meths.get_proc_children(ppid)
|
||||||
eq(3, #children)
|
eq((iswin() and 4 or 3), #children)
|
||||||
end)
|
end)
|
||||||
-- Assert that nvim_get_proc() sees the children.
|
-- Assert that nvim_get_proc() sees the children.
|
||||||
for _, child_pid in ipairs(children) do
|
for _, child_pid in ipairs(children) do
|
||||||
|
@ -6,6 +6,7 @@ local feed_command = helpers.feed_command
|
|||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
local eq = helpers.eq
|
local eq = helpers.eq
|
||||||
local eval = helpers.eval
|
local eval = helpers.eval
|
||||||
|
local iswin = helpers.iswin
|
||||||
|
|
||||||
describe('terminal', function()
|
describe('terminal', function()
|
||||||
local screen
|
local screen
|
||||||
@ -68,6 +69,15 @@ describe('terminal', function()
|
|||||||
it('forwards resize request to the program', function()
|
it('forwards resize request to the program', function()
|
||||||
feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom.
|
feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom.
|
||||||
screen:try_resize(screen._width - 3, screen._height - 2)
|
screen:try_resize(screen._width - 3, screen._height - 2)
|
||||||
|
|
||||||
|
if iswin() then
|
||||||
|
-- win: less-precise test, SIGWINCH is noisy there. #7506
|
||||||
|
screen:expect{any='rows: 7, cols: 47'}
|
||||||
|
screen:try_resize(screen._width - 6, screen._height - 3)
|
||||||
|
screen:expect{any='rows: 4, cols: 41'}
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
tty ready |
|
tty ready |
|
||||||
rows: 7, cols: 47 |
|
rows: 7, cols: 47 |
|
||||||
|
4
third-party/CMakeLists.txt
vendored
4
third-party/CMakeLists.txt
vendored
@ -120,8 +120,8 @@ endif()
|
|||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
|
||||||
set(LIBUV_URL https://github.com/libuv/libuv/archive/v1.12.0.tar.gz)
|
set(LIBUV_URL https://github.com/libuv/libuv/archive/v1.23.2.tar.gz)
|
||||||
set(LIBUV_SHA256 41ce914a88da21d3b07a76023beca57576ca5b376c6ac440c80bc581cbca1250)
|
set(LIBUV_SHA256 30af979c4f4b8d1b895ae6d115f7400c751542ccb9e656350fc89fda08d4eabd)
|
||||||
|
|
||||||
set(MSGPACK_URL https://github.com/msgpack/msgpack-c/releases/download/cpp-3.0.0/msgpack-3.0.0.tar.gz)
|
set(MSGPACK_URL https://github.com/msgpack/msgpack-c/releases/download/cpp-3.0.0/msgpack-3.0.0.tar.gz)
|
||||||
set(MSGPACK_SHA256 bfbb71b7c02f806393bc3cbc491b40523b89e64f83860c58e3e54af47de176e4)
|
set(MSGPACK_SHA256 bfbb71b7c02f806393bc3cbc491b40523b89e64f83860c58e3e54af47de176e4)
|
||||||
|
10
third-party/cmake/BuildLibuv.cmake
vendored
10
third-party/cmake/BuildLibuv.cmake
vendored
@ -7,7 +7,7 @@ function(BuildLibuv)
|
|||||||
cmake_parse_arguments(_libuv
|
cmake_parse_arguments(_libuv
|
||||||
"BUILD_IN_SOURCE"
|
"BUILD_IN_SOURCE"
|
||||||
"TARGET"
|
"TARGET"
|
||||||
"PATCH_COMMAND;CONFIGURE_COMMAND;BUILD_COMMAND;INSTALL_COMMAND"
|
"CONFIGURE_COMMAND;BUILD_COMMAND;INSTALL_COMMAND"
|
||||||
${ARGN})
|
${ARGN})
|
||||||
|
|
||||||
if(NOT _libuv_CONFIGURE_COMMAND AND NOT _libuv_BUILD_COMMAND
|
if(NOT _libuv_CONFIGURE_COMMAND AND NOT _libuv_BUILD_COMMAND
|
||||||
@ -31,7 +31,6 @@ function(BuildLibuv)
|
|||||||
-DUSE_EXISTING_SRC_DIR=${USE_EXISTING_SRC_DIR}
|
-DUSE_EXISTING_SRC_DIR=${USE_EXISTING_SRC_DIR}
|
||||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
|
||||||
BUILD_IN_SOURCE ${_libuv_BUILD_IN_SOURCE}
|
BUILD_IN_SOURCE ${_libuv_BUILD_IN_SOURCE}
|
||||||
PATCH_COMMAND "${_libuv_PATCH_COMMAND}"
|
|
||||||
CONFIGURE_COMMAND "${_libuv_CONFIGURE_COMMAND}"
|
CONFIGURE_COMMAND "${_libuv_CONFIGURE_COMMAND}"
|
||||||
BUILD_COMMAND "${_libuv_BUILD_COMMAND}"
|
BUILD_COMMAND "${_libuv_BUILD_COMMAND}"
|
||||||
INSTALL_COMMAND "${_libuv_INSTALL_COMMAND}")
|
INSTALL_COMMAND "${_libuv_INSTALL_COMMAND}")
|
||||||
@ -42,11 +41,6 @@ set(UNIX_CFGCMD sh ${DEPS_BUILD_DIR}/src/libuv/autogen.sh &&
|
|||||||
--prefix=${DEPS_INSTALL_DIR} --libdir=${DEPS_INSTALL_DIR}/lib
|
--prefix=${DEPS_INSTALL_DIR} --libdir=${DEPS_INSTALL_DIR}/lib
|
||||||
CC=${DEPS_C_COMPILER})
|
CC=${DEPS_C_COMPILER})
|
||||||
|
|
||||||
set(LIBUV_PATCH_COMMAND
|
|
||||||
${GIT_EXECUTABLE} -C ${DEPS_BUILD_DIR}/src/libuv init
|
|
||||||
COMMAND ${GIT_EXECUTABLE} -C ${DEPS_BUILD_DIR}/src/libuv apply --ignore-whitespace
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/patches/libuv-overlapped.patch)
|
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
BuildLibuv(
|
BuildLibuv(
|
||||||
CONFIGURE_COMMAND ${UNIX_CFGCMD} MAKE=${MAKE_PRG}
|
CONFIGURE_COMMAND ${UNIX_CFGCMD} MAKE=${MAKE_PRG}
|
||||||
@ -60,7 +54,6 @@ elseif(MINGW AND CMAKE_CROSSCOMPILING)
|
|||||||
|
|
||||||
# Build libuv for the target
|
# Build libuv for the target
|
||||||
BuildLibuv(
|
BuildLibuv(
|
||||||
PATCH_COMMAND ${LIBUV_PATCH_COMMAND}
|
|
||||||
CONFIGURE_COMMAND ${UNIX_CFGCMD} --host=${CROSS_TARGET}
|
CONFIGURE_COMMAND ${UNIX_CFGCMD} --host=${CROSS_TARGET}
|
||||||
INSTALL_COMMAND ${MAKE_PRG} V=1 install)
|
INSTALL_COMMAND ${MAKE_PRG} V=1 install)
|
||||||
|
|
||||||
@ -75,7 +68,6 @@ elseif(WIN32)
|
|||||||
message(FATAL_ERROR "Trying to build libuv in an unsupported system ${CMAKE_SYSTEM_NAME}/${CMAKE_C_COMPILER_ID}")
|
message(FATAL_ERROR "Trying to build libuv in an unsupported system ${CMAKE_SYSTEM_NAME}/${CMAKE_C_COMPILER_ID}")
|
||||||
endif()
|
endif()
|
||||||
BuildLibUv(BUILD_IN_SOURCE
|
BuildLibUv(BUILD_IN_SOURCE
|
||||||
PATCH_COMMAND ${LIBUV_PATCH_COMMAND}
|
|
||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
|
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibuvCMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibuvCMakeLists.txt
|
||||||
${DEPS_BUILD_DIR}/src/libuv/CMakeLists.txt
|
${DEPS_BUILD_DIR}/src/libuv/CMakeLists.txt
|
||||||
|
13
third-party/cmake/LibuvCMakeLists.txt
vendored
13
third-party/cmake/LibuvCMakeLists.txt
vendored
@ -13,14 +13,17 @@ if(BUILD_SHARED_LIBS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(FILES
|
install(FILES
|
||||||
include/tree.h
|
|
||||||
include/uv.h
|
include/uv.h
|
||||||
include/uv-version.h
|
|
||||||
include/uv-errno.h
|
|
||||||
include/uv-threadpool.h
|
|
||||||
include/uv-win.h
|
|
||||||
DESTINATION include)
|
DESTINATION include)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
include/uv/errno.h
|
||||||
|
include/uv/threadpool.h
|
||||||
|
include/uv/tree.h
|
||||||
|
include/uv/version.h
|
||||||
|
include/uv/win.h
|
||||||
|
DESTINATION include/uv)
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
install(TARGETS uv
|
install(TARGETS uv
|
||||||
PUBLIC_HEADER
|
PUBLIC_HEADER
|
||||||
|
33
third-party/patches/libuv-overlapped.patch
vendored
33
third-party/patches/libuv-overlapped.patch
vendored
@ -1,33 +0,0 @@
|
|||||||
diff --git a/include/uv.h b/include/uv.h
|
|
||||||
index cdd251d8..79b7930e 100644
|
|
||||||
--- a/include/uv.h
|
|
||||||
+++ b/include/uv.h
|
|
||||||
@@ -865,7 +865,8 @@ typedef enum {
|
|
||||||
* flags may be specified to create a duplex data stream.
|
|
||||||
*/
|
|
||||||
UV_READABLE_PIPE = 0x10,
|
|
||||||
- UV_WRITABLE_PIPE = 0x20
|
|
||||||
+ UV_WRITABLE_PIPE = 0x20,
|
|
||||||
+ UV_OVERLAPPED_PIPE = 0x40
|
|
||||||
} uv_stdio_flags;
|
|
||||||
|
|
||||||
typedef struct uv_stdio_container_s {
|
|
||||||
diff --git a/src/win/process-stdio.c b/src/win/process-stdio.c
|
|
||||||
index 032e3093..b53bdea7 100644
|
|
||||||
--- a/src/win/process-stdio.c
|
|
||||||
+++ b/src/win/process-stdio.c
|
|
||||||
@@ -131,12 +131,13 @@ static int uv__create_stdio_pipe_pair(uv_loop_t* loop,
|
|
||||||
sa.lpSecurityDescriptor = NULL;
|
|
||||||
sa.bInheritHandle = TRUE;
|
|
||||||
|
|
||||||
+ BOOL overlap = server_pipe->ipc || (flags & UV_OVERLAPPED_PIPE);
|
|
||||||
child_pipe = CreateFileA(pipe_name,
|
|
||||||
client_access,
|
|
||||||
0,
|
|
||||||
&sa,
|
|
||||||
OPEN_EXISTING,
|
|
||||||
- server_pipe->ipc ? FILE_FLAG_OVERLAPPED : 0,
|
|
||||||
+ overlap ? FILE_FLAG_OVERLAPPED : 0,
|
|
||||||
NULL);
|
|
||||||
if (child_pipe == INVALID_HANDLE_VALUE) {
|
|
||||||
err = GetLastError();
|
|
Loading…
Reference in New Issue
Block a user