uv: upgrade to 0.10.11

This commit is contained in:
Ben Noordhuis 2013-06-12 22:10:39 +02:00
parent 49d9ad9d81
commit 48476273eb
4 changed files with 38 additions and 30 deletions

19
deps/uv/ChangeLog vendored
View File

@ -1,4 +1,21 @@
2013.06.05, Version 0.10.10 (Stable)
2013.06.13, Version 0.10.11 (Stable)
Changes since version 0.10.10:
* unix: unconditionally stop handle on close (Ben Noordhuis)
* freebsd: don't enable dtrace if it's not available (Brian White)
* build: make HAVE_DTRACE=0 should disable dtrace (Timothy J. Fontaine)
* unix: remove overzealous assert (Ben Noordhuis)
* unix: clear UV_STREAM_SHUTTING after shutdown() (Ben Noordhuis)
* unix: fix busy loop, write if POLLERR or POLLHUP (Ben Noordhuis)
2013.06.05, Version 0.10.10 (Stable), 0d95a88bd35fce93863c57a460be613aea34d2c5
Changes since version 0.10.9:

View File

@ -31,7 +31,6 @@ RUNNER_SRC=test/runner-unix.c
RUNNER_CFLAGS=$(CFLAGS) -I$(SRCDIR)/test
RUNNER_LDFLAGS=-L"$(CURDIR)" -luv
HAVE_DTRACE=
DTRACE_OBJS=
DTRACE_HEADER=
@ -60,14 +59,16 @@ OBJS += src/inet.o
OBJS += src/version.o
ifeq (sunos,$(PLATFORM))
HAVE_DTRACE=1
HAVE_DTRACE ?= 1
CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
LDFLAGS+=-lkstat -lnsl -lsendfile -lsocket
# Library dependencies are not transitive.
OBJS += src/unix/sunos.o
ifeq (1, $(HAVE_DTRACE))
OBJS += src/unix/dtrace.o
DTRACE_OBJS += src/unix/core.o
endif
endif
ifeq (aix,$(PLATFORM))
CPPFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500
@ -76,7 +77,7 @@ OBJS += src/unix/aix.o
endif
ifeq (darwin,$(PLATFORM))
HAVE_DTRACE=1
HAVE_DTRACE ?= 1
# dtrace(1) probes contain dollar signs on OS X. Mute the warnings they
# generate but only when CC=clang, -Wno-dollar-in-identifier-extension
# is a clang extension.
@ -106,7 +107,9 @@ OBJS += src/unix/linux-core.o \
endif
ifeq (freebsd,$(PLATFORM))
HAVE_DTRACE=1
ifeq ($(shell dtrace -l 1>&2 2>/dev/null; echo $$?),0)
HAVE_DTRACE ?= 1
endif
LDFLAGS+=-lkvm
OBJS += src/unix/freebsd.o
OBJS += src/unix/kqueue.o

View File

@ -630,6 +630,7 @@ int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) {
static void uv__drain(uv_stream_t* stream) {
uv_shutdown_t* req;
int status;
assert(ngx_queue_empty(&stream->write_queue));
uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT);
@ -642,21 +643,17 @@ static void uv__drain(uv_stream_t* stream) {
req = stream->shutdown_req;
stream->shutdown_req = NULL;
stream->flags &= ~UV_STREAM_SHUTTING;
uv__req_unregister(stream->loop, req);
if (shutdown(uv__stream_fd(stream), SHUT_WR)) {
/* Error. Report it. User should call uv_close(). */
status = shutdown(uv__stream_fd(stream), SHUT_WR);
if (status)
uv__set_sys_error(stream->loop, errno);
if (req->cb) {
req->cb(req, -1);
}
} else {
uv__set_sys_error(stream->loop, 0);
((uv_handle_t*) stream)->flags |= UV_STREAM_SHUT;
if (req->cb) {
req->cb(req, 0);
}
}
else
stream->flags |= UV_STREAM_SHUT;
if (req->cb != NULL)
req->cb(req, status);
}
}
@ -1121,7 +1118,7 @@ static void uv__stream_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
return; /* read_cb closed stream. */
}
if (events & UV__POLLOUT) {
if (events & (UV__POLLOUT | UV__POLLERR | UV__POLLHUP)) {
assert(uv__stream_fd(stream) >= 0);
uv__write(stream);
uv__write_callbacks(stream);
@ -1318,16 +1315,6 @@ int uv_read2_start(uv_stream_t* stream, uv_alloc_cb alloc_cb,
int uv_read_stop(uv_stream_t* stream) {
/* Sanity check. We're going to stop the handle unless it's primed for
* writing but that means there should be some kind of write action in
* progress.
*/
assert(!uv__io_active(&stream->io_watcher, UV__POLLOUT) ||
!ngx_queue_empty(&stream->write_completed_queue) ||
!ngx_queue_empty(&stream->write_queue) ||
stream->shutdown_req != NULL ||
stream->connect_req != NULL);
stream->flags &= ~UV_STREAM_READING;
uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN);
if (!uv__io_active(&stream->io_watcher, UV__POLLOUT))
@ -1395,8 +1382,9 @@ void uv__stream_close(uv_stream_t* handle) {
}
#endif /* defined(__APPLE__) */
uv_read_stop(handle);
uv__io_close(handle->loop, &handle->io_watcher);
uv_read_stop(handle);
uv__handle_stop(handle);
close(handle->io_watcher.fd);
handle->io_watcher.fd = -1;

View File

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