From dd6faa5adf8a1ab3443f1646fcdbbc043f5f5826 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 21 Oct 2011 18:44:06 -0700 Subject: [PATCH] uv: upgrade to 179f475 --- deps/uv/src/win/fs.c | 4 ++-- deps/uv/src/win/tcp.c | 2 +- deps/uv/src/win/tty.c | 1 + deps/uv/src/win/winapi.h | 4 ++++ deps/uv/src/win/winsock.h | 2 ++ 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c index f6a036adbe43b4..a2c572d64f0d4d 100644 --- a/deps/uv/src/win/fs.c +++ b/deps/uv/src/win/fs.c @@ -424,7 +424,7 @@ void fs__readdir(uv_fs_t* req, const wchar_t* path, int flags) { len = wcslen(name); if (!buf) { - buf = (wchar_t*)malloc(buf_size); + buf = (wchar_t*)malloc(buf_size * sizeof(wchar_t)); if (!buf) { uv_fatal_error(ERROR_OUTOFMEMORY, "malloc"); } @@ -435,7 +435,7 @@ void fs__readdir(uv_fs_t* req, const wchar_t* path, int flags) { while ((ptr - buf) + len + 1 > buf_size) { buf_size *= 2; path2 = buf; - buf = (wchar_t*)realloc(buf, buf_size); + buf = (wchar_t*)realloc(buf, buf_size * sizeof(wchar_t)); if (!buf) { uv_fatal_error(ERROR_OUTOFMEMORY, "realloc"); } diff --git a/deps/uv/src/win/tcp.c b/deps/uv/src/win/tcp.c index 1133cc3f1daab3..0ff6890bcf79e7 100644 --- a/deps/uv/src/win/tcp.c +++ b/deps/uv/src/win/tcp.c @@ -964,7 +964,7 @@ int uv_tcp_nodelay(uv_tcp_t* handle, int enable) { } -int uv_tcp_keepalive(uv_tcp_t* handle, int enable, int delay) { +int uv_tcp_keepalive(uv_tcp_t* handle, int enable, unsigned int delay) { uv__set_artificial_error(handle->loop, UV_ENOSYS); return -1; } diff --git a/deps/uv/src/win/tty.c b/deps/uv/src/win/tty.c index 46aae272f7e5ef..a72851276a6184 100644 --- a/deps/uv/src/win/tty.c +++ b/deps/uv/src/win/tty.c @@ -1334,6 +1334,7 @@ static int uv_tty_write_bufs(uv_tty_t* handle, uv_buf_t bufs[], int bufcnt, case 'c': /* Full console reset. */ + FLUSH_TEXT(); uv_tty_reset(handle, error); ansi_parser_state = ANSI_NORMAL; continue; diff --git a/deps/uv/src/win/winapi.h b/deps/uv/src/win/winapi.h index 9ed808ea6b6be0..e0038f14aca517 100644 --- a/deps/uv/src/win/winapi.h +++ b/deps/uv/src/win/winapi.h @@ -4211,6 +4211,10 @@ typedef enum _FILE_INFORMATION_CLASS { # define FILE_DEVICE_FILE_SYSTEM 0x00000009 #endif +#ifndef FILE_DEVICE_NETWORK +# define FILE_DEVICE_NETWORK 0x00000012 +#endif + #ifndef METHOD_BUFFERED # define METHOD_BUFFERED 0 #endif diff --git a/deps/uv/src/win/winsock.h b/deps/uv/src/win/winsock.h index 18978cf345f565..beee032137cfa0 100644 --- a/deps/uv/src/win/winsock.h +++ b/deps/uv/src/win/winsock.h @@ -27,6 +27,8 @@ #include #include +#include "winapi.h" + /* * MinGW is missing these too