Merge #7506 'deps: update libuv'

This commit is contained in:
Justin M. Keyes 2018-11-01 20:42:20 +01:00 committed by GitHub
commit c45a859171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 50 deletions

View File

@ -731,7 +731,7 @@ describe('jobs', function()
local children
retry(nil, nil, function()
children = meths.get_proc_children(ppid)
eq(3, #children)
eq((iswin() and 4 or 3), #children)
end)
-- Assert that nvim_get_proc() sees the children.
for _, child_pid in ipairs(children) do

View File

@ -6,6 +6,7 @@ local feed_command = helpers.feed_command
local command = helpers.command
local eq = helpers.eq
local eval = helpers.eval
local iswin = helpers.iswin
describe('terminal', function()
local screen
@ -68,6 +69,15 @@ describe('terminal', function()
it('forwards resize request to the program', function()
feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom.
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([[
tty ready |
rows: 7, cols: 47 |

View File

@ -120,8 +120,8 @@ endif()
include(ExternalProject)
set(LIBUV_URL https://github.com/libuv/libuv/archive/v1.12.0.tar.gz)
set(LIBUV_SHA256 41ce914a88da21d3b07a76023beca57576ca5b376c6ac440c80bc581cbca1250)
set(LIBUV_URL https://github.com/libuv/libuv/archive/v1.23.2.tar.gz)
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_SHA256 bfbb71b7c02f806393bc3cbc491b40523b89e64f83860c58e3e54af47de176e4)

View File

@ -7,7 +7,7 @@ function(BuildLibuv)
cmake_parse_arguments(_libuv
"BUILD_IN_SOURCE"
"TARGET"
"PATCH_COMMAND;CONFIGURE_COMMAND;BUILD_COMMAND;INSTALL_COMMAND"
"CONFIGURE_COMMAND;BUILD_COMMAND;INSTALL_COMMAND"
${ARGN})
if(NOT _libuv_CONFIGURE_COMMAND AND NOT _libuv_BUILD_COMMAND
@ -31,7 +31,6 @@ function(BuildLibuv)
-DUSE_EXISTING_SRC_DIR=${USE_EXISTING_SRC_DIR}
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
BUILD_IN_SOURCE ${_libuv_BUILD_IN_SOURCE}
PATCH_COMMAND "${_libuv_PATCH_COMMAND}"
CONFIGURE_COMMAND "${_libuv_CONFIGURE_COMMAND}"
BUILD_COMMAND "${_libuv_BUILD_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
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)
BuildLibuv(
CONFIGURE_COMMAND ${UNIX_CFGCMD} MAKE=${MAKE_PRG}
@ -60,7 +54,6 @@ elseif(MINGW AND CMAKE_CROSSCOMPILING)
# Build libuv for the target
BuildLibuv(
PATCH_COMMAND ${LIBUV_PATCH_COMMAND}
CONFIGURE_COMMAND ${UNIX_CFGCMD} --host=${CROSS_TARGET}
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}")
endif()
BuildLibUv(BUILD_IN_SOURCE
PATCH_COMMAND ${LIBUV_PATCH_COMMAND}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibuvCMakeLists.txt
${DEPS_BUILD_DIR}/src/libuv/CMakeLists.txt

View File

@ -13,14 +13,17 @@ if(BUILD_SHARED_LIBS)
endif()
install(FILES
include/tree.h
include/uv.h
include/uv-version.h
include/uv-errno.h
include/uv-threadpool.h
include/uv-win.h
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)
install(TARGETS uv
PUBLIC_HEADER

View File

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