Skip to content

Commit 9d6fd45

Browse files
cjihrigtargos
authored andcommitted
deps: upgrade to libuv 1.38.0
Notable changes: - `uv_library_shutdown()` has been added. - `uv_udp_init_ex()` now accepts `UV_UDP_RECVMMSG`, although it is a no-op. - Obsolete `MAX_PATH` restrictions have been removed on Windows, and Windows is now long path aware. - Windows environment variables longer than 32,767 characters are now supported. - Linux `cpu_times` are now reported as milliseconds to match other platforms. - A memory leak resulting from `uv_loop_init()` failures has been fixed. PR-URL: #33446 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 33a662a commit 9d6fd45

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1068
-416
lines changed

deps/uv/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ ipch
6767

6868
# Clion / IntelliJ project files
6969
/.idea/
70+
cmake-build-debug/
7071

7172
*.xcodeproj
7273
*.xcworkspace

deps/uv/AUTHORS

+7
Original file line numberDiff line numberDiff line change
@@ -425,3 +425,10 @@ Sk Sajidul Kadir <[email protected]>
425425
426426
Rikard Falkeborn <[email protected]>
427427
Yash Ladha <[email protected]>
428+
James Ross <[email protected]>
429+
Colin Finck <[email protected]>
430+
Shohei YOSHIDA <[email protected]>
431+
Philip Chimento <[email protected]>
432+
Michal Artazov <[email protected]>
433+
Jeroen Roovers <[email protected]>
434+
MasterDuke17 <[email protected]>

deps/uv/CMakeLists.txt

+59-20
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,53 @@ cmake_dependent_option(LIBUV_BUILD_BENCH
2424
"Build the benchmarks when building unit tests and we are the root project" ON
2525
"LIBUV_BUILD_TESTS" OFF)
2626

27+
# Qemu Build
28+
option(QEMU "build for qemu" OFF)
29+
if(QEMU)
30+
add_definitions(-D__QEMU__=1)
31+
endif()
32+
2733
# Compiler check
2834
string(CONCAT is-msvc $<OR:
2935
$<C_COMPILER_ID:MSVC>,
3036
$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},MSVC>
3137
>)
3238

3339
check_c_compiler_flag(/W4 UV_LINT_W4)
40+
check_c_compiler_flag(/wd4100 UV_LINT_NO_UNUSED_PARAMETER_MSVC)
41+
check_c_compiler_flag(/wd4127 UV_LINT_NO_CONDITIONAL_CONSTANT_MSVC)
42+
check_c_compiler_flag(/wd4201 UV_LINT_NO_NONSTANDARD_MSVC)
43+
check_c_compiler_flag(/wd4206 UV_LINT_NO_NONSTANDARD_EMPTY_TU_MSVC)
44+
check_c_compiler_flag(/wd4210 UV_LINT_NO_NONSTANDARD_FILE_SCOPE_MSVC)
45+
check_c_compiler_flag(/wd4232 UV_LINT_NO_NONSTANDARD_NONSTATIC_DLIMPORT_MSVC)
46+
check_c_compiler_flag(/wd4456 UV_LINT_NO_HIDES_LOCAL)
47+
check_c_compiler_flag(/wd4457 UV_LINT_NO_HIDES_PARAM)
48+
check_c_compiler_flag(/wd4459 UV_LINT_NO_HIDES_GLOBAL)
49+
check_c_compiler_flag(/wd4706 UV_LINT_NO_CONDITIONAL_ASSIGNMENT_MSVC)
50+
check_c_compiler_flag(/wd4996 UV_LINT_NO_UNSAFE_MSVC)
51+
3452
check_c_compiler_flag(-Wall UV_LINT_WALL) # DO NOT use this under MSVC
3553

3654
# TODO: Place these into its own function
3755
check_c_compiler_flag(-Wno-unused-parameter UV_LINT_NO_UNUSED_PARAMETER)
3856
check_c_compiler_flag(-Wstrict-prototypes UV_LINT_STRICT_PROTOTYPES)
3957
check_c_compiler_flag(-Wextra UV_LINT_EXTRA)
4058

