Skip to content

Commit af92317

Browse files
cjihrignodejs-github-bot
authored andcommitted
deps: upgrade to libuv 1.40.0
Notable changes: - The UV_UDP_MMSG_FREE flag has been added. - UV__EPROTO has been remapped from 4046 to -4046 for consistency with other error codes. - On Windows, UTF-16 surrogate pairs are no longer replaced with the Unicode replacement character. - uv_timer_get_due_in() has been added. PR-URL: #35333 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent b15ed65 commit af92317

31 files changed

+390
-114
lines changed

deps/uv/AUTHORS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,3 +443,8 @@ escherstair <[email protected]>
443443
Evan Lucas <[email protected]>
444444
445445
司徒玟琅 <[email protected]>
446+
447+
Aleksej Lebedev <[email protected]>
448+
Nikolay Mitev <[email protected]>
449+
Ulrik Strid <[email protected]>
450+
Elad Lahav <[email protected]>

deps/uv/CMakeLists.txt

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ if(WIN32)
146146
list(APPEND uv_test_sources src/win/snprintf.c test/runner-win.c)
147147
else()
148148
list(APPEND uv_defines _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE)
149-
if(NOT CMAKE_SYSTEM_NAME MATCHES "Android|OS390")
149+
if(NOT CMAKE_SYSTEM_NAME MATCHES "Android|OS390|QNX")
150150
# TODO: This should be replaced with find_package(Threads) if possible
151151
# Android has pthread as part of its c library, not as a separate
152152
# libpthread.so.
@@ -298,6 +298,30 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
298298
list(APPEND uv_sources src/unix/no-proctitle.c src/unix/sunos.c)
299299
endif()
300300

301+
if(CMAKE_SYSTEM_NAME STREQUAL "Haiku")
302+
list(APPEND uv_defines _BSD_SOURCE)
303+
list(APPEND uv_libraries bsd network)
304+
list(APPEND uv_sources
305+
src/unix/haiku.c
306+
src/unix/bsd-ifaddrs.c
307+
src/unix/no-fsevents.c
308+
src/unix/no-proctitle.c
309+
src/unix/posix-hrtime.c
310+
src/unix/posix-poll.c)
311+
endif()
312+
313+
if(CMAKE_SYSTEM_NAME STREQUAL "QNX")
314+
list(APPEND uv_sources
315+
src/unix/posix-hrtime.c
316+
src/unix/posix-poll.c
317+
src/unix/qnx.c
318+
src/unix/bsd-ifaddrs.c
319+
src/unix/no-proctitle.c
320+
src/unix/no-fsevents.c)
321+
list(APPEND uv_cflags -fno-strict-aliasing)
322+
list(APPEND uv_libraries socket)
323+
endif()
324+
301325
if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD")
302326
list(APPEND uv_test_libraries util)
303327
endif()
@@ -568,10 +592,11 @@ if(UNIX OR MINGW)
568592
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
569593
set(prefix ${CMAKE_INSTALL_PREFIX})
570594
configure_file(libuv.pc.in libuv.pc @ONLY)
595+
configure_file(libuv-static.pc.in libuv-static.pc @ONLY)
571596

572597
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
573598
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
574-
install(FILES ${PROJECT_BINARY_DIR}/libuv.pc
599+
install(FILES ${PROJECT_BINARY_DIR}/libuv.pc ${PROJECT_BINARY_DIR}/libuv-static.pc
575600
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
576601
install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
577602
install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

deps/uv/ChangeLog

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
2020.09.26, Version 1.40.0 (Stable), 4e69e333252693bd82d6338d6124f0416538dbfc
2+
3+
Changes since version 1.39.0:
4+
5+
* udp: add UV_UDP_MMSG_FREE recv_cb flag (Ryan Liptak)
6+
7+
* include: re-map UV__EPROTO from 4046 to -4046 (YuMeiJie)
8+
9+
* doc: correct UV_UDP_MMSG_FREE version added (cjihrig)
10+
11+
* doc: add uv_metrics_idle_time() version metadata (Ryan Liptak)
12+
13+
* win,tty: pass through utf-16 surrogate pairs (Mustafa M)
14+
15+
* unix: fix DragonFly BSD build (Aleksej Lebedev)
16+
17+
* win,udp: fix error code returned by connect() (Santiago Gimeno)
18+
19+
* src: suppress user_timeout maybe-uninitialized (Daniel Bevenius)
20+
21+
* test: fix compiler warning (Vladimír Čunát)
22+
23+
* build: fix the Haiku cmake build (David Carlier)
24+
25+
* linux: fix i386 sendmmsg/recvmmsg support (Ben Noordhuis)
26+
27+
* build: add libuv-static pkg-config file (Nikolay Mitev)
28+
29+
* unix,win: add uv_timer_get_due_in() (Ulrik Strid)
30+
31+
* build,unix: add QNX support (Elad Lahav)
32+
33+
* include: remove incorrect UV__ERR() for EPROTO (cjihrig)
34+
35+
136
2020.08.26, Version 1.39.0 (Stable), 25f4b8b8a3c0f934158cd37a37b0525d75ca488e
237

338
Changes since version 1.38.1:

deps/uv/configure.ac

Lines changed: 1 addition & 1 deletion
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.39.0], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.40.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])

