Skip to content

Commit c54f4bc

Browse files
cjihrigMylesBorins
authored andcommitted
deps: upgrade to libuv 1.20.3
Backport-PR-URL: #24103 Refs: #19377 PR-URL: #20585 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 2307653 commit c54f4bc

13 files changed

+87
-7
lines changed

deps/uv/AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,4 @@ Thomas Versteeg <[email protected]>
337337
338338
Alex Arslan <[email protected]>
339339
Kyle Farnung <[email protected]>
340+

deps/uv/ChangeLog

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
2018.05.08, Version 1.20.3 (Stable), 8cfd67e59195251dff793ee47c185c9d6a8f3818
2+
3+
Changes since version 1.20.2:
4+
5+
* win: add Windows XP support to uv_if_indextoname() (ssrlive)
6+
7+
* win: fix `'floor' undefined` compiler warning (ssrlive)
8+
9+
* win, pipe: stop read for overlapped pipe (Bartosz Sosnowski)
10+
11+
* build: fix utf-8 name of copyright holder (Jérémy Lal)
12+
13+
* zos: initialize pollfd revents (jBarz)
14+
15+
* zos,doc: add system V message queue note (jBarz)
16+
17+
* linux: don't use uv__nonblock_ioctl() on sparc (Ben Noordhuis)
18+
19+
120
2018.04.23, Version 1.20.2 (Stable), c51fd3f66bbb386a1efdeba6812789f35a372d1e
221

322
Changes since version 1.20.1:

deps/uv/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,13 @@ describes the package in more detail.
322322

323323
AIX support for filesystem events is not compiled when building with `gyp`.
324324

325+
### z/OS Notes
326+
327+
z/OS creates System V semaphores and message queues. These persist on the system
328+
after the process terminates unless the event loop is closed.
329+
330+
Use the `ipcrm` command to manually clear up System V resources.
331+
325332
## Patches
326333

327334
See the [guidelines for contributing][].

deps/uv/configure.ac

+1-1
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.20.2], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.20.3], [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/include/uv-version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#define UV_VERSION_MAJOR 1
3434
#define UV_VERSION_MINOR 20
35-
#define UV_VERSION_PATCH 2
35+
#define UV_VERSION_PATCH 3
3636
#define UV_VERSION_IS_RELEASE 1
3737
#define UV_VERSION_SUFFIX ""
3838

deps/uv/m4/libuv-check-flags.m4

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Macros to check the presence of generic (non-typed) symbols.
2-
dnl Copyright (c) 2006-2008 Diego Pettenà <flameeyes gmail com>
2+
dnl Copyright (c) 2006-2008 Diego Pettenò <flameeyes gmail com>
33
dnl Copyright (c) 2006-2008 xine project
44
dnl
55
dnl This program is free software; you can redistribute it and/or modify
@@ -316,4 +316,4 @@ AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
316316
AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned],
317317
[Define the highest alignment supported])
318318
fi
319-
])
319+
])

deps/uv/src/unix/internal.h

