Browse Source

uv: Upgrade to v0.10.28

v0.10.30-release
Timothy J Fontaine 11 years ago
parent
commit
7169879879
  1. 16
      deps/uv/ChangeLog
  2. 1
      deps/uv/build.mk
  3. 10
      deps/uv/src/unix/darwin.c
  4. 7
      deps/uv/src/unix/getaddrinfo.c
  5. 2
      deps/uv/src/version.c
  6. 3
      deps/uv/src/win/poll.c
  7. 2
      deps/uv/test/test-list.h
  8. 89
      deps/uv/test/test-poll-closesocket.c
  9. 4
      deps/uv/test/test-spawn.c
  10. 1
      deps/uv/uv.gyp

16
deps/uv/ChangeLog

@ -1,4 +1,18 @@
2014.05.02, Version 0.10.27 (Stable) 2014.07.32, Version 0.10.28 (Stable)
Changes since version 0.10.27:
* windows: fix handling closed socket while poll handle is closing (Saúl Ibarra
Corretgé)
* unix: return system error on EAI_SYSTEM (Saúl Ibarra Corretgé)
* unix: fix bogus structure field name (Saúl Ibarra Corretgé)
* darwin: invoke `mach_timebase_info` only once (Fedor Indutny)
2014.05.02, Version 0.10.27 (Stable), 6e24ce23b1e7576059f85a608eca13b766458a01
Changes since version 0.10.26: Changes since version 0.10.26:

1
deps/uv/build.mk

@ -102,6 +102,7 @@ TESTS= \
test/test-platform-output.o \ test/test-platform-output.o \
test/test-poll.o \ test/test-poll.o \
test/test-poll-close.o \ test/test-poll-close.o \
test/test-poll-closesocket.o \
test/test-process-title.o \ test/test-process-title.o \
test/test-ref.o \ test/test-ref.o \
test/test-run-nowait.o \ test/test-run-nowait.o \

10
deps/uv/src/unix/darwin.c

