Skip to content

Commit

Permalink
deps: upgrade to libuv 1.36.0
Browse files Browse the repository at this point in the history
Notable changes:

- gyp support has been removed.
- recvmmsg messages are returned in the correct order.
- IBMi cmake support has been added.
- uv_fs_lutime() has been added.
- uv_fs_statfs() on Windows properly handles file paths.

PR-URL: #32866
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
  • Loading branch information
cjihrig authored and targos committed Apr 28, 2020
1 parent 68a1cec commit 2d7a759
Show file tree
Hide file tree
Showing 58 changed files with 997 additions and 1,199 deletions.
5 changes: 0 additions & 5 deletions deps/uv/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ vgcore.*
Makefile
Makefile.in

# Generated by gyp for android
*.target.mk
/android-toolchain

/out/
/build/

/test/.libs/
Expand Down
1 change: 1 addition & 0 deletions deps/uv/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Imran Iqbal <imrani@ca.ibm.com> <imran@imraniqbal.org>
Isaac Z. Schlueter <i@izs.me>
Jason Williams <necmon@yahoo.com>
Jesse Gorzinski <jgorzinski@gmail.com>
Jesse Gorzinski <jgorzinski@gmail.com> <jgorzins@us.ibm.com>
Justin Venus <justin.venus@gmail.com> <justin.venus@orbitz.com>
Keno Fischer <kenof@stanford.edu> <kfischer+github@college.harvard.edu>
Keno Fischer <kenof@stanford.edu> <kfischer@college.harvard.edu>
Expand Down
6 changes: 6 additions & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -418,3 +418,9 @@ Dominique Dumont <dod@debian.org>
Manuel BACHMANN <tarnyko@tarnyko.net>
Marek Vavrusa <marek@vavrusa.com>
TK-one <tk5641@naver.com>
Irek Fakhrutdinov <ifakhrutdinov@rocketsoftware.com>
Lin Zhang <linroid@gmail.com>
毛毛 <srayuws@users.noreply.github.com>
Sk Sajidul Kadir <sheikh.sajid522@gmail.com>
twosee <twose@qq.com>
Rikard Falkeborn <rikard.falkeborn@gmail.com>
68 changes: 61 additions & 7 deletions deps/uv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# TODO: determine CMAKE_SYSTEM_NAME on OS/390. Currently assumes "OS/390".
cmake_minimum_required(VERSION 3.4)
project(libuv LANGUAGES C)

Expand Down Expand Up @@ -114,7 +113,7 @@ if(WIN32)
list(APPEND uv_test_sources src/win/snprintf.c test/runner-win.c)
else()
list(APPEND uv_defines _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
if(NOT CMAKE_SYSTEM_NAME MATCHES "Android|OS390")
# TODO: This should be replaced with find_package(Threads) if possible
# Android has pthread as part of its c library, not as a separate
# libpthread.so.
Expand Down Expand Up @@ -147,9 +146,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
_ALL_SOURCE
_LINUX_SOURCE_COMPAT
_THREAD_SAFE
_XOPEN_SOURCE=500)
_XOPEN_SOURCE=500
HAVE_SYS_AHAFS_EVPRODS_H)
list(APPEND uv_libraries perfstat)
list(APPEND uv_sources src/unix/aix.c)
list(APPEND uv_sources
src/unix/aix.c
src/unix/aix-common.c)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Android")
Expand All @@ -167,7 +169,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
src/unix/sysinfo-loadavg.c)
endif()

if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Android|Linux|OS/390")
if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Android|Linux|OS390")
list(APPEND uv_sources src/unix/proctitle.c)
endif()