+12
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,18 @@ struct uv__stream_queued_fds_s {
185185
#define uv__nonblock uv__nonblock_fcntl
186186
#endif
187187

188+
/* On Linux, uv__nonblock_fcntl() and uv__nonblock_ioctl() do not commute
189+
* when O_NDELAY is not equal to O_NONBLOCK. Case in point: linux/sparc32
190+
* and linux/sparc64, where O_NDELAY is O_NONBLOCK + another bit.
191+
*
192+
* Libuv uses uv__nonblock_fcntl() directly sometimes so ensure that it
193+
* commutes with uv__nonblock().
194+
*/
195+
#if defined(__linux__) && O_NDELAY != O_NONBLOCK
196+
#undef uv__nonblock
197+
#define uv__nonblock uv__nonblock_fcntl
198+
#endif
199+
188200
/* core */
189201
int uv__cloexec_ioctl(int fd, int set);
190202
int uv__cloexec_fcntl(int fd, int set);

deps/uv/src/unix/os390-syscalls.c

+2
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ uv__os390_epoll* epoll_create1(int flags) {
215215
maybe_resize(lst, 1);
216216
lst->items[lst->size - 1].fd = lst->msg_queue;
217217
lst->items[lst->size - 1].events = POLLIN;
218+
lst->items[lst->size - 1].revents = 0;
218219
uv_once(&once, epoll_init);
219220
uv_mutex_lock(&global_epoll_lock);
220221
QUEUE_INSERT_TAIL(&global_epoll_queue, &lst->member);
@@ -252,6 +253,7 @@ int epoll_ctl(uv__os390_epoll* lst,
252253
}
253254
lst->items[fd].fd = fd;
254255
lst->items[fd].events = event->events;
256+
lst->items[fd].revents = 0;
255257
} else if (op == EPOLL_CTL_MOD) {
256258
if (fd >= lst->size || lst->items[fd].fd == -1) {
257259
uv_mutex_unlock(&global_epoll_lock);

deps/uv/src/win/getaddrinfo.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -392,15 +392,21 @@ int uv_if_indextoname(unsigned int ifindex, char* buffer, size_t* size) {
392392
DWORD bufsize;
393393
int r;
394394

395+
uv__once_init();
396+
395397
if (buffer == NULL || size == NULL || *size == 0)
396398
return UV_EINVAL;
397399

398-
r = ConvertInterfaceIndexToLuid(ifindex, &luid);
400+
if (pConvertInterfaceIndexToLuid == NULL)
401+
return UV_ENOSYS;
402+
r = pConvertInterfaceIndexToLuid(ifindex, &luid);
399403

400404
if (r != 0)
401405
return uv_translate_sys_error(r);
402406

403-
r = ConvertInterfaceLuidToNameW(&luid, wname, ARRAY_SIZE(wname));
407+
if (pConvertInterfaceLuidToNameW == NULL)
408+
return UV_ENOSYS;
409+
r = pConvertInterfaceLuidToNameW(&luid, wname, ARRAY_SIZE(wname));
404410

405411
if (r != 0)
406412
return uv_translate_sys_error(r);

deps/uv/src/win/pipe.c

+7
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,13 @@ void uv__pipe_unpause_read(uv_pipe_t* handle) {
735735

736736

737737
void uv__pipe_stop_read(uv_pipe_t* handle) {
738+
if (pCancelIoEx &&
739+
!(handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE) &&
740+
!(handle->flags & UV_HANDLE_EMULATE_IOCP) &&
741+
handle->flags & UV_HANDLE_READING &&
742+
handle->read_req.type == UV_READ) {
743+
pCancelIoEx(handle->handle, &handle->read_req.u.io.overlapped);
744+
}
738745
handle->flags &= ~UV_HANDLE_READING;
739746
uv__pipe_pause_read((uv_pipe_t*)handle);
740747
uv__pipe_unpause_read((uv_pipe_t*)handle);

deps/uv/src/win/util.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include <tlhelp32.h>
3838
#include <windows.h>
3939
#include <userenv.h>
40-
40+
#include <math.h>
4141

4242
/*
4343
* Max title length; the only thing MSDN tells us about the maximum length

deps/uv/src/win/winapi.c

+11
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ sPowerRegisterSuspendResumeNotification pPowerRegisterSuspendResumeNotification;
5555
/* User32.dll function pointer */
5656
sSetWinEventHook pSetWinEventHook;
5757

58+
/* iphlpapi.dll function pointer */
59+
sConvertInterfaceIndexToLuid pConvertInterfaceIndexToLuid = NULL;
60+
sConvertInterfaceLuidToNameW pConvertInterfaceLuidToNameW = NULL;
5861

5962
void uv_winapi_init(void) {
6063
HMODULE ntdll_module;
6164
HMODULE kernel32_module;
6265
HMODULE powrprof_module;
6366
HMODULE user32_module;
67+
HMODULE iphlpapi_module;
6468

6569
ntdll_module = GetModuleHandleA("ntdll.dll");
6670
if (ntdll_module == NULL) {
@@ -166,4 +170,11 @@ void uv_winapi_init(void) {
166170
GetProcAddress(user32_module, "SetWinEventHook");
167171
}
168172

173+
iphlpapi_module = LoadLibraryA("iphlpapi.dll");
174+
if (iphlpapi_module != NULL) {
175+
pConvertInterfaceIndexToLuid = (sConvertInterfaceIndexToLuid)
176+
GetProcAddress(iphlpapi_module, "ConvertInterfaceIndexToLuid");
177+
pConvertInterfaceLuidToNameW = (sConvertInterfaceLuidToNameW)
178+
GetProcAddress(iphlpapi_module, "ConvertInterfaceLuidToNameW");
179+
}
169180
}

deps/uv/src/win/winapi.h

+15
Original file line numberDiff line numberDiff line change
@@ -4775,4 +4775,19 @@ extern sPowerRegisterSuspendResumeNotification pPowerRegisterSuspendResumeNotifi
47754775
/* User32.dll function pointer */
47764776
extern sSetWinEventHook pSetWinEventHook;
47774777

4778+
/* iphlpapi.dll function pointer */
4779+
union _NET_LUID_LH;
4780+
typedef DWORD (WINAPI *sConvertInterfaceIndexToLuid)(
4781+
ULONG InterfaceIndex,
4782+
union _NET_LUID_LH *InterfaceLuid);
4783+
4784+
typedef DWORD (WINAPI *sConvertInterfaceLuidToNameW)(
4785+
const union _NET_LUID_LH *InterfaceLuid,
4786+
PWSTR InterfaceName,
4787+
size_t Length);
4788+
4789+
extern sConvertInterfaceIndexToLuid pConvertInterfaceIndexToLuid;
4790+
extern sConvertInterfaceLuidToNameW pConvertInterfaceLuidToNameW;
4791+
4792+
47784793
#endif /* UV_WIN_WINAPI_H_ */

0 commit comments

Comments
 (0)