Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Update to 1.32.0 #10

Merged
merged 41 commits into from
Sep 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3072edf
Add SHA to ChangeLog
cjihrig Aug 9, 2019
6f77676
Now working on version 1.31.1
cjihrig Aug 9, 2019
8ed9112
misc: enable stalebot
saghul Aug 7, 2019
b0fd171
win: map ERROR_ENVVAR_NOT_FOUND to UV_ENOENT
cjihrig Aug 12, 2019
6c9c4fe
win: use L'\0' as UTF-16 null terminator
cjihrig Aug 10, 2019
9e80057
win: support retrieving empty env variables
cjihrig Aug 10, 2019
66132c6
unix,stream: fix returned error codes
santigimeno Aug 15, 2019
54a5e92
test: fix typo in DYLD_LIBRARY_PATH
bnoordhuis Aug 17, 2019
1de1517
unix,signal: keep handle active if pending signal
santigimeno Aug 13, 2019
d6fd0a5
openbsd: fix uv_cpu_info
santigimeno Aug 17, 2019
040543e
src: move uv_free_cpu_info to uv-common.c
santigimeno Aug 17, 2019
958e85f
tcp: add uv_tcp_close_reset method
santigimeno Apr 28, 2019
b571851
test: fix udp-multicast-join tests
santigimeno Feb 6, 2019
1bd7cc5
test: remove assertion in fs_statfs test
cjihrig Aug 15, 2019
641ec77
doc: clarify uv_buf_t usage in uv_alloc_cb
nicki-krizek Aug 22, 2019
fa41f13
win: fix typo in preprocessor expression
podsvirov Aug 19, 2019
2ee2d46
timer: fix uv_timer_start on closing timer
neoxic Aug 13, 2019
91d95f8
udp: add source-specific multicast support
Jul 31, 2016
288ec70
udp: fix error return values
santigimeno Feb 6, 2019
9efc196
udp: drop IPV6_SSM_SUPPORT macro
santigimeno Feb 21, 2019
f91702a
udp: fix uv__udp_set_source_membership6
santigimeno Feb 21, 2019
7452507
udp: use sockaddr_storage instead of union
santigimeno Mar 12, 2019
80e931b
build,zos: add _OPEN_SYS_SOCK_EXT3 flag
santigimeno Feb 21, 2019
24e65f7
test: add specific source multicast tests
santigimeno Feb 21, 2019
43c74a6
include: map EILSEQ error code
cjihrig Aug 23, 2019
7d950c0
win, tty: improve SIGWINCH performance
bzoz Sep 5, 2019
5ba93ed
build: fix ios build error
Sep 4, 2019
ca08b48
aix: replace ECONNRESET with EOF if already closed
Sep 6, 2019
ba1a770
build: add cmake library VERSION, SOVERSION
cotequeiroz Sep 6, 2019
be449a1
build: make include/ public in CMakeLists.txt
bnoordhuis Sep 6, 2019
6325a7c
build: export USING_UV_SHARED=1 to cmake deps
bnoordhuis Sep 6, 2019
1f1f112
build: cmake_minimum_required(VERSION 2.8.12)
blueyed Sep 6, 2019
4a972bf
aix: Fix broken cmpxchgi() XL C++ specialization.
apaprocki Sep 6, 2019
c898f2e
test: fix -Wsign-compare warning
bnoordhuis Sep 6, 2019
1f63e28
unix: simplify open(O_CLOEXEC) feature detection
bnoordhuis Sep 6, 2019
9b12e02
unix: fix UV_FS_O_DIRECT definition on Linux
jorangreef Sep 6, 2019
25682fa
doc: uv_handle_t documentation suggestion
danbev Sep 2, 2019
697bea8
2019.09.10, Version 1.32.0 (Stable)
cjihrig Sep 9, 2019
7db593f
Merge tag 'v1.32.0' into libuv-v1.32.0-work
erw7 Sep 14, 2019
e3954a9
Fix undefined MCAST_* under MinGW
Crunkle Sep 8, 2019
d97fd59
Fix problem of receiving unexpected SIGWINCH
erw7 Sep 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 90
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- v2
- not-stale
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
7 changes: 7 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,10 @@ Nan Xiao <nan@chinadtrace.org>
Ben Davies <kaiepi@outlook.com>
Nhan Khong <knhana7@gmail.com>
Crunkle <justcrunkle@hotmail.co.uk>
Tomas Krizek <tomas.krizek@nic.cz>
Konstantin Podsvirov <konstantin@podsvirov.pro>
seny <arseny.vakhrushev@gmail.com>
Vladimir Karnushin <v.karnushin@mail.ru>
MaYuming <maym@appexnetworks.com>
Eneas U de Queiroz <cotequeiroz@gmail.com>
Daniel Hahler <git@thequod.de>
19 changes: 13 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TODO: determine CMAKE_SYSTEM_NAME on OS/390. Currently assumes "OS/390".
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 2.8.12)
project(libuv)

