Skip to content

Commit

Permalink
deps: upgrade libuv to 1.10.1
Browse files Browse the repository at this point in the history
Fixes: nodejs/node#9542
Fixes: nodejs/node#9546
PR-URL: nodejs/node#9647
Reviewed-By: Imran Iqbal <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
  • Loading branch information
cjihrig authored and andrew749 committed Jul 19, 2017
1 parent 81dc03d commit d862c0c
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 76 deletions.
1 change: 1 addition & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,4 @@ Alex Hultman <[email protected]>
Brad King <[email protected]>
Philippe Laferriere <[email protected]>
Will Speak <[email protected]>
Hitesh Kanwathirtha <[email protected]>
23 changes: 22 additions & 1 deletion deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
1 change: 1 addition & 0 deletions deps/uv/MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v1.10.0.build{build}
version: v1.10.1.build{build}

install:
- cinst -y nsis
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.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])
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/docs/src/fs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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 10
#define UV_VERSION_PATCH 0
#define UV_VERSION_PATCH 1
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""

Expand Down
2 changes: 1 addition & 1 deletion deps/uv/src/unix/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,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;
Expand Down
4 changes: 2 additions & 2 deletions deps/uv/src/unix/poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions deps/uv/src/unix/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,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
Expand Down Expand Up @@ -440,7 +440,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;
}
Expand Down
3 changes: 1 addition & 2 deletions deps/uv/src/unix/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions deps/uv/src/win/process-stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
62 changes: 0 additions & 62 deletions deps/uv/src/win/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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];

Expand Down Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions deps/uv/src/win/winapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -4145,15 +4145,15 @@ typedef const UNICODE_STRING *PCUNICODE_STRING;
struct {
UCHAR DataBuffer[1];
} GenericReparseBuffer;
} DUMMYUNIONNAME;
};
} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
#endif

typedef struct _IO_STATUS_BLOCK {
union {
NTSTATUS Status;
PVOID Pointer;
} DUMMYUNIONNAME;
};
ULONG_PTR Information;
} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;

Expand Down

0 comments on commit d862c0c

Please sign in to comment.