Skip to content

Commit 771ca7d

Browse files
cjihrigBridgeAR
authored andcommitted
deps: upgrade to libuv 1.36.0
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 <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
1 parent 8c1a69c commit 771ca7d

Some content is hidden

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

58 files changed

+997
-1199
lines changed

deps/uv/.gitignore

-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ vgcore.*
3737
Makefile
3838
Makefile.in
3939

40-
# Generated by gyp for android
41-
*.target.mk
42-
/android-toolchain
43-
44-
/out/
4540
/build/
4641

4742
/test/.libs/

deps/uv/.mailmap

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Imran Iqbal <[email protected]> <[email protected]>
1717
Isaac Z. Schlueter <[email protected]>
1818
Jason Williams <[email protected]>
1919
Jesse Gorzinski <[email protected]>
20+
2021
2122
2223

deps/uv/AUTHORS

+6
Original file line numberDiff line numberDiff line change
@@ -418,3 +418,9 @@ Dominique Dumont <[email protected]>
418418
Manuel BACHMANN <[email protected]>
419419
Marek Vavrusa <[email protected]>
420420
421+
Irek Fakhrutdinov <[email protected]>
422+
Lin Zhang <[email protected]>
423+
424+
Sk Sajidul Kadir <[email protected]>
425+
426+
Rikard Falkeborn <[email protected]>

deps/uv/CMakeLists.txt

+61-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# TODO: determine CMAKE_SYSTEM_NAME on OS/390. Currently assumes "OS/390".
21
cmake_minimum_required(VERSION 3.4)
32
project(libuv LANGUAGES C)
43

@@ -114,7 +113,7 @@ if(WIN32)
114113
list(APPEND uv_test_sources src/win/snprintf.c test/runner-win.c)
115114
else()
116115
list(APPEND uv_defines _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE)
117-
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
116+
if(NOT CMAKE_SYSTEM_NAME MATCHES "Android|OS390")
118117
# TODO: This should be replaced with find_package(Threads) if possible
119118
# Android has pthread as part of its c library, not as a separate
120119
# libpthread.so.
@@ -147,9 +146,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
147146
_ALL_SOURCE
148147
_LINUX_SOURCE_COMPAT
149148
_THREAD_SAFE
150-
_XOPEN_SOURCE=500)
149+
_XOPEN_SOURCE=500
150+
HAVE_SYS_AHAFS_EVPRODS_H)
151151
list(APPEND uv_libraries perfstat)
152-
list(APPEND uv_sources src/unix/aix.c)
152+
list(APPEND uv_sources
153+
src/unix/aix.c
154+
src/unix/aix-common.c)
153155
endif()
154156

155157
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
@@ -167,7 +169,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
167169
src/unix/sysinfo-loadavg.c)
168170
endif()
169171

170-
if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Android|Linux|OS/390")
172+
if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Android|Linux|OS390")
171173
list(APPEND uv_sources src/unix/proctitle.c)
172174
endif()
173175

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

224-
if(CMAKE_SYSTEM_NAME STREQUAL "OS/390")
226+
if(CMAKE_SYSTEM_NAME STREQUAL "OS390")
225227
list(APPEND uv_defines PATH_MAX=255)
226228
list(APPEND uv_defines _AE_BIMODAL)
227229
list(APPEND uv_defines _ALL_SOURCE)
230+
list(APPEND uv_defines _ISOC99_SOURCE)
228231
list(APPEND uv_defines _LARGE_TIME_API)
229232
list(APPEND uv_defines _OPEN_MSGQ_EXT)
230233
list(APPEND uv_defines _OPEN_SYS_FILE_EXT)
@@ -237,9 +240,25 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS/390")
237240
list(APPEND uv_defines _XOPEN_SOURCE_EXTENDED)
238241
list(APPEND uv_sources
239242
src/unix/pthread-fixes.c
240-
src/unix/pthread-barrier.c
241243
src/unix/os390.c
242244
src/unix/os390-syscalls.c)
245+
list(APPEND uv_cflags -Wc,DLL -Wc,exportall -Wc,xplink)
246+
list(APPEND uv_libraries -Wl,xplink)
247+
list(APPEND uv_test_libraries -Wl,xplink)
248+
endif()
249+
250+
if(CMAKE_SYSTEM_NAME STREQUAL "OS400")
251+
list(APPEND uv_defines
252+
_ALL_SOURCE
253+
_LINUX_SOURCE_COMPAT
254+
_THREAD_SAFE
255+
_XOPEN_SOURCE=500)
256+
list(APPEND uv_sources
257+
src/unix/aix-common.c
258+
src/unix/ibmi.c
259+
src/unix/no-fsevents.c
260+
src/unix/no-proctitle.c
261+
src/unix/posix-poll.c)
243262
endif()
244263

