From d227084339315e42623434027a68d96cdf1fff23 Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 22 Mar 2012 16:44:04 -0700 Subject: [PATCH] Upgrade libuv to 8409a67 --- deps/uv/include/uv.h | 3 ++- deps/uv/src/unix/error.c | 1 + deps/uv/src/unix/stream.c | 3 +++ deps/uv/src/win/error.c | 5 +++++ deps/uv/src/win/winapi.h | 13 ++++++++++--- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h index fa9812cd598..49ce47a9527 100644 --- a/deps/uv/include/uv.h +++ b/deps/uv/include/uv.h @@ -120,7 +120,8 @@ typedef intptr_t ssize_t; XX( 50, EPERM, "operation not permitted") \ XX( 51, ELOOP, "too many symbolic links encountered") \ XX( 52, EXDEV, "cross-device link not permitted") \ - XX( 53, ENOTEMPTY, "directory not empty") + XX( 53, ENOTEMPTY, "directory not empty") \ + XX( 54, ENOSPC, "no space left on device") #define UV_ERRNO_GEN(val, name, s) UV_##name = val, diff --git a/deps/uv/src/unix/error.c b/deps/uv/src/unix/error.c index 071b03affc5..d99d4112729 100644 --- a/deps/uv/src/unix/error.c +++ b/deps/uv/src/unix/error.c @@ -90,6 +90,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case EXDEV: return UV_EXDEV; case EBUSY: return UV_EBUSY; case ENOTEMPTY: return UV_ENOTEMPTY; + case ENOSPC: return UV_ENOSPC; default: return UV_UNKNOWN; } diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c index 111bbc2dec7..eee4199fadb 100644 --- a/deps/uv/src/unix/stream.c +++ b/deps/uv/src/unix/stream.c @@ -182,6 +182,9 @@ void uv__server_io(EV_P_ ev_io* watcher, int revents) { } else if (errno == EMFILE) { /* TODO special trick. unlock reserved socket, accept, close. */ return; + } else if (errno == ECONNABORTED) { + /* ignore */ + continue; } else { uv__set_sys_error(stream->loop, errno); stream->connection_cb((uv_stream_t*)stream, -1); diff --git a/deps/uv/src/win/error.c b/deps/uv/src/win/error.c index 5d695696ff6..dccd2e7189d 100644 --- a/deps/uv/src/win/error.c +++ b/deps/uv/src/win/error.c @@ -104,6 +104,11 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case WSAENETUNREACH: return UV_ENETUNREACH; case WSAENOBUFS: return UV_ENOBUFS; case ERROR_OUTOFMEMORY: return UV_ENOMEM; + case ERROR_CANNOT_MAKE: return UV_ENOSPC; + case ERROR_DISK_FULL: return UV_ENOSPC; + case ERROR_EA_TABLE_FULL: return UV_ENOSPC; + case ERROR_END_OF_MEDIA: return UV_ENOSPC; + case ERROR_HANDLE_DISK_FULL: return UV_ENOSPC; case ERROR_NOT_CONNECTED: return UV_ENOTCONN; case WSAENOTCONN: return UV_ENOTCONN; case ERROR_DIR_NOT_EMPTY: return UV_ENOTEMPTY; diff --git a/deps/uv/src/win/winapi.h b/deps/uv/src/win/winapi.h index b65ef0d0305..a98806aeb50 100644 --- a/deps/uv/src/win/winapi.h +++ b/deps/uv/src/win/winapi.h @@ -4323,10 +4323,17 @@ typedef NTSTATUS (NTAPI *sNtSetInformationFile) /* * Kernel32 headers */ -#define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1 -#define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2 +#ifndef FILE_SKIP_COMPLETION_PORT_ON_SUCCESS +# define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1 +#endif -#define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1 +#ifndef FILE_SKIP_SET_EVENT_ON_HANDLE +# define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2 +#endif + +#ifndef SYMBOLIC_LINK_FLAG_DIRECTORY +# define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1 +#endif #ifdef __MINGW32__ typedef struct _OVERLAPPED_ENTRY {