From 1fca11e114409b114dc1a0d675841fe59636a4f2 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 16 Nov 2016 13:49:21 -0500 Subject: [PATCH] deps: upgrade libuv to 1.10.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/9542 Fixes: https://github.com/nodejs/node/issues/9546 PR-URL: https://github.com/nodejs/node/pull/9647 Reviewed-By: Imran Iqbal Reviewed-By: Santiago Gimeno Reviewed-By: Ben Noordhuis Reviewed-By: Myles Borins Reviewed-By: Johan Bergström --- deps/uv/AUTHORS | 1 + deps/uv/ChangeLog | 23 +++++++++++- deps/uv/MAINTAINERS.md | 1 + deps/uv/appveyor.yml | 2 +- deps/uv/configure.ac | 2 +- deps/uv/docs/src/fs.rst | 2 +- deps/uv/include/uv-version.h | 2 +- deps/uv/src/unix/core.c | 2 +- deps/uv/src/unix/poll.c | 4 +-- deps/uv/src/unix/signal.c | 4 +-- deps/uv/src/unix/stream.c | 3 +- deps/uv/src/win/process-stdio.c | 1 + deps/uv/src/win/tty.c | 62 --------------------------------- deps/uv/src/win/winapi.h | 4 +-- 14 files changed, 37 insertions(+), 76 deletions(-) diff --git a/deps/uv/AUTHORS b/deps/uv/AUTHORS index 67aa17620ddf82..50916c67cdc30a 100644 --- a/deps/uv/AUTHORS +++ b/deps/uv/AUTHORS @@ -277,3 +277,4 @@ Alex Hultman Brad King Philippe Laferriere Will Speak +Hitesh Kanwathirtha diff --git a/deps/uv/ChangeLog b/deps/uv/ChangeLog index 8c667596787c94..b6f89af51f40bf 100644 --- a/deps/uv/ChangeLog +++ b/deps/uv/ChangeLog @@ -1,4 +1,25 @@ -2016.10.25, Version 1.10.0 (Stable) +2016.11.17, Version 1.10.1 (Stable), 2e49e332bdede6db7cf17fa784a902e8386d5d86 + +Changes since version 1.10.0: + +* Now working on version 1.10.1 (cjihrig) + +* win: fix anonymous union syntax (Brad King) + +* unix: use uv__is_closing everywhere (Santiago Gimeno) + +* win: add missing break statement (cjihrig) + +* doc: fix wrong man page link for uv_fs_lstat() (Michele Caini) + +* win, tty: handle empty buffer in uv_tty_write_bufs (Hitesh Kanwathirtha) + +* doc: add cjihrig alternative GPG ID (cjihrig) + +* Revert "win,tty: add support for ANSI codes in win10 v1511" (Ben Noordhuis) + + +2016.10.25, Version 1.10.0 (Stable), c8a373c729b4c9392e0e14fc53cd6b67b3051ab9 Changes since version 1.9.1: diff --git a/deps/uv/MAINTAINERS.md b/deps/uv/MAINTAINERS.md index f2f3db5a1c75a9..27a3523ea455b2 100644 --- a/deps/uv/MAINTAINERS.md +++ b/deps/uv/MAINTAINERS.md @@ -8,6 +8,7 @@ libuv is currently managed by the following individuals: * **Bert Belder** ([@piscisaureus](https://github.com/piscisaureus)) * **Colin Ihrig** ([@cjihrig](https://github.com/cjihrig)) - GPG key: 94AE 3667 5C46 4D64 BAFA 68DD 7434 390B DBE9 B9C5 (pubkey-cjihrig) + - GPG key: 5735 3E0D BDAA A7E8 39B6 6A1A FF47 D5E4 AD8B 4FDC (pubkey-cjihrig-kb) * **Fedor Indutny** ([@indutny](https://github.com/indutny)) - GPG key: AF2E EA41 EC34 47BF DD86 FED9 D706 3CCE 19B7 E890 (pubkey-indutny) * **Imran Iqbal** ([@iWuzHere](https://github.com/iWuzHere)) diff --git a/deps/uv/appveyor.yml b/deps/uv/appveyor.yml index 17609ad8c8f71a..6b785611536c39 100644 --- a/deps/uv/appveyor.yml +++ b/deps/uv/appveyor.yml @@ -1,4 +1,4 @@ -version: v1.10.0.build{build} +version: v1.10.1.build{build} install: - cinst -y nsis diff --git a/deps/uv/configure.ac b/deps/uv/configure.ac index 5abd8a19ed4d4c..d3787c0d6dd9f7 100644 --- a/deps/uv/configure.ac +++ b/deps/uv/configure.ac @@ -13,7 +13,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_PREREQ(2.57) -AC_INIT([libuv], [1.10.0], [https://github.com/libuv/libuv/issues]) +AC_INIT([libuv], [1.10.1], [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]) diff --git a/deps/uv/docs/src/fs.rst b/deps/uv/docs/src/fs.rst index 8e4a98f2dbff54..192ecc7056de8e 100644 --- a/deps/uv/docs/src/fs.rst +++ b/deps/uv/docs/src/fs.rst @@ -223,7 +223,7 @@ API .. c:function:: int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) .. c:function:: int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) - Equivalent to :man:`stat(2)`, :man:`fstat(2)` and :man:`fstat(2)` respectively. + Equivalent to :man:`stat(2)`, :man:`fstat(2)` and :man:`lstat(2)` respectively. .. c:function:: int uv_fs_rename(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, uv_fs_cb cb) diff --git a/deps/uv/include/uv-version.h b/deps/uv/include/uv-version.h index a5631e912ed964..63454a5d0aee39 100644 --- a/deps/uv/include/uv-version.h +++ b/deps/uv/include/uv-version.h @@ -32,7 +32,7 @@ #define UV_VERSION_MAJOR 1 #define UV_VERSION_MINOR 10 -#define UV_VERSION_PATCH 0 +#define UV_VERSION_PATCH 1 #define UV_VERSION_IS_RELEASE 1 #define UV_VERSION_SUFFIX "" diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c index a2c07e6a47a930..6283ed3ec28c0a 100644 --- a/deps/uv/src/unix/core.c +++ b/deps/uv/src/unix/core.c @@ -98,7 +98,7 @@ uint64_t uv_hrtime(void) { void uv_close(uv_handle_t* handle, uv_close_cb close_cb) { - assert(!(handle->flags & (UV_CLOSING | UV_CLOSED))); + assert(!uv__is_closing(handle)); handle->flags |= UV_CLOSING; handle->close_cb = close_cb; diff --git a/deps/uv/src/unix/poll.c b/deps/uv/src/unix/poll.c index 4c0d478eee1a1f..370994bd572ceb 100644 --- a/deps/uv/src/unix/poll.c +++ b/deps/uv/src/unix/poll.c @@ -92,7 +92,7 @@ static void uv__poll_stop(uv_poll_t* handle) { int uv_poll_stop(uv_poll_t* handle) { - assert(!(handle->flags & (UV_CLOSING | UV_CLOSED))); + assert(!uv__is_closing(handle)); uv__poll_stop(handle); return 0; } @@ -102,7 +102,7 @@ int uv_poll_start(uv_poll_t* handle, int pevents, uv_poll_cb poll_cb) { int events; assert((pevents & ~(UV_READABLE | UV_WRITABLE | UV_DISCONNECT)) == 0); - assert(!(handle->flags & (UV_CLOSING | UV_CLOSED))); + assert(!uv__is_closing(handle)); uv__poll_stop(handle); diff --git a/deps/uv/src/unix/signal.c b/deps/uv/src/unix/signal.c index ccc1847aae154f..dbd8f86448d78c 100644 --- a/deps/uv/src/unix/signal.c +++ b/deps/uv/src/unix/signal.c @@ -290,7 +290,7 @@ int uv_signal_start(uv_signal_t* handle, uv_signal_cb signal_cb, int signum) { sigset_t saved_sigmask; int err; - assert(!(handle->flags & (UV_CLOSING | UV_CLOSED))); + assert(!uv__is_closing(handle)); /* If the user supplies signum == 0, then return an error already. If the * signum is otherwise invalid then uv__signal_register will find out @@ -434,7 +434,7 @@ static int uv__signal_compare(uv_signal_t* w1, uv_signal_t* w2) { int uv_signal_stop(uv_signal_t* handle) { - assert(!(handle->flags & (UV_CLOSING | UV_CLOSED))); + assert(!uv__is_closing(handle)); uv__signal_stop(handle); return 0; } diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c index d20d0bcb33004e..86f4eb7a5c6b3e 100644 --- a/deps/uv/src/unix/stream.c +++ b/deps/uv/src/unix/stream.c @@ -1221,8 +1221,7 @@ int uv_shutdown(uv_shutdown_t* req, uv_stream_t* stream, uv_shutdown_cb cb) { if (!(stream->flags & UV_STREAM_WRITABLE) || stream->flags & UV_STREAM_SHUT || stream->flags & UV_STREAM_SHUTTING || - stream->flags & UV_CLOSED || - stream->flags & UV_CLOSING) { + uv__is_closing(stream)) { return -ENOTCONN; } diff --git a/deps/uv/src/win/process-stdio.c b/deps/uv/src/win/process-stdio.c index e3c06f57dea5a4..032e30935cc194 100644 --- a/deps/uv/src/win/process-stdio.c +++ b/deps/uv/src/win/process-stdio.c @@ -372,6 +372,7 @@ int uv__stdio_create(uv_loop_t* loop, case FILE_TYPE_PIPE: CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FPIPE; + break; case FILE_TYPE_CHAR: case FILE_TYPE_REMOTE: diff --git a/deps/uv/src/win/tty.c b/deps/uv/src/win/tty.c index 18d68d09433fbe..76dc2fab8aa3c7 100644 --- a/deps/uv/src/win/tty.c +++ b/deps/uv/src/win/tty.c @@ -57,9 +57,6 @@ #define MAX_INPUT_BUFFER_LENGTH 8192 -#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING -#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 -#endif static void uv_tty_capture_initial_style(CONSOLE_SCREEN_BUFFER_INFO* info); static void uv_tty_update_virtual_window(CONSOLE_SCREEN_BUFFER_INFO* info); @@ -128,14 +125,6 @@ static char uv_tty_default_fg_bright = 0; static char uv_tty_default_bg_bright = 0; static char uv_tty_default_inverse = 0; -typedef enum { - UV_SUPPORTED, - UV_UNCHECKED, - UV_UNSUPPORTED -} uv_vtermstate_t; -/* Determine whether or not ANSI support is enabled. */ -static uv_vtermstate_t uv__vterm_state = UV_UNCHECKED; -static void uv__determine_vterm_state(HANDLE handle); void uv_console_init() { if (uv_sem_init(&uv_tty_output_lock, 1)) @@ -179,9 +168,6 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, uv_file fd, int readable) { /* shared between all uv_tty_t handles. */ uv_sem_wait(&uv_tty_output_lock); - if (uv__vterm_state == UV_UNCHECKED) - uv__determine_vterm_state(handle); - /* Store the global tty output handle. This handle is used by TTY read */ /* streams to update the virtual window when a CONSOLE_BUFFER_SIZE_EVENT */ /* is received. */ @@ -1650,33 +1636,6 @@ static int uv_tty_write_bufs(uv_tty_t* handle, uv_buf_t buf = bufs[i]; unsigned int j; - if (uv__vterm_state == UV_SUPPORTED) { - utf16_buf_used = MultiByteToWideChar(CP_UTF8, - 0, - buf.base, - buf.len, - NULL, - 0); - - if (utf16_buf_used == 0) { - *error = GetLastError(); - break; - } - - if (!MultiByteToWideChar(CP_UTF8, - 0, - buf.base, - buf.len, - utf16_buf, - utf16_buf_used)) { - *error = GetLastError(); - break; - } - - FLUSH_TEXT(); - continue; - } - for (j = 0; j < buf.len; j++) { unsigned char c = buf.base[j]; @@ -2234,24 +2193,3 @@ int uv_tty_reset_mode(void) { /* Not necessary to do anything. */ return 0; } - -/* Determine whether or not this version of windows supports - * proper ANSI color codes. Should be supported as of windows - * 10 version 1511, build number 10.0.10586. - */ -static void uv__determine_vterm_state(HANDLE handle) { - DWORD dwMode = 0; - - if (!GetConsoleMode(handle, &dwMode)) { - uv__vterm_state = UV_UNSUPPORTED; - return; - } - - dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; - if (!SetConsoleMode(handle, dwMode)) { - uv__vterm_state = UV_UNSUPPORTED; - return; - } - - uv__vterm_state = UV_SUPPORTED; -} diff --git a/deps/uv/src/win/winapi.h b/deps/uv/src/win/winapi.h index 16d9365cc4b651..341fcd0842f76e 100644 --- a/deps/uv/src/win/winapi.h +++ b/deps/uv/src/win/winapi.h @@ -4145,7 +4145,7 @@ typedef const UNICODE_STRING *PCUNICODE_STRING; struct { UCHAR DataBuffer[1]; } GenericReparseBuffer; - } DUMMYUNIONNAME; + }; } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; #endif @@ -4153,7 +4153,7 @@ typedef struct _IO_STATUS_BLOCK { union { NTSTATUS Status; PVOID Pointer; - } DUMMYUNIONNAME; + }; ULONG_PTR Information; } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;