if(MSVC)
Expand Down Expand Up @@ -116,6 +116,7 @@ set(uv_test_sources
test/test-shutdown-eof.c
test/test-shutdown-twice.c
test/test-signal-multiple-loops.c
test/test-signal-pending-on-close.c
test/test-signal.c
test/test-socket-buffer-size.c
test/test-spawn.c
Expand All @@ -127,6 +128,7 @@ set(uv_test_sources
test/test-tcp-close-accept.c
test/test-tcp-close-while-connecting.c
test/test-tcp-close.c
test/test-tcp-close-reset.c
test/test-tcp-connect-error-after-write.c
test/test-tcp-connect-error.c
test/test-tcp-connect-timeout.c
Expand Down Expand Up @@ -317,6 +319,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS/390")
list(APPEND uv_defines _OPEN_MSGQ_EXT)
list(APPEND uv_defines _OPEN_SYS_FILE_EXT)
list(APPEND uv_defines _OPEN_SYS_IF_EXT)
list(APPEND uv_defines _OPEN_SYS_SOCK_EXT3)
list(APPEND uv_defines _OPEN_SYS_SOCK_IPV6)
list(APPEND uv_defines _UNIX03_SOURCE)
list(APPEND uv_defines _UNIX03_THREADS)
Expand All @@ -340,15 +343,17 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD")
endif()

add_library(uv SHARED ${uv_sources})
target_compile_definitions(uv PRIVATE ${uv_defines} BUILDING_UV_SHARED=1)
target_compile_definitions(uv
INTERFACE USING_UV_SHARED=1
PRIVATE ${uv_defines} BUILDING_UV_SHARED=1)
target_compile_options(uv PRIVATE ${uv_cflags})
target_include_directories(uv PRIVATE include src)
target_include_directories(uv PUBLIC include PRIVATE src)
target_link_libraries(uv ${uv_libraries})

add_library(uv_a STATIC ${uv_sources})
target_compile_definitions(uv_a PRIVATE ${uv_defines})
target_compile_options(uv_a PRIVATE ${uv_cflags})
target_include_directories(uv_a PRIVATE include src)
target_include_directories(uv_a PUBLIC include PRIVATE src)
target_link_libraries(uv_a ${uv_libraries})

option(libuv_buildtests "Build the unit tests when BUILD_TESTING is enabled." ON)
Expand All @@ -360,15 +365,13 @@ if(BUILD_TESTING AND libuv_buildtests)
target_compile_definitions(uv_run_tests
PRIVATE ${uv_defines} USING_UV_SHARED=1)
target_compile_options(uv_run_tests PRIVATE ${uv_cflags})
target_include_directories(uv_run_tests PRIVATE include)
target_link_libraries(uv_run_tests uv ${uv_test_libraries})
add_test(NAME uv_test
COMMAND uv_run_tests
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
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})
target_include_directories(uv_run_tests_a PRIVATE include)
target_link_libraries(uv_run_tests_a uv_a ${uv_test_libraries})
add_test(NAME uv_test_a
COMMAND uv_run_tests_a
Expand All @@ -383,6 +386,10 @@ if(UNIX)
endforeach(x)
file(STRINGS configure.ac configure_ac REGEX ^AC_INIT)
string(REGEX MATCH [0-9]+[.][0-9]+[.][0-9]+ PACKAGE_VERSION "${configure_ac}")
string(REGEX MATCH ^[0-9]+ UV_VERSION_MAJOR "${PACKAGE_VERSION}")
# The version in the filename is mirroring the behaviour of autotools.
set_target_properties(uv PROPERTIES VERSION ${UV_VERSION_MAJOR}.0.0
SOVERSION ${UV_VERSION_MAJOR})
set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(prefix ${CMAKE_INSTALL_PREFIX})
Expand Down
77 changes: 76 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,79 @@
2019.08.10, Version 1.31.0 (Stable)
2019.09.10, Version 1.32.0 (Stable)

Changes since version 1.31.0:

* misc: enable stalebot (Saúl Ibarra Corretgé)

* win: map ERROR_ENVVAR_NOT_FOUND to UV_ENOENT (cjihrig)

* win: use L'\0' as UTF-16 null terminator (cjihrig)

* win: support retrieving empty env variables (cjihrig)

* unix,stream: fix returned error codes (Santiago Gimeno)

* test: fix typo in DYLD_LIBRARY_PATH (Ben Noordhuis)

* unix,signal: keep handle active if pending signal (Santiago Gimeno)

* openbsd: fix uv_cpu_info (Santiago Gimeno)

* src: move uv_free_cpu_info to uv-common.c (Santiago Gimeno)

* tcp: add uv_tcp_close_reset method (Santiago Gimeno)

* test: fix udp-multicast-join tests (Santiago Gimeno)

* test: remove assertion in fs_statfs test (cjihrig)

* doc: clarify uv_buf_t usage in uv_alloc_cb (Tomas Krizek)

* win: fix typo in preprocessor expression (Konstantin Podsvirov)

* timer: fix uv_timer_start on closing timer (seny)

* udp: add source-specific multicast support (Vladimir Karnushin)

* udp: fix error return values (Santiago Gimeno)

* udp: drop IPV6_SSM_SUPPORT macro (Santiago Gimeno)

* udp: fix uv__udp_set_source_membership6 (Santiago Gimeno)

* udp: use sockaddr_storage instead of union (Santiago Gimeno)

* build,zos: add _OPEN_SYS_SOCK_EXT3 flag (Santiago Gimeno)

* test: add specific source multicast tests (Santiago Gimeno)

* include: map EILSEQ error code (cjihrig)

* win, tty: improve SIGWINCH performance (Bartosz Sosnowski)

* build: fix ios build error (MaYuming)

* aix: replace ECONNRESET with EOF if already closed (Milad Farazmand)

* build: add cmake library VERSION, SOVERSION (Eneas U de Queiroz)

* build: make include/ public in CMakeLists.txt (Ben Noordhuis)

* build: export USING_UV_SHARED=1 to cmake deps (Ben Noordhuis)

* build: cmake_minimum_required(VERSION 2.8.12) (Daniel Hahler)

* aix: Fix broken cmpxchgi() XL C++ specialization. (Andrew Paprocki)

* test: fix -Wsign-compare warning (Ben Noordhuis)

* unix: simplify open(O_CLOEXEC) feature detection (Ben Noordhuis)

* unix: fix UV_FS_O_DIRECT definition on Linux (Joran Dirk Greef)

* doc: uv_handle_t documentation suggestion (Daniel Bevenius)


2019.08.10, Version 1.31.0 (Stable), 0a6771cee4c15184c924bfe9d397bdd0c3b206ba

Changes since version 1.30.1:

Expand Down
3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-shutdown-eof.c \
test/test-shutdown-twice.c \
test/test-signal-multiple-loops.c \
test/test-signal-pending-on-close.c \
test/test-signal.c \
test/test-socket-buffer-size.c \
test/test-spawn.c \
Expand All @@ -259,6 +260,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-tcp-close-accept.c \
test/test-tcp-close-while-connecting.c \
test/test-tcp-close.c \
test/test-tcp-close-reset.c \
test/test-tcp-create-socket-early.c \
test/test-tcp-connect-error-after-write.c \
test/test-tcp-connect-error.c \
Expand Down Expand Up @@ -518,6 +520,7 @@ libuv_la_CFLAGS += -D_UNIX03_THREADS \
-D_XOPEN_SOURCE_EXTENDED \
-D_ALL_SOURCE \
-D_LARGE_TIME_API \
-D_OPEN_SYS_SOCK_EXT3 \
-D_OPEN_SYS_SOCK_IPV6 \
-D_OPEN_SYS_FILE_EXT \
-DUV_PLATFORM_SEM_T=int \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ Check the [SUPPORTED_PLATFORMS file](SUPPORTED_PLATFORMS.md).

### AIX Notes

AIX compilation using IBM XL C/C++ requires version 12.1 or greater.

AIX support for filesystem events requires the non-default IBM `bos.ahafs`
package to be installed. This package provides the AIX Event Infrastructure
that is detected by `autoconf`.
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

AC_PREREQ(2.57)
AC_INIT([libuv], [1.31.0], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.32.0], [https://github.com/libuv/libuv/issues])
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/libuv-extra-automake-flags.m4])
m4_include([m4/as_case.m4])
Expand Down
5 changes: 4 additions & 1 deletion docs/src/handle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ Data types
a ``UV_ENOBUFS`` error will be triggered in the :c:type:`uv_udp_recv_cb` or the
:c:type:`uv_read_cb` callback.

Each buffer is used only once and the user is responsible for freeing it in the
:c:type:`uv_udp_recv_cb` or the :c:type:`uv_read_cb` callback.

A suggested size (65536 at the moment in most cases) is provided, but it's just an indication,
not related in any way to the pending data to be read. The user is free to allocate the amount
of memory they decide.
Expand Down Expand Up @@ -87,7 +90,7 @@ Public members

.. c:member:: uv_loop_t* uv_handle_t.loop
Pointer to the :c:type:`uv_loop_t` where the handle is running on. Readonly.
Pointer to the :c:type:`uv_loop_t` the handle is running on. Readonly.

.. c:member:: uv_handle_type uv_handle_t.type
Expand Down
11 changes: 11 additions & 0 deletions docs/src/signal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ Reception of some signals is emulated:
program is given approximately 10 seconds to perform cleanup. After that
Windows will unconditionally terminate it.

* SIGWINCH is raised whenever libuv detects that the console has been
resized. When a libuv app is running under a console emulator, or when a
32-bit libuv app is running on 64-bit system, SIGWINCH will be emulated. In
such cases SIGWINCH signals may not always be delivered in a timely manner.
For a writable :c:type:`uv_tty_t` handle libuv will only detect size changes
when the cursor is moved. When a readable :c:type:`uv_tty_t` handle is used,
resizing of the console buffer will be detected only if the handle is in raw
mode and is being read.

* Watchers for other signals can be successfully created, but these signals
are never received. These signals are: `SIGILL`, `SIGABRT`, `SIGFPE`, `SIGSEGV`,
`SIGTERM` and `SIGKILL.`
Expand All @@ -28,6 +37,8 @@ Reception of some signals is emulated:
not detected by libuv; these will not trigger a signal watcher.

.. versionchanged:: 1.15.0 SIGWINCH support on Windows was improved.
.. versionchanged:: 1.31.0 32-bit libuv SIGWINCH support on 64-bit Windows was
rolled back to old implementation.

Unix notes
----------
Expand Down
4 changes: 2 additions & 2 deletions docs/src/stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Data types
from the stream again is undefined.

The callee is responsible for freeing the buffer, libuv does not reuse it.
The buffer may be a null buffer (where buf->base=NULL and buf->len=0) on
error.
The buffer may be a null buffer (where `buf->base` == NULL and `buf->len` == 0)
on error.

.. c:type:: void (*uv_write_cb)(uv_write_t* req, int status)
Expand Down
10 changes: 10 additions & 0 deletions docs/src/tcp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,13 @@ API
mapping
.. seealso:: The :c:type:`uv_stream_t` API functions also apply.
.. c:function:: int uv_tcp_close_reset(uv_tcp_t* handle, uv_close_cb close_cb)
Resets a TCP connection by sending a RST packet. This is accomplished by
setting the `SO_LINGER` socket option with a linger interval of zero and
then calling :c:func:`uv_close`.
Due to some platform inconsistencies, mixing of :c:func:`uv_shutdown` and
:c:func:`uv_tcp_close_reset` calls is not allowed.
.. versionadded:: 1.32.0
30 changes: 26 additions & 4 deletions docs/src/udp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,19 @@ Data types

* `handle`: UDP handle
* `nread`: Number of bytes that have been received.
0 if there is no more data to read. You may discard or repurpose
the read buffer. Note that 0 may also mean that an empty datagram
was received (in this case `addr` is not NULL). < 0 if a transmission
error was detected.
0 if there is no more data to read. Note that 0 may also mean that an
empty datagram was received (in this case `addr` is not NULL). < 0 if
a transmission error was detected.
* `buf`: :c:type:`uv_buf_t` with the received data.
* `addr`: ``struct sockaddr*`` containing the address of the sender.
Can be NULL. Valid for the duration of the callback only.
* `flags`: One or more or'ed UV_UDP_* constants. Right now only
``UV_UDP_PARTIAL`` is used.

The callee is responsible for freeing the buffer, libuv does not reuse it.
The buffer may be a null buffer (where `buf->base` == NULL and `buf->len` == 0)
on error.

.. note::
The receive callback will be called with `nread` == 0 and `addr` == NULL when there is
nothing to read, and with `nread` == 0 and `addr` != NULL when an empty UDP packet is
Expand Down Expand Up @@ -219,6 +222,25 @@ API
:returns: 0 on success, or an error code < 0 on failure.
.. c:function:: int uv_udp_set_source_membership(uv_udp_t* handle, const char* multicast_addr, const char* interface_addr, const char* source_addr, uv_membership membership)
Set membership for a source-specific multicast group.
:param handle: UDP handle. Should have been initialized with
:c:func:`uv_udp_init`.
:param multicast_addr: Multicast address to set membership for.
:param interface_addr: Interface address.
:param source_addr: Source address.
:param membership: Should be ``UV_JOIN_GROUP`` or ``UV_LEAVE_GROUP``.
:returns: 0 on success, or an error code < 0 on failure.
.. versionadded:: 1.32.0
.. c:function:: int uv_udp_set_multicast_loop(uv_udp_t* handle, int on)
Set IP multicast loop flag. Makes multicast packets loop back to
Expand Down
11 changes: 11 additions & 0 deletions include/uv.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
extern "C" {
#endif

#if defined(BUILDING_UV_SHARED) && defined(USING_UV_SHARED)
#error "Define either BUILDING_UV_SHARED or USING_UV_SHARED, not both."
#endif

#ifdef _WIN32
/* Windows - set up dll import/export decorators. */
# if defined(BUILDING_UV_SHARED)
Expand Down Expand Up @@ -143,6 +147,7 @@ extern "C" {
XX(EREMOTEIO, "remote I/O error") \
XX(ENOTTY, "inappropriate ioctl for device") \
XX(EFTYPE, "inappropriate file type or format") \
XX(EILSEQ, "illegal byte sequence") \

#define UV_HANDLE_TYPE_MAP(XX) \
XX(ASYNC, async) \
Expand Down Expand Up @@ -559,6 +564,7 @@ UV_EXTERN int uv_tcp_getsockname(const uv_tcp_t* handle,
UV_EXTERN int uv_tcp_getpeername(const uv_tcp_t* handle,
struct sockaddr* name,
int* namelen);
UV_EXTERN int uv_tcp_close_reset(uv_tcp_t* handle, uv_close_cb close_cb);
UV_EXTERN int uv_tcp_connect(uv_connect_t* req,
uv_tcp_t* handle,
const struct sockaddr* addr,
Expand Down Expand Up @@ -645,6 +651,11 @@ UV_EXTERN int uv_udp_set_membership(uv_udp_t* handle,
const char* multicast_addr,
const char* interface_addr,
uv_membership membership);
UV_EXTERN int uv_udp_set_source_membership(uv_udp_t* handle,
const char* multicast_addr,
const char* interface_addr,
const char* source_addr,
uv_membership membership);
UV_EXTERN int uv_udp_set_multicast_loop(uv_udp_t* handle, int on);
UV_EXTERN int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl);
UV_EXTERN int uv_udp_set_multicast_interface(uv_udp_t* handle,
Expand Down
5 changes: 5 additions & 0 deletions include/uv/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,5 +439,10 @@
# define UV__EFTYPE (-4028)
#endif

#if defined(EILSEQ) && !defined(_WIN32)
# define UV__EILSEQ UV__ERR(EILSEQ)
#else
# define UV__EILSEQ (-4027)
#endif

#endif /* UV_ERRNO_H_ */
Loading