Skip to content

Commit

Permalink
deps: upgrade to libuv 1.20.3
Browse files Browse the repository at this point in the history
Refs: #19377
PR-URL: #20585
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
cjihrig committed May 9, 2018
1 parent 2246c3c commit 60349bb
Show file tree
Hide file tree
Showing 13 changed files with 87 additions and 7 deletions.
1 change: 1 addition & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,4 @@ Thomas Versteeg <thomasversteeg@gmx.com>
zzzjim <zzzjim@users.noreply.github.com>
Alex Arslan <ararslan@comcast.net>
Kyle Farnung <kfarnung@microsoft.com>
ssrlive <30760636+ssrlive@users.noreply.github.com>
19 changes: 19 additions & 0 deletions deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
2018.05.08, Version 1.20.3 (Stable), 8cfd67e59195251dff793ee47c185c9d6a8f3818

Changes since version 1.20.2:

* win: add Windows XP support to uv_if_indextoname() (ssrlive)

* win: fix `'floor' undefined` compiler warning (ssrlive)

* win, pipe: stop read for overlapped pipe (Bartosz Sosnowski)

* build: fix utf-8 name of copyright holder (Jérémy Lal)

* zos: initialize pollfd revents (jBarz)

* zos,doc: add system V message queue note (jBarz)

* linux: don't use uv__nonblock_ioctl() on sparc (Ben Noordhuis)


2018.04.23, Version 1.20.2 (Stable), c51fd3f66bbb386a1efdeba6812789f35a372d1e

Changes since version 1.20.1:
Expand Down
7 changes: 7 additions & 0 deletions deps/uv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@ describes the package in more detail.

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

### z/OS Notes

z/OS creates System V semaphores and message queues. These persist on the system
after the process terminates unless the event loop is closed.

Use the `ipcrm` command to manually clear up System V resources.

## Patches