deps/uv/docs/src/loop.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ API
7373

7474
This option is necessary to use :c:func:`uv_metrics_idle_time`.
7575

76+
.. versionchanged:: 1.39.0 added the UV_METRICS_IDLE_TIME option.
77+
7678
.. c:function:: int uv_loop_close(uv_loop_t* loop)
7779
7880
Releases all internal loop resources. Call this function only when the loop

deps/uv/docs/src/metrics.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ API
2323
The event loop will not begin accumulating the event provider's idle
2424
time until calling :c:type:`uv_loop_configure` with
2525
:c:type:`UV_METRICS_IDLE_TIME`.
26+
27+
.. versionadded:: 1.39.0

deps/uv/docs/src/timer.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,11 @@ API
7878
7979
Get the timer repeat value.
8080
81+
.. c:function:: uint64_t uv_timer_get_due_in(const uv_timer_t* handle)
82+
83+
Get the timer due value or 0 if it has expired. The time is relative to
84+
:c:func:`uv_now()`.
85+
86+
.. versionadded:: 1.40.0
87+
8188
.. seealso:: The :c:type:`uv_handle_t` API functions also apply.

deps/uv/docs/src/udp.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ Data types
4747
* must not be freed by the recv_cb callback.
4848
*/
4949
UV_UDP_MMSG_CHUNK = 8,
50+
/*
51+
* Indicates that the buffer provided has been fully utilized by recvmmsg and
52+
* that it should now be freed by the recv_cb callback. When this flag is set
53+
* in uv_udp_recv_cb, nread will always be 0 and addr will always be NULL.
54+
*/
55+
UV_UDP_MMSG_FREE = 16,
5056
/*
5157
* Indicates that recvmmsg should be used, if available.
5258
*/
@@ -80,8 +86,10 @@ Data types
8086
When using :man:`recvmmsg(2)`, chunks will have the `UV_UDP_MMSG_CHUNK` flag set,
8187
those must not be freed. There will be a final callback with `nread` set to 0,
8288
`addr` set to NULL and the buffer pointing at the initially allocated data with
83-
the `UV_UDP_MMSG_CHUNK` flag cleared. This is a good chance for the callee to
84-
free the provided buffer.
89+
the `UV_UDP_MMSG_CHUNK` flag cleared and the `UV_UDP_MMSG_FREE` flag set.
90+
The callee can now safely free the provided buffer.
91+
92+
.. versionchanged:: 1.40.0 added the `UV_UDP_MMSG_FREE` flag.
8593

8694
.. note::
8795
The receive callback will be called with `nread` == 0 and `addr` == NULL when there is
@@ -392,7 +400,7 @@ API
392400
it must be explicitly requested by passing the `UV_UDP_RECVMMSG` flag to
393401
:c:func:`uv_udp_init_ex`.
394402
.. versionchanged:: 1.39.0 :c:func:`uv_udp_using_recvmmsg` can be used in `alloc_cb` to
395-
determine if a buffer sized for use with :man:`recvmmsg(2)` should be
403+
determine if a buffer sized for use with :man:`recvmmsg(2)` should be
396404
allocated for the current handle/platform.
397405
398406
.. c:function:: int uv_udp_using_recvmmsg(uv_udp_t* handle)

deps/uv/include/uv.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,12 @@ enum uv_udp_flags {
614614
* must not be freed by the recv_cb callback.
615615
*/
616616
UV_UDP_MMSG_CHUNK = 8,
617+
/*
618+
* Indicates that the buffer provided has been fully utilized by recvmmsg and
619+
* that it should now be freed by the recv_cb callback. When this flag is set
620+
* in uv_udp_recv_cb, nread will always be 0 and addr will always be NULL.
621+
*/
622+
UV_UDP_MMSG_FREE = 16,
617623

618624
/*
619625
* Indicates that recvmmsg should be used, if available.
@@ -865,6 +871,7 @@ UV_EXTERN int uv_timer_stop(uv_timer_t* handle);
865871
UV_EXTERN int uv_timer_again(uv_timer_t* handle);
866872
UV_EXTERN void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat);
867873
UV_EXTERN uint64_t uv_timer_get_repeat(const uv_timer_t* handle);
874+
UV_EXTERN uint64_t uv_timer_get_due_in(const uv_timer_t* handle);
868875

869876

870877
/*

deps/uv/include/uv/errno.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
#if defined(EPROTO) && !defined(_WIN32)
318318
# define UV__EPROTO UV__ERR(EPROTO)
319319
#else
320-
# define UV__EPROTO UV__ERR(4046)
320+
# define UV__EPROTO (-4046)
321321
#endif
322322

323323
#if defined(EPROTONOSUPPORT) && !defined(_WIN32)

0 commit comments

Comments
 (0)