@ -179,12 +179,14 @@ void uv__cf_loop_signal(uv_loop_t* loop, cf_loop_signal_cb cb, void* arg) {
uint64_t uv__hrtime(void) { uint64_t uv__hrtime(void) {
mach_timebase_info_data_t info; static mach_timebase_info_data_t info;
if (mach_timebase_info(&info) != KERN_SUCCESS) if ((ACCESS_ONCE(uint32_t, info.numer) == 0 ||
abort(); ACCESS_ONCE(uint32_t, info.denom) == 0) &&
mach_timebase_info(&info) != KERN_SUCCESS)
abort();
return mach_absolute_time() * info.numer / info.denom; return mach_absolute_time() * info.numer / info.denom;
} }

7
deps/uv/src/unix/getaddrinfo.c

@ -34,6 +34,8 @@ static void uv__getaddrinfo_work(struct uv__work* w) {
req->service, req->service,
req->hints, req->hints,
&req->res); &req->res);
if (req->retcode == EAI_SYSTEM)
req->retcode = -errno;
} }
@ -67,7 +69,10 @@ static void uv__getaddrinfo_done(struct uv__work* w, int status) {
req->service = NULL; req->service = NULL;
req->hostname = NULL; req->hostname = NULL;
if (req->retcode == 0) { if (req->retcode < 0) {
/* EAI_SYSTEM error */
uv__set_sys_error(req->loop, -req->retcode);
} else if (req->retcode == 0) {
/* OK */ /* OK */
#if defined(EAI_NODATA) /* FreeBSD deprecated EAI_NODATA */ #if defined(EAI_NODATA) /* FreeBSD deprecated EAI_NODATA */
} else if (req->retcode == EAI_NONAME || req->retcode == EAI_NODATA) { } else if (req->retcode == EAI_NONAME || req->retcode == EAI_NODATA) {

2
deps/uv/src/version.c

@ -34,7 +34,7 @@
#define UV_VERSION_MAJOR 0 #define UV_VERSION_MAJOR 0
#define UV_VERSION_MINOR 10 #define UV_VERSION_MINOR 10
#define UV_VERSION_PATCH 27 #define UV_VERSION_PATCH 28
#define UV_VERSION_IS_RELEASE 1 #define UV_VERSION_IS_RELEASE 1

3
deps/uv/src/win/poll.c

@ -187,7 +187,8 @@ static void uv__fast_poll_process_poll_req(uv_loop_t* loop, uv_poll_t* handle,
if (afd_poll_info->Handles[0].Events & AFD_POLL_LOCAL_CLOSE) { if (afd_poll_info->Handles[0].Events & AFD_POLL_LOCAL_CLOSE) {
/* Stop polling. */ /* Stop polling. */
handle->events = 0; handle->events = 0;
uv__handle_stop(handle); if (uv__is_active(handle))
uv__handle_stop(handle);
} }
if (events != 0) { if (events != 0) {

2
deps/uv/test/test-list.h

@ -215,6 +215,7 @@ TEST_DECLARE (poll_duplex)
TEST_DECLARE (poll_unidirectional) TEST_DECLARE (poll_unidirectional)
TEST_DECLARE (poll_close) TEST_DECLARE (poll_close)
#ifdef _WIN32 #ifdef _WIN32
TEST_DECLARE (poll_closesocket)
TEST_DECLARE (spawn_detect_pipe_name_collisions_on_windows) TEST_DECLARE (spawn_detect_pipe_name_collisions_on_windows)
TEST_DECLARE (argument_escaping) TEST_DECLARE (argument_escaping)
TEST_DECLARE (environment_creation) TEST_DECLARE (environment_creation)
@ -449,6 +450,7 @@ TASK_LIST_START
TEST_ENTRY (kill) TEST_ENTRY (kill)
#ifdef _WIN32 #ifdef _WIN32
TEST_ENTRY (poll_closesocket)
TEST_ENTRY (spawn_detect_pipe_name_collisions_on_windows) TEST_ENTRY (spawn_detect_pipe_name_collisions_on_windows)
TEST_ENTRY (argument_escaping) TEST_ENTRY (argument_escaping)
TEST_ENTRY (environment_creation) TEST_ENTRY (environment_creation)

89
deps/uv/test/test-poll-closesocket.c

@ -0,0 +1,89 @@
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifdef _WIN32
#include <errno.h>
#include "uv.h"
#include "task.h"
uv_os_sock_t sock;
uv_poll_t handle;
static int close_cb_called = 0;
static void close_cb(uv_handle_t* h) {
close_cb_called++;
}
static void poll_cb(uv_poll_t* h, int status, int events) {
int r;
ASSERT(status == 0);
ASSERT(h == &handle);
r = uv_poll_start(&handle, UV_READABLE, poll_cb);
ASSERT(r == 0);
closesocket(sock);
uv_close((uv_handle_t*) &handle, close_cb);
}
TEST_IMPL(poll_closesocket) {
struct WSAData wsa_data;
int r;
unsigned long on;
struct sockaddr_in addr;
r = WSAStartup(MAKEWORD(2, 2), &wsa_data);
ASSERT(r == 0);
sock = socket(AF_INET, SOCK_STREAM, 0);
ASSERT(sock != INVALID_SOCKET);
on = 1;
r = ioctlsocket(sock, FIONBIO, &on);
ASSERT(r == 0);
r = uv_ip4_addr("127.0.0.1", TEST_PORT, &addr);
ASSERT(r == 0);
r = connect(sock, (const struct sockaddr*) &addr, sizeof addr);
ASSERT(r != 0);
ASSERT(WSAGetLastError() == WSAEWOULDBLOCK);
r = uv_poll_init_socket(uv_default_loop(), &handle, sock);
ASSERT(r == 0);
r = uv_poll_start(&handle, UV_WRITABLE, poll_cb);
ASSERT(r == 0);
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
MAKE_VALGRIND_HAPPY();
return 0;
}
#endif

4
deps/uv/test/test-spawn.c

@ -681,9 +681,9 @@ TEST_IMPL(spawn_closed_process_io) {
uv_write_t write_req; uv_write_t write_req;
uv_buf_t buf; uv_buf_t buf;
uv_stdio_container_t stdio[2]; uv_stdio_container_t stdio[2];
static char buffer[] = "hello-from-spawn_stdin"; static char buffer[] = "hello-from-spawn_stdin\n";
init_process_options("spawn_helper1", exit_cb); init_process_options("spawn_helper3", exit_cb);
uv_pipe_init(uv_default_loop(), &in, 0); uv_pipe_init(uv_default_loop(), &in, 0);
options.stdio = stdio; options.stdio = stdio;

1
deps/uv/uv.gyp

@ -322,6 +322,7 @@
'test/test-platform-output.c', 'test/test-platform-output.c',
'test/test-poll.c', 'test/test-poll.c',
'test/test-poll-close.c', 'test/test-poll-close.c',
'test/test-poll-closesocket.c',
'test/test-process-title.c', 'test/test-process-title.c',
'test/test-ref.c', 'test/test-ref.c',
'test/test-run-nowait.c', 'test/test-run-nowait.c',

Loading…
Cancel
Save