245264
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
@@ -280,6 +299,37 @@ target_include_directories(uv_a
280299
target_link_libraries(uv_a ${uv_libraries})
281300

282301
if(LIBUV_BUILD_TESTS)
302+
# Small hack: use ${uv_test_sources} now to get the runner skeleton,
303+
# before the actual tests are added.
304+
add_executable(
305+
uv_run_benchmarks_a
306+
${uv_test_sources}
307+
test/benchmark-async-pummel.c
308+
test/benchmark-async.c
309+
test/benchmark-fs-stat.c
310+
test/benchmark-getaddrinfo.c
311+
test/benchmark-loop-count.c
312+
test/benchmark-million-async.c
313+
test/benchmark-million-timers.c
314+
test/benchmark-multi-accept.c
315+
test/benchmark-ping-pongs.c
316+
test/benchmark-ping-udp.c
317+
test/benchmark-pound.c
318+
test/benchmark-pump.c
319+
test/benchmark-sizes.c
320+
test/benchmark-spawn.c
321+
test/benchmark-tcp-write-batch.c
322+
test/benchmark-thread.c
323+
test/benchmark-udp-pummel.c
324+
test/blackhole-server.c
325+
test/dns-server.c
326+
test/echo-server.c
327+
test/run-benchmarks.c
328+
test/runner.c)
329+
target_compile_definitions(uv_run_benchmarks_a PRIVATE ${uv_defines})
330+
target_compile_options(uv_run_benchmarks_a PRIVATE ${uv_cflags})
331+
target_link_libraries(uv_run_benchmarks_a uv_a ${uv_test_libraries})
332+
283333
list(APPEND uv_test_sources
284334
test/blackhole-server.c
285335
test/echo-server.c
@@ -447,6 +497,10 @@ if(LIBUV_BUILD_TESTS)
447497
add_test(NAME uv_test
448498
COMMAND uv_run_tests
449499
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
500+
if(CMAKE_SYSTEM_NAME STREQUAL "OS390")
501+
set_tests_properties(uv_test PROPERTIES ENVIRONMENT
502+
"LIBPATH=${CMAKE_BINARY_DIR}:$ENV{LIBPATH}")
503+
endif()
450504
add_executable(uv_run_tests_a ${uv_test_sources})
451505
target_compile_definitions(uv_run_tests_a PRIVATE ${uv_defines})
452506
target_compile_options(uv_run_tests_a PRIVATE ${uv_cflags})

deps/uv/CONTRIBUTING.md

-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ Bug fixes and features should come with tests. Add your tests in the
142142
If you add a new test file, it needs to be registered in three places:
143143
- `CMakeLists.txt`: add the file's name to the `uv_test_sources` list.
144144
- `Makefile.am`: add the file's name to the `test_run_tests_SOURCES` list.
145-
- `uv.gyp`: add the file's name to the `sources` list in the `run-tests` target.
146145

147146
Look at other tests to see how they should be structured (license boilerplate,
148147
the way entry points are declared, etc.).

deps/uv/ChangeLog

+71
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
1+
2020.04.16, Version 1.36.0 (Stable), 533b738838ad8407032e14b6772b29ef9af63cfa
2+
3+
Changes since version 1.35.0:
4+
5+
* build: add aix-common.c for AIX cmake build (Jesse Gorzinski)
6+
7+
* zos: explicitly mark message queue events (Irek Fakhrutdinov)
8+
9+
* zos: move mq check out of loop to save cpu cycles (Irek Fakhrutdinov)
10+
11+
* zos: add checks to ensure behavior of epoll_wait (Irek Fakhrutdinov)
12+
13+
* src: add uv__reallocf() (Ben Noordhuis)
14+
15+
* build: ibmi support for cmake (Jesse Gorzinski)
16+
17+
* build: fix gyp build for Android API >= 28 (Lin Zhang)
18+
19+
* udp: return recvmmsg-ed datagrams in order (Saúl Ibarra Corretgé)
20+
21+
* zos,test: fix spawn_empty_env for shared library build (Richard Lau)
22+
23+
* zos: fix non-Release builds (Richard Lau)
24+
25+
* zos: fix return value on expired nanosleep() call (Richard Lau)
26+
27+
* build: fix z/OS cmake build (Richard Lau)
28+
29+
* test: add a bunch of ASSERT macros (Santiago Gimeno)
30+
31+
* test: remove unused extern declaration (Ben Noordhuis)
32+
33+
* test: canonicalize argv[0] in exepath test (Ben Noordhuis)
34+
35+
* test: simplify platform_init() (Ben Noordhuis)
36+
37+
* ibmi: Fix isatty EBADF handling and refactor (Kevin Adler)
38+
39+
* test: Test EBADF tty handling (Kevin Adler)
40+
41+
* build: make cmake build benchmarks (Ben Noordhuis)
42+
43+
* win: use RtlGenRandom from advapi32.dll directly (Ben Noordhuis)
44+
45+
* android: fix OOB write in uv_interface_addresses() (Lin Zhang)
46+
47+
* test: pass test when hostname is single character (毛毛)
48+
49+
* ibmi: set the highest process priority to -10 (Xu Meng)
50+
51+
* build: remove support for gyp (Ben Noordhuis)
52+
53+
* doc: add note to README on cross-compiling (Ben Noordhuis)
54+
55+
* fs: add uv_fs_lutime() (Sk Sajidul Kadir)
56+
57+
* unix: implement cpu_relax() for arm (David Carlier)
58+
59+
* linux: fix uv__accept4() (twosee)
60+
61+
* win: handle file paths in uv_fs_statfs() (erw7)
62+
63+
* unix: fix uv_os_environ() null pointer check (Rikard Falkeborn)
64+
65+
* win: fix uv_os_environ() null pointer check (Rikard Falkeborn)
66+
67+
* unix: fix compilation on macOS 32-bit architectures (Brad King)
68+
69+
* win: replace alloca() with stack-based array (Ben Noordhuis)
70+
71+
172
2020.03.12, Version 1.35.0 (Stable), e45f1ec38db882f8dc17b51f51a6684027034609
273

374
Changes since version 1.34.2:

deps/uv/Makefile.am

+3-10
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,9 @@ EXTRA_DIST = test/fixtures/empty_file \
123123
include \
124124
docs \
125125
img \
126-
android-configure-arm \
127-
android-configure-arm64 \
128-
android-configure-x86 \
129-
android-configure-x86_64 \
130126
CONTRIBUTING.md \
131127
LICENSE \
132-
README.md \
133-
vcbuild.bat \
134-
common.gypi \
135-
gyp_uv.py \
136-
uv.gyp
128+
README.md
137129

138130

139131

@@ -346,7 +338,8 @@ test_run_tests_CFLAGS += -D__EXTENSIONS__ \
346338
endif
347339

348340
if OS390
349-
test_run_tests_CFLAGS += -D_UNIX03_THREADS \
341+
test_run_tests_CFLAGS += -D_ISOC99_SOURCE \
342+
-D_UNIX03_THREADS \
350343
-D_UNIX03_SOURCE \
351344
-D_OPEN_SYS_IF_EXT=1 \
352345
-D_OPEN_SYS_SOCK_IPV6 \

0 commit comments

Comments
 (0)