Expand Down Expand Up @@ -221,10 +223,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
list(APPEND uv_sources src/unix/openbsd.c)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "OS/390")
if(CMAKE_SYSTEM_NAME STREQUAL "OS390")
list(APPEND uv_defines PATH_MAX=255)
list(APPEND uv_defines _AE_BIMODAL)
list(APPEND uv_defines _ALL_SOURCE)
list(APPEND uv_defines _ISOC99_SOURCE)
list(APPEND uv_defines _LARGE_TIME_API)
list(APPEND uv_defines _OPEN_MSGQ_EXT)
list(APPEND uv_defines _OPEN_SYS_FILE_EXT)
Expand All @@ -237,9 +240,25 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS/390")
list(APPEND uv_defines _XOPEN_SOURCE_EXTENDED)
list(APPEND uv_sources
src/unix/pthread-fixes.c
src/unix/pthread-barrier.c
src/unix/os390.c
src/unix/os390-syscalls.c)
list(APPEND uv_cflags -Wc,DLL -Wc,exportall -Wc,xplink)
list(APPEND uv_libraries -Wl,xplink)
list(APPEND uv_test_libraries -Wl,xplink)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "OS400")
list(APPEND uv_defines
_ALL_SOURCE
_LINUX_SOURCE_COMPAT
_THREAD_SAFE
_XOPEN_SOURCE=500)
list(APPEND uv_sources
src/unix/aix-common.c
src/unix/ibmi.c
src/unix/no-fsevents.c
src/unix/no-proctitle.c
src/unix/posix-poll.c)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
Expand Down Expand Up @@ -280,6 +299,37 @@ target_include_directories(uv_a
target_link_libraries(uv_a ${uv_libraries})

if(LIBUV_BUILD_TESTS)
# Small hack: use ${uv_test_sources} now to get the runner skeleton,
# before the actual tests are added.
add_executable(
uv_run_benchmarks_a
${uv_test_sources}
test/benchmark-async-pummel.c
test/benchmark-async.c
test/benchmark-fs-stat.c
test/benchmark-getaddrinfo.c
test/benchmark-loop-count.c
test/benchmark-million-async.c
test/benchmark-million-timers.c
test/benchmark-multi-accept.c
test/benchmark-ping-pongs.c
test/benchmark-ping-udp.c
test/benchmark-pound.c
test/benchmark-pump.c
test/benchmark-sizes.c
test/benchmark-spawn.c
test/benchmark-tcp-write-batch.c
test/benchmark-thread.c
test/benchmark-udp-pummel.c
test/blackhole-server.c
test/dns-server.c
test/echo-server.c
test/run-benchmarks.c
test/runner.c)
target_compile_definitions(uv_run_benchmarks_a PRIVATE ${uv_defines})
target_compile_options(uv_run_benchmarks_a PRIVATE ${uv_cflags})
target_link_libraries(uv_run_benchmarks_a uv_a ${uv_test_libraries})

list(APPEND uv_test_sources
test/blackhole-server.c
test/echo-server.c
Expand Down Expand Up @@ -447,6 +497,10 @@ if(LIBUV_BUILD_TESTS)
add_test(NAME uv_test
COMMAND uv_run_tests
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
if(CMAKE_SYSTEM_NAME STREQUAL "OS390")
set_tests_properties(uv_test PROPERTIES ENVIRONMENT
"LIBPATH=${CMAKE_BINARY_DIR}:$ENV{LIBPATH}")
endif()
add_executable(uv_run_tests_a ${uv_test_sources})
target_compile_definitions(uv_run_tests_a PRIVATE ${uv_defines})
target_compile_options(uv_run_tests_a PRIVATE ${uv_cflags})
Expand Down
1 change: 0 additions & 1 deletion deps/uv/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ Bug fixes and features should come with tests. Add your tests in the
If you add a new test file, it needs to be registered in three places:
- `CMakeLists.txt`: add the file's name to the `uv_test_sources` list.
- `Makefile.am`: add the file's name to the `test_run_tests_SOURCES` list.
- `uv.gyp`: add the file's name to the `sources` list in the `run-tests` target.

Look at other tests to see how they should be structured (license boilerplate,
the way entry points are declared, etc.).
Expand Down
71 changes: 71 additions & 0 deletions deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,74 @@
2020.04.16, Version 1.36.0 (Stable), 533b738838ad8407032e14b6772b29ef9af63cfa

Changes since version 1.35.0:

* build: add aix-common.c for AIX cmake build (Jesse Gorzinski)

* zos: explicitly mark message queue events (Irek Fakhrutdinov)

* zos: move mq check out of loop to save cpu cycles (Irek Fakhrutdinov)

* zos: add checks to ensure behavior of epoll_wait (Irek Fakhrutdinov)

* src: add uv__reallocf() (Ben Noordhuis)

* build: ibmi support for cmake (Jesse Gorzinski)

* build: fix gyp build for Android API >= 28 (Lin Zhang)

* udp: return recvmmsg-ed datagrams in order (Saúl Ibarra Corretgé)

* zos,test: fix spawn_empty_env for shared library build (Richard Lau)

* zos: fix non-Release builds (Richard Lau)

* zos: fix return value on expired nanosleep() call (Richard Lau)

* build: fix z/OS cmake build (Richard Lau)

* test: add a bunch of ASSERT macros (Santiago Gimeno)

* test: remove unused extern declaration (Ben Noordhuis)

* test: canonicalize argv[0] in exepath test (Ben Noordhuis)

* test: simplify platform_init() (Ben Noordhuis)

* ibmi: Fix isatty EBADF handling and refactor (Kevin Adler)

* test: Test EBADF tty handling (Kevin Adler)

* build: make cmake build benchmarks (Ben Noordhuis)

* win: use RtlGenRandom from advapi32.dll directly (Ben Noordhuis)

* android: fix OOB write in uv_interface_addresses() (Lin Zhang)

* test: pass test when hostname is single character (毛毛)

* ibmi: set the highest process priority to -10 (Xu Meng)

* build: remove support for gyp (Ben Noordhuis)

* doc: add note to README on cross-compiling (Ben Noordhuis)

* fs: add uv_fs_lutime() (Sk Sajidul Kadir)

* unix: implement cpu_relax() for arm (David Carlier)

* linux: fix uv__accept4() (twosee)

* win: handle file paths in uv_fs_statfs() (erw7)

* unix: fix uv_os_environ() null pointer check (Rikard Falkeborn)

* win: fix uv_os_environ() null pointer check (Rikard Falkeborn)

* unix: fix compilation on macOS 32-bit architectures (Brad King)

* win: replace alloca() with stack-based array (Ben Noordhuis)


2020.03.12, Version 1.35.0 (Stable), e45f1ec38db882f8dc17b51f51a6684027034609

Changes since version 1.34.2:
Expand Down
13 changes: 3 additions & 10 deletions deps/uv/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,9 @@ EXTRA_DIST = test/fixtures/empty_file \
include \
docs \
img \
android-configure-arm \
android-configure-arm64 \
android-configure-x86 \
android-configure-x86_64 \
CONTRIBUTING.md \
LICENSE \
README.md \
vcbuild.bat \
common.gypi \
gyp_uv.py \
uv.gyp
README.md



Expand Down Expand Up @@ -346,7 +338,8 @@ test_run_tests_CFLAGS += -D__EXTENSIONS__ \
endif

if OS390
test_run_tests_CFLAGS += -D_UNIX03_THREADS \
test_run_tests_CFLAGS += -D_ISOC99_SOURCE \
-D_UNIX03_THREADS \
-D_UNIX03_SOURCE \
-D_OPEN_SYS_IF_EXT=1 \
-D_OPEN_SYS_SOCK_IPV6 \
Expand Down
Loading

0 comments on commit 2d7a759

Please sign in to comment.