See the [guidelines for contributing][].
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/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.20.2], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.20.3], [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
2 changes: 1 addition & 1 deletion deps/uv/include/uv-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define UV_VERSION_MAJOR 1
#define UV_VERSION_MINOR 20
#define UV_VERSION_PATCH 2
#define UV_VERSION_PATCH 3
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""

Expand Down
4 changes: 2 additions & 2 deletions deps/uv/m4/libuv-check-flags.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dnl Macros to check the presence of generic (non-typed) symbols.
dnl Copyright (c) 2006-2008 Diego Pettenà <flameeyes gmail com>
dnl Copyright (c) 2006-2008 Diego Pettenò <flameeyes gmail com>
dnl Copyright (c) 2006-2008 xine project
dnl
dnl This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -316,4 +316,4 @@ AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned],
[Define the highest alignment supported])
fi
])
])
12 changes: 12 additions & 0 deletions deps/uv/src/unix/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,18 @@ struct uv__stream_queued_fds_s {
#define uv__nonblock uv__nonblock_fcntl
#endif

/* On Linux, uv__nonblock_fcntl() and uv__nonblock_ioctl() do not commute
* when O_NDELAY is not equal to O_NONBLOCK. Case in point: linux/sparc32
* and linux/sparc64, where O_NDELAY is O_NONBLOCK + another bit.
*
* Libuv uses uv__nonblock_fcntl() directly sometimes so ensure that it
* commutes with uv__nonblock().
*/
#if defined(__linux__) && O_NDELAY != O_NONBLOCK
#undef uv__nonblock
#define uv__nonblock uv__nonblock_fcntl
#endif

/* core */
int uv__cloexec_ioctl(int fd, int set);
int uv__cloexec_fcntl(int fd, int set);
Expand Down
2 changes: 2 additions & 0 deletions deps/uv/src/unix/os390-syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ uv__os390_epoll* epoll_create1(int flags) {
maybe_resize(lst, 1);
lst->items[lst->size - 1].fd = lst->msg_queue;
lst->items[lst->size - 1].events = POLLIN;
lst->items[lst->size - 1].revents = 0;
uv_once(&once, epoll_init);
uv_mutex_lock(&global_epoll_lock);
QUEUE_INSERT_TAIL(&global_epoll_queue, &lst->member);
Expand Down Expand Up @@ -252,6 +253,7 @@ int epoll_ctl(uv__os390_epoll* lst,
}
lst->items[fd].fd = fd;
lst->items[fd].events = event->events;
lst->items[fd].revents = 0;
} else if (op == EPOLL_CTL_MOD) {
if (fd >= lst->size || lst->items[fd].fd == -1) {
uv_mutex_unlock(&global_epoll_lock);
Expand Down
10 changes: 8 additions & 2 deletions deps/uv/src/win/getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,21 @@ int uv_if_indextoname(unsigned int ifindex, char* buffer, size_t* size) {
DWORD bufsize;
int r;

uv__once_init();

if (buffer == NULL || size == NULL || *size == 0)
return UV_EINVAL;

r = ConvertInterfaceIndexToLuid(ifindex, &luid);
if (pConvertInterfaceIndexToLuid == NULL)
return UV_ENOSYS;
r = pConvertInterfaceIndexToLuid(ifindex, &luid);

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

r = ConvertInterfaceLuidToNameW(&luid, wname, ARRAY_SIZE(wname));
if (pConvertInterfaceLuidToNameW == NULL)
return UV_ENOSYS;
r = pConvertInterfaceLuidToNameW(&luid, wname, ARRAY_SIZE(wname));

if (r != 0)
return uv_translate_sys_error(r);
Expand Down
7 changes: 7 additions & 0 deletions deps/uv/src/win/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,13 @@ void uv__pipe_unpause_read(uv_pipe_t* handle) {


void uv__pipe_stop_read(uv_pipe_t* handle) {
if (pCancelIoEx &&
!(handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE) &&
!(handle->flags & UV_HANDLE_EMULATE_IOCP) &&
handle->flags & UV_HANDLE_READING &&
handle->read_req.type == UV_READ) {
pCancelIoEx(handle->handle, &handle->read_req.u.io.overlapped);
}
handle->flags &= ~UV_HANDLE_READING;
uv__pipe_pause_read((uv_pipe_t*)handle);
uv__pipe_unpause_read((uv_pipe_t*)handle);
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/src/win/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <tlhelp32.h>
#include <windows.h>
#include <userenv.h>

#include <math.h>

/*
* Max title length; the only thing MSDN tells us about the maximum length
Expand Down
11 changes: 11 additions & 0 deletions deps/uv/src/win/winapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ sPowerRegisterSuspendResumeNotification pPowerRegisterSuspendResumeNotification;
/* User32.dll function pointer */
sSetWinEventHook pSetWinEventHook;

/* iphlpapi.dll function pointer */
sConvertInterfaceIndexToLuid pConvertInterfaceIndexToLuid = NULL;
sConvertInterfaceLuidToNameW pConvertInterfaceLuidToNameW = NULL;

void uv_winapi_init(void) {
HMODULE ntdll_module;
HMODULE kernel32_module;
HMODULE powrprof_module;
HMODULE user32_module;
HMODULE iphlpapi_module;

ntdll_module = GetModuleHandleA("ntdll.dll");
if (ntdll_module == NULL) {
Expand Down Expand Up @@ -166,4 +170,11 @@ void uv_winapi_init(void) {
GetProcAddress(user32_module, "SetWinEventHook");
}

iphlpapi_module = LoadLibraryA("iphlpapi.dll");
if (iphlpapi_module != NULL) {
pConvertInterfaceIndexToLuid = (sConvertInterfaceIndexToLuid)
GetProcAddress(iphlpapi_module, "ConvertInterfaceIndexToLuid");
pConvertInterfaceLuidToNameW = (sConvertInterfaceLuidToNameW)
GetProcAddress(iphlpapi_module, "ConvertInterfaceLuidToNameW");
}
}
15 changes: 15 additions & 0 deletions deps/uv/src/win/winapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -4775,4 +4775,19 @@ extern sPowerRegisterSuspendResumeNotification pPowerRegisterSuspendResumeNotifi
/* User32.dll function pointer */
extern sSetWinEventHook pSetWinEventHook;

/* iphlpapi.dll function pointer */
union _NET_LUID_LH;
typedef DWORD (WINAPI *sConvertInterfaceIndexToLuid)(
ULONG InterfaceIndex,
union _NET_LUID_LH *InterfaceLuid);

typedef DWORD (WINAPI *sConvertInterfaceLuidToNameW)(
const union _NET_LUID_LH *InterfaceLuid,
PWSTR InterfaceName,
size_t Length);

extern sConvertInterfaceIndexToLuid pConvertInterfaceIndexToLuid;
extern sConvertInterfaceLuidToNameW pConvertInterfaceLuidToNameW;


#endif /* UV_WIN_WINAPI_H_ */

0 comments on commit 60349bb

Please sign in to comment.