41-
set(lint-no-unused-parameter $<$<BOOL:${UV_LINT_NO_UNUSED_PARAMETER}>:-Wno-unused-parameter>)
59+
set(lint-no-unused-parameter $<$<BOOL:${UV_LINT_NO_UNUSED_PARAMETER}>:-Wno-unused-parameter>)
4260
set(lint-strict-prototypes $<$<BOOL:${UV_LINT_STRICT_PROTOTYPES}>:-Wstrict-prototypes>)
4361
set(lint-extra $<$<BOOL:${UV_LINT_EXTRA}>:-Wextra>)
4462
set(lint-w4 $<$<BOOL:${UV_LINT_W4}>:/W4>)
63+
set(lint-no-unused-parameter-msvc $<$<BOOL:${UV_LINT_NO_UNUSED_PARAMETER_MSVC}>:/wd4100>)
64+
set(lint-no-conditional-constant-msvc $<$<BOOL:${UV_LINT_NO_CONDITIONAL_CONSTANT_MSVC}>:/wd4127>)
65+
set(lint-no-nonstandard-msvc $<$<BOOL:${UV_LINT_NO_NONSTANDARD_MSVC}>:/wd4201>)
66+
set(lint-no-nonstandard-empty-tu-msvc $<$<BOOL:${UV_LINT_NO_NONSTANDARD_EMPTY_TU_MSVC}>:/wd4206>)
67+
set(lint-no-nonstandard-file-scope-msvc $<$<BOOL:${UV_LINT_NO_NONSTANDARD_FILE_SCOPE_MSVC}>:/wd4210>)
68+
set(lint-no-nonstandard-nonstatic-dlimport-msvc $<$<BOOL:${UV_LINT_NO_NONSTANDARD_NONSTATIC_DLIMPORT_MSVC}>:/wd4232>)
69+
set(lint-no-hides-local-msvc $<$<BOOL:${UV_LINT_NO_HIDES_LOCAL}>:/wd4456>)
70+
set(lint-no-hides-param-msvc $<$<BOOL:${UV_LINT_NO_HIDES_PARAM}>:/wd4457>)
71+
set(lint-no-hides-global-msvc $<$<BOOL:${UV_LINT_NO_HIDES_GLOBAL}>:/wd4459>)
72+
set(lint-no-conditional-assignment-msvc $<$<BOOL:${UV_LINT_NO_CONDITIONAL_ASSIGNMENT_MSVC}>:/wd4706>)
73+
set(lint-no-unsafe-msvc $<$<BOOL:${UV_LINT_NO_UNSAFE_MSVC}>:/wd4996>)
4574
# Unfortunately, this one is complicated because MSVC and clang-cl support -Wall
4675
# but using it is like calling -Weverything
4776
string(CONCAT lint-default $<
@@ -50,6 +79,17 @@ string(CONCAT lint-default $<
5079

5180
list(APPEND uv_cflags ${lint-strict-prototypes} ${lint-extra} ${lint-default} ${lint-w4})
5281
list(APPEND uv_cflags ${lint-no-unused-parameter})
82+
list(APPEND uv_cflags ${lint-no-unused-parameter-msvc})
83+
list(APPEND uv_cflags ${lint-no-conditional-constant-msvc})
84+
list(APPEND uv_cflags ${lint-no-nonstandard-msvc})
85+
list(APPEND uv_cflags ${lint-no-nonstandard-empty-tu-msvc})
86+
list(APPEND uv_cflags ${lint-no-nonstandard-file-scope-msvc})
87+
list(APPEND uv_cflags ${lint-no-nonstandard-nonstatic-dlimport-msvc})
88+
list(APPEND uv_cflags ${lint-no-hides-local-msvc})
89+
list(APPEND uv_cflags ${lint-no-hides-param-msvc})
90+
list(APPEND uv_cflags ${lint-no-hides-global-msvc})
91+
list(APPEND uv_cflags ${lint-no-conditional-assignment-msvc})
92+
list(APPEND uv_cflags ${lint-no-unsafe-msvc})
5393

5494
set(uv_sources
5595
src/fs-poll.c
@@ -64,22 +104,9 @@ set(uv_sources
64104
src/version.c)
65105

66106
if(WIN32)
67-
if (CMAKE_SYSTEM_VERSION VERSION_GREATER 10) # Windows 10
68-
set(windows-version 0x0A00)
69-
elseif (CMAKE_SYSTEM_VERSION VERSION_GREATER 6.3) # Windows 8.1
70-
set(windows-version 0x0603)
71-
elseif (CMAKE_SYSTEM_VERSION VERSION_GREATER 6.2) # Windows 8
72-
set(windows-version 0x0602)
73-
elseif (CMAKE_SYSTEM_VERSION VERSION_GREATER 6.1) # Windows 7
74-
set(windows-version 0x0601)
75-
elseif (CMAKE_SYSTEM_VERSION VERSION_GREATER 6.0) # Windows Vista
76-
set(windows-version 0x0600)
77-
else()
78-
message(FATAL_ERROR "Windows Vista is the minimum version supported")
79-
endif()
80-
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=${windows-version})
107+
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0600)
81108
list(APPEND uv_libraries
82-
$<$<STREQUAL:${windows-version},0x0600>:psapi>
109+
psapi
83110
iphlpapi
84111
userenv
85112
ws2_32)
@@ -155,7 +182,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
155182
endif()
156183

157184
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
158-
list(APPEND uv_libs dl)
185+
list(APPEND uv_libraries dl)
159186
list(APPEND uv_sources
160187
src/unix/android-ifaddrs.c
161188
src/unix/linux-core.c
@@ -489,7 +516,7 @@ if(LIBUV_BUILD_TESTS)
489516
test/test-walk-handles.c
490517
test/test-watcher-cross-stop.c)
491518

492-
add_executable(uv_run_tests ${uv_test_sources})
519+
add_executable(uv_run_tests ${uv_test_sources} uv_win_longpath.manifest)
493520
target_compile_definitions(uv_run_tests
494521
PRIVATE ${uv_defines} USING_UV_SHARED=1)
495522
target_compile_options(uv_run_tests PRIVATE ${uv_cflags})
@@ -501,10 +528,14 @@ if(LIBUV_BUILD_TESTS)
501528
set_tests_properties(uv_test PROPERTIES ENVIRONMENT
502529
"LIBPATH=${CMAKE_BINARY_DIR}:$ENV{LIBPATH}")
503530
endif()
504-
add_executable(uv_run_tests_a ${uv_test_sources})
531+
add_executable(uv_run_tests_a ${uv_test_sources} uv_win_longpath.manifest)
505532
target_compile_definitions(uv_run_tests_a PRIVATE ${uv_defines})
506533
target_compile_options(uv_run_tests_a PRIVATE ${uv_cflags})
507-
target_link_libraries(uv_run_tests_a uv_a ${uv_test_libraries})
534+
if(QEMU)
535+
target_link_libraries(uv_run_tests_a uv_a ${uv_test_libraries} -static)
536+
else()
537+
target_link_libraries(uv_run_tests_a uv_a ${uv_test_libraries})
538+
endif()
508539
add_test(NAME uv_test_a
509540
COMMAND uv_run_tests_a
510541
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
@@ -544,3 +575,11 @@ if(WIN32)
544575
RUNTIME DESTINATION lib/$<CONFIG>
545576
ARCHIVE DESTINATION lib/$<CONFIG>)
546577
endif()
578+
579+
message(STATUS "summary of build options:
580+
Install prefix: ${CMAKE_INSTALL_PREFIX}
581+
Target system: ${CMAKE_SYSTEM_NAME}
582+
Compiler:
583+
C compiler: ${CMAKE_C_COMPILER}
584+
CFLAGS: ${CMAKE_C_FLAGS_${_build_type}} ${CMAKE_C_FLAGS}
585+
")

deps/uv/ChangeLog

+73
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
1+
2020.05.18, Version 1.38.0 (Stable), 1ab9ea3790378f9f25c4e78e9e2b511c75f9c9ed
2+
3+
Changes since version 1.37.0:
4+
5+
* test: skip poll_duplex and poll_unidirectional on PASE (Xu Meng)
6+
7+
* linux: make cpu_times consistently be milliseconds (James Ross)
8+
9+
* win: DRY uv_poll_start() and uv_poll_stop() (Ben Noordhuis)
10+
11+
* win: DRY uv_poll_close() (Ben Noordhuis)
12+
13+
* unix,win: add uv_library_shutdown() (Ben Noordhuis)
14+
15+
* unix: yield cpu when spinlocking on async handle (Ben Noordhuis)
16+
17+
* win: remove dep on GetQueuedCompletionStatusEx (Colin Finck)
18+
19+
* doc: correct source lines (Shohei YOSHIDA)
20+
21+
* build,android: fix typo (twosee)
22+
23+
* doc: uv_cancel() handles uv_random_t requests (Philip Chimento)
24+
25+
* doc: fix unescaped character (Philip Chimento)
26+
27+
* build,cmake: fix compilation on old MinGW (erw7)
28+
29+
* build: remove unnessesary MSVC warnings (Bartosz Sosnowski)
30+
31+
* win: make uv_udp_init_ex() accept UV_UDP_RECVMMSG (Ben Noordhuis)
32+
33+
* unix: simplify uv__udp_init_ex() (Ben Noordhuis)
34+
35+
* win: remove MAX_PATH limitations (Bartosz Sosnowski)
36+
37+
* build, win: add long path aware manifest (Bartosz Sosnowski)
38+
39+
* doc: check/idle/prepare functions always succeed (Ben Noordhuis)
40+
41+
* darwin: fix build with non-apple compilers (Ben Noordhuis)
42+
43+
* win: support environment variables > 32767 chars (Ben Noordhuis)
44+
45+
* unix: fully initialize struct msghdr (Ben Noordhuis)
46+
47+
* doc: add uv_replace_allocator thread safety warning (twosee)
48+
49+
* unix: fix int overflow when copying large files (Michal Artazov)
50+
51+
* fs: report original error (Bartosz Sosnowski)
52+
53+
* win, fs: add IO_REPARSE_TAG_APPEXECLINK support (Bartosz Sosnowski)
54+
55+
* doc: fix formatting (Ben Noordhuis)
56+
57+
* unix: fix memory leak when uv_loop_init() fails (Anna Henningsen)
58+
59+
* unix: shrink uv_udp_set_source_membership() stack (Ben Noordhuis)
60+
61+
* unix,win: fix wrong sizeof argument to memcpy() (Ben Noordhuis)
62+
63+
* build: check for libraries not provided by libc (Jeroen Roovers)
64+
65+
* doc: fix the order of arguments to calloc() (MasterDuke17)
66+
67+
* unix: don't abort when getrlimit() fails (Ben Noordhuis)
68+
69+
* test: support common user profile on IBMi (Xu Meng)
70+
71+
* build: test on more platforms via QEMU in CI (gengjiawen)
72+
73+
174
2020.04.20, Version 1.37.0 (Stable), 02a9e1be252b623ee032a3137c0b0c94afbe6809
275

376
Changes since version 1.36.0:

deps/uv/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,9 @@ uvinclude_HEADERS += include/uv/darwin.h
409409
libuv_la_CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
410410
libuv_la_CFLAGS += -D_DARWIN_UNLIMITED_SELECT=1
411411
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
412-
src/unix/darwin.c \
413412
src/unix/darwin-proctitle.c \
413+
src/unix/darwin-stub.h \
414+
src/unix/darwin.c \
414415
src/unix/fsevents.c \
415416
src/unix/kqueue.c \
416417
src/unix/proctitle.c \

deps/uv/configure.ac

+11-9
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1414

1515
AC_PREREQ(2.57)
16-
AC_INIT([libuv], [1.37.0], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.38.0], [https://github.com/libuv/libuv/issues])
1717
AC_CONFIG_MACRO_DIR([m4])
1818
m4_include([m4/libuv-extra-automake-flags.m4])
1919
m4_include([m4/as_case.m4])
@@ -38,15 +38,17 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
3838
AC_PROG_LIBTOOL
3939
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
4040
LT_INIT
41-
# TODO(bnoordhuis) Check for -pthread vs. -pthreads
41+
AX_PTHREAD([
42+
LIBS="$LIBS $PTHREAD_LIBS"
43+
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
44+
])
4245
AC_CHECK_LIB([dl], [dlopen])
43-
AC_CHECK_LIB([kstat], [kstat_lookup])
44-
AC_CHECK_LIB([nsl], [gethostbyname])
45-
AC_CHECK_LIB([perfstat], [perfstat_cpu])
46-
AC_CHECK_LIB([pthread], [pthread_mutex_init])
47-
AC_CHECK_LIB([rt], [clock_gettime])
48-
AC_CHECK_LIB([sendfile], [sendfile])
49-
AC_CHECK_LIB([socket], [socket])
46+
AC_SEARCH_LIBS([kstat_lookup], [kstat])
47+
AC_SEARCH_LIBS([gethostbyname], [nsl])
48+
AC_SEARCH_LIBS([perfstat_cpu], [perfstat])
49+
AC_SEARCH_LIBS([clock_gettime], [rt])
50+
AC_SEARCH_LIBS([sendfile], [sendfile])
51+
AC_SEARCH_LIBS([socket], [socket])
5052
AC_SYS_LARGEFILE
5153
AM_CONDITIONAL([AIX], [AS_CASE([$host_os],[aix*], [true], [false])])
5254
AM_CONDITIONAL([ANDROID], [AS_CASE([$host_os],[linux-android*],[true], [false])])

deps/uv/docs/src/check.rst

+10-2
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,22 @@ API
3333

3434
.. c:function:: int uv_check_init(uv_loop_t* loop, uv_check_t* check)
3535
36-
Initialize the handle.
36+
Initialize the handle. This function always succeeds.
37+
38+
:returns: 0
3739
3840
.. c:function:: int uv_check_start(uv_check_t* check, uv_check_cb cb)
3941
40-
Start the handle with the given callback.
42+
Start the handle with the given callback. This function always succeeds,
43+
except when `cb` is `NULL`.
44+
45+
:returns: 0 on success, or `UV_EINVAL` when `cb == NULL`.
4146
4247
.. c:function:: int uv_check_stop(uv_check_t* check)
4348
4449
Stop the handle, the callback will no longer be called.
50+
This function always succeeds.
51+
52+
:returns: 0
4553
4654
.. seealso:: The :c:type:`uv_handle_t` API functions also apply.

deps/uv/docs/src/fs.rst

+7
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,13 @@ API
492492
493493
.. versionadded:: 1.19.0
494494
495+
.. c:function:: int uv_fs_get_system_error(const uv_fs_t* req)
496+
497+
Returns the platform specific error code - `GetLastError()` value on Windows
498+
and `-(req->result)` on other platforms.
499+
500+
.. versionadded:: 1.38.0
501+
495502
.. c:function:: void* uv_fs_get_ptr(const uv_fs_t* req)
496503
497504
Returns `req->ptr`.

deps/uv/docs/src/idle.rst

+10-2
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,22 @@ API
4141

4242
.. c:function:: int uv_idle_init(uv_loop_t* loop, uv_idle_t* idle)
4343
44-
Initialize the handle.
44+
Initialize the handle. This function always succeeds.
45+
46+
:returns: 0
4547
4648
.. c:function:: int uv_idle_start(uv_idle_t* idle, uv_idle_cb cb)
4749
48-
Start the handle with the given callback.
50+
Start the handle with the given callback. This function always succeeds,
51+
except when `cb` is `NULL`.
52+
53+
:returns: 0 on success, or `UV_EINVAL` when `cb == NULL`.
4954
5055
.. c:function:: int uv_idle_stop(uv_idle_t* idle)
5156
5257
Stop the handle, the callback will no longer be called.
58+
This function always succeeds.
59+
60+
:returns: 0
5361
5462
.. seealso:: The :c:type:`uv_handle_t` API functions also apply.

0 commit comments

Comments
 (0)