Commit cf341673 authored by Jérémy Lal's avatar Jérémy Lal

Imported Upstream version 0.10.5~dfsg1

parent f5ad67f2
......@@ -431,3 +431,14 @@ JeongHoon Byun <outsideris@gmail.com>
Iskren Ivov Chernev <iskren.chernev@gmail.com>
Alexey Kupershtokh <alexey.kupershtokh@gmail.com>
Benjamin Ruston <benjy.ruston@gmail.com>
Mitar Milutinovic <mitar.git@tnode.com>
Michael Hart <michael.hart.au@gmail.com>
Andrew Hart <hartandrewr@gmail.com>
Rafael Garcia <rgarcia2009@gmail.com>
Tobias Müllerleile <tobias@muellerleile.net>
Stanislav Ochotnicky <sochotnicky@redhat.com>
Ryan Graham <r.m.graham@gmail.com>
Kelly Gerber <kellygerber22@yahoo.com>
Ryan Doenges <rhdoenges@gmail.com>
Sean Silva <chisophugis@gmail.com>
Miroslav Bajtoš <miro.bajtos@gmail.com>
2013.04.23, Version 0.10.5 (Stable)
* uv: Upgrade to 0.10.5 (isaacs)
* build: added support for Visual Studio 2012 (Miroslav Bajtoš)
* http: Don't try to destroy nonexistent sockets (isaacs)
* crypto: LazyTransform on properties, not methods (isaacs)
* assert: put info in err.message, not err.name (Ryan Doenges)
* dgram: fix no address bind() (Ben Noordhuis)
* handle_wrap: fix NULL pointer dereference (Ben Noordhuis)
* os: fix unlikely buffer overflow in os.type() (Ben Noordhuis)
* stream: Fix unshift() race conditions (isaacs)
2013.04.11, Version 0.10.4 (Stable), 9712aa9f76073c30850b20a188b1ed12ffb74d17
* uv: Upgrade to 0.10.4
* npm: Upgrade to 1.2.18
* v8: Avoid excessive memory growth in JSON.parse (Fedor Indutny)
* child_process, cluster: fix O(n*m) scan of cmd string (Ben Noordhuis)
* net: fix socket.bytesWritten Buffers support (Fedor Indutny)
* buffer: fix offset checks (Łukasz Walukiewicz)
* stream: call write cb before finish event (isaacs)
* http: Support write(data, 'hex') (isaacs)
* crypto: dh secret should be left-padded (Fedor Indutny)
* process: expose NODE_MODULE_VERSION in process.versions (Rod Vagg)
* crypto: fix constructor call in crypto streams (Andreas Madsen)
* net: account for encoding in .byteLength (Fedor Indutny)
* net: fix buffer iteration in bytesWritten (Fedor Indutny)
* crypto: zero is not an error if writing 0 bytes (Fedor Indutny)
* tls: Re-enable check of CN-ID in cert verification (Tobias Müllerleile)
2013.04.03, Version 0.10.3 (Stable), d4982f6f5e4a9a703127489a553b8d782997ea43
* npm: Upgrade to 1.2.17
* child_process: acknowledge sent handles (Fedor Indutny)
* etw: update prototypes to match dtrace provider (Timothy J Fontaine)
* dtrace: pass more arguments to probes (Dave Pacheco)
* build: allow building with dtrace on osx (Dave Pacheco)
* http: Remove legacy ECONNRESET workaround code (isaacs)
* http: Ensure socket cleanup on client response end (isaacs)
* tls: Destroy socket when encrypted side closes (isaacs)
* repl: isSyntaxError() catches "strict mode" errors (Nathan Rajlich)
* crypto: Pass options to ctor calls (isaacs)
* src: tie process.versions.uv to uv_version_string() (Ben Noordhuis)
2013.03.28, Version 0.10.2 (Stable)
* npm: Upgrade to 1.2.15
......
......@@ -468,7 +468,7 @@ def configure_node(o):
# By default, enable DTrace on SunOS systems. Don't allow it on other
# systems, since it won't work. (The MacOS build process is different than
# SunOS, and we haven't implemented it.)
if sys.platform.startswith('sunos'):
if sys.platform.startswith('sunos') or sys.platform.startswith('darwin'):
o['variables']['node_use_dtrace'] = b(not options.without_dtrace)
elif sys.platform.startswith('linux'):
o['variables']['node_use_dtrace'] = 'false'
......
......@@ -12,6 +12,9 @@ vgcore.*
/libuv.so
/libuv.dylib
# Generated by dtrace(1) when doing an in-tree build.
/src/unix/uv-dtrace.h
/out/
/build/gyp
......
......@@ -2,6 +2,7 @@ Alan Gutierrez <alan@prettyrobots.com> <alan@blogometer.com>
Bert Belder <bertbelder@gmail.com> <info@2bs.nl>
Bert Belder <bertbelder@gmail.com> <user@ChrUbuntu.(none)>
Brandon Philips <brandon.philips@rackspace.com> <brandon@ifup.org>
Brian White <mscdex@mscdex.net>
Brian White <mscdex@mscdex.net> <mscdex@gmail.com>
Frank Denis <github@pureftpd.org>
Isaac Z. Schlueter <i@izs.me>
......
......@@ -79,3 +79,6 @@ Tim Bradshaw <tfb@cley.com>
Timothy J. Fontaine <tjfontaine@gmail.com>
Marc Schlaich <marc.schlaich@googlemail.com>
Brian Mazza <louseman@gmail.com>
Nils Maier <maierman@web.de>
Nicholas Vavilov <vvnicholas@gmail.com>
Miroslav Bajtoš <miro.bajtos@gmail.com>
2013.02.04, Version 0.10.3 (Stable)
2013.04.24, Version 0.10.5 (Stable)
Changes since version 0.10.4:
* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)
* windows: make timers handle large timeouts (Miroslav Bajtoš)
* windows: remove superfluous assert statement (Bert Belder)
* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)
* linux: don't use fopen() in uv_resident_set_memory() (Ben Noordhuis)
2013.04.12, Version 0.10.4 (Stable), 85827e26403ac6dfa331af8ec9916ea7e27bd833
Changes since version 0.10.3:
* include: update uv_backend_fd() documentation (Ben Noordhuis)
* unix: include uv.h in src/version.c (Ben Noordhuis)
* unix: don't write more than IOV_MAX iovecs (Fedor Indutny)
* mingw-w64: don't call _set_invalid_parameter_handler (Nils Maier)
* build: gyp disable thin archives (Timothy J. Fontaine)
* sunos: re-export entire library when static (Timothy J. Fontaine)
* unix: dtrace probes for tick-start and tick-stop (Timothy J. Fontaine)
* windows: fix memory leak in fs__sendfile (Shannen Saez)
* windows: remove double initialization in uv_tty_init (Shannen Saez)
* build: fix dtrace-enabled out of tree build (Ben Noordhuis)
* build: squelch -Wdollar-in-identifier-extension warnings (Ben Noordhuis)
* inet: snprintf returns int, not size_t (Brian White)
* win: refactor uv_cpu_info (Bert Belder)
* build: add support for Visual Studio 2012 (Nicholas Vavilov)
* build: -Wno-dollar-in-identifier-extension is clang only (Ben Noordhuis)
2013.02.04, Version 0.10.3 (Stable), 31ebe23973dd98fd8a24c042b606f37a794e99d0
Changes since version 0.10.2:
......@@ -15,7 +65,7 @@ Changes since version 0.10.2:
* unix: don't clear flags after closing UDP handle (Saúl Ibarra Corretgé)
2013.03.25, Version 0.10.2 (Stable)
2013.03.25, Version 0.10.2 (Stable), 0f36a00568f3e7608f97f6c6cdb081f4800a50c9
This is the first officially versioned release of libuv. Starting now
libuv will make releases independently of Node.js.
......
......@@ -132,6 +132,11 @@
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
'cflags': [ '-Wall' ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'target_conditions': [
['_type=="static_library"', {
'standalone_static_library': 1, # disable thin archive which needs binutils >= 2.19
}],
],
'conditions': [
[ 'host_arch != target_arch and target_arch=="ia32"', {
'cflags': [ '-m32' ],
......@@ -192,6 +197,11 @@
}],
],
}],
['OS=="solaris"', {
'cflags': [ '-fno-omit-frame-pointer' ],
# pull in V8's postmortem metadata
'ldflags': [ '-Wl,-z,allextract' ]
}],
],
},
}
......@@ -33,6 +33,10 @@ RUNNER_SRC=test/runner-unix.c
RUNNER_CFLAGS=$(CFLAGS) -I$(SRCDIR)/test
RUNNER_LDFLAGS=-L"$(CURDIR)" -luv -Xlinker -rpath -Xlinker "$(CURDIR)"
HAVE_DTRACE=
DTRACE_OBJS=
DTRACE_HEADER=
OBJS += src/unix/async.o
OBJS += src/unix/core.o
OBJS += src/unix/dl.o
......@@ -58,11 +62,14 @@ OBJS += src/inet.o
OBJS += src/version.o
ifeq (sunos,$(PLATFORM))
HAVE_DTRACE=1
CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
LDFLAGS+=-lkstat -lnsl -lsendfile -lsocket
# Library dependencies are not transitive.
RUNNER_LDFLAGS += $(LDFLAGS)
OBJS += src/unix/sunos.o
OBJS += src/unix/dtrace.o
DTRACE_OBJS += src/unix/core.o
endif
ifeq (aix,$(PLATFORM))
......@@ -72,6 +79,13 @@ OBJS += src/unix/aix.o
endif
ifeq (darwin,$(PLATFORM))
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.
ifeq (__clang__,$(shell sh -c "$(CC) -dM -E - </dev/null | grep -ow __clang__"))
CFLAGS += -Wno-dollar-in-identifier-extension
endif
CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
LDFLAGS += -framework Foundation \
-framework CoreServices \
......@@ -96,6 +110,7 @@ OBJS += src/unix/linux-core.o \
endif
ifeq (freebsd,$(PLATFORM))
HAVE_DTRACE=1
LDFLAGS+=-lkvm
OBJS += src/unix/freebsd.o
OBJS += src/unix/kqueue.o
......@@ -132,6 +147,12 @@ else
RUNNER_LDFLAGS += -pthread
endif
ifeq ($(HAVE_DTRACE), 1)
DTRACE_HEADER = src/unix/uv-dtrace.h
CPPFLAGS += -Isrc/unix
CFLAGS += -DHAVE_DTRACE
endif
libuv.a: $(OBJS)
$(AR) rcs $@ $^
......@@ -151,7 +172,7 @@ src/.buildstamp src/unix/.buildstamp test/.buildstamp:
mkdir -p $(@D)
touch $@
src/unix/%.o src/unix/%.pic.o: src/unix/%.c include/uv.h include/uv-private/uv-unix.h src/unix/internal.h src/unix/.buildstamp
src/unix/%.o src/unix/%.pic.o: src/unix/%.c include/uv.h include/uv-private/uv-unix.h src/unix/internal.h src/unix/.buildstamp $(DTRACE_HEADER)
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
src/%.o src/%.pic.o: src/%.c include/uv.h include/uv-private/uv-unix.h src/.buildstamp
......@@ -161,7 +182,16 @@ test/%.o: test/%.c include/uv.h test/.buildstamp
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
clean-platform:
$(RM) test/run-{tests,benchmarks}.dSYM $(OBJS) $(OBJS:%.o=%.pic.o)
$(RM) test/run-{tests,benchmarks}.dSYM $(OBJS) $(OBJS:%.o=%.pic.o) src/unix/uv-dtrace.h
%.pic.o %.o: %.m
$(OBJC) $(CPPFLAGS) $(CFLAGS) -c $^ -o $@
src/unix/uv-dtrace.h: src/unix/uv-dtrace.d
dtrace -h -xnolibs -s $< -o $@
src/unix/dtrace.o: src/unix/uv-dtrace.d $(DTRACE_OBJS)
dtrace -G -s $^ -o $@
src/unix/dtrace.pic.o: src/unix/uv-dtrace.d $(DTRACE_OBJS:%.o=%.pic.o)
dtrace -G -s $^ -o $@
......@@ -294,8 +294,8 @@ UV_EXTERN uint64_t uv_now(uv_loop_t*);
* Get backend file descriptor. Only kqueue, epoll and event ports are
* supported.
*
* This can be used in conjunction with uv_run_once() to poll in one thread and
* run the event loop's event callbacks in another.
* This can be used in conjunction with `uv_run(loop, UV_RUN_NOWAIT)` to
* poll in one thread and run the event loop's event callbacks in another.
*
* Useful for embedding libuv's event loop in another event loop.
* See test/test-embed.c for an example.
......
......@@ -54,14 +54,14 @@ uv_err_t uv_inet_ntop(int af, const void* src, char* dst, size_t size) {
static uv_err_t inet_ntop4(const unsigned char *src, char *dst, size_t size) {
static const char fmt[] = "%u.%u.%u.%u";
char tmp[sizeof "255.255.255.255"];
size_t l;
int l;
#ifndef _WIN32
l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
#else
l = _snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
#endif
if (l <= 0 || l >= size) {
if (l <= 0 || (size_t) l >= size) {
return uv_enospc_;
}
strncpy(dst, tmp, size);
......
......@@ -62,7 +62,6 @@ uint64_t uv__hrtime(void) {
int uv_exepath(char* buffer, size_t* size) {
ssize_t res;
char pp[64], cwdl[PATH_MAX];
size_t cwdl_len;
struct psinfo ps;
int fd;
......@@ -79,7 +78,6 @@ int uv_exepath(char* buffer, size_t* size) {
return res;
cwdl[res] = '\0';
cwdl_len = res;
(void) snprintf(pp, sizeof(pp), "/proc/%lu/psinfo", (unsigned long) getpid());
fd = open(pp, O_RDONLY);
......
......@@ -71,10 +71,8 @@ STATIC_ASSERT(sizeof(&((uv_buf_t*) 0)->base) ==
sizeof(((struct iovec*) 0)->iov_base));
STATIC_ASSERT(sizeof(&((uv_buf_t*) 0)->len) ==
sizeof(((struct iovec*) 0)->iov_len));
STATIC_ASSERT((uintptr_t) &((uv_buf_t*) 0)->base ==
(uintptr_t) &((struct iovec*) 0)->iov_base);
STATIC_ASSERT((uintptr_t) &((uv_buf_t*) 0)->len ==
(uintptr_t) &((struct iovec*) 0)->iov_len);
STATIC_ASSERT(offsetof(uv_buf_t, base) == offsetof(struct iovec, iov_base));
STATIC_ASSERT(offsetof(uv_buf_t, len) == offsetof(struct iovec, iov_len));
uint64_t uv_hrtime(void) {
......@@ -299,6 +297,8 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) {
r = uv__loop_alive(loop);
while (r != 0 && loop->stop_flag == 0) {
UV_TICK_START(loop, mode);
uv__update_time(loop);
uv__run_timers(loop);
uv__run_idle(loop);
......@@ -314,6 +314,8 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) {
uv__run_closing_handles(loop);
r = uv__loop_alive(loop);
UV_TICK_STOP(loop, mode);
if (mode & (UV_RUN_ONCE | UV_RUN_NOWAIT))
break;
}
......
......@@ -55,11 +55,6 @@ void uv_loadavg(double avg[3]) {
int uv_exepath(char* buffer, size_t* size) {
uint32_t usize;
int result;
char* path;
char* fullpath;
if (!buffer || !size) {
return -1;
}
......
......@@ -46,7 +46,7 @@
#endif
#define STATIC_ASSERT(expr) \
void uv__static_assert(int static_assert_failed[0 - !(expr)])
void uv__static_assert(int static_assert_failed[1 - 2 * !(expr)])
#define ACCESS_ONCE(type, var) \
(*(volatile type*) &(var))
......@@ -256,4 +256,11 @@ static void uv__update_time(uv_loop_t* loop) {
loop->time = uv__hrtime() / 1000000;
}
#ifdef HAVE_DTRACE
#include "uv-dtrace.h"
#else
#define UV_TICK_START(arg0, arg1)
#define UV_TICK_STOP(arg0, arg1)
#endif
#endif /* UV_UNIX_INTERNAL_H_ */
......@@ -284,98 +284,59 @@ uint64_t uv_get_total_memory(void) {
uv_err_t uv_resident_set_memory(size_t* rss) {
FILE* f;
int itmp;
char ctmp;
unsigned int utmp;
size_t page_size = getpagesize();
char *cbuf;
int foundExeEnd;
char buf[PATH_MAX + 1];
f = fopen("/proc/self/stat", "r");
if (!f) return uv__new_sys_error(errno);
/* PID */
if (fscanf(f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* Exec file */
cbuf = buf;
foundExeEnd = 0;
if (fscanf (f, "%c", cbuf++) == 0) goto error;
while (1) {
if (fscanf(f, "%c", cbuf) == 0) goto error;
if (*cbuf == ')') {
foundExeEnd = 1;
} else if (foundExeEnd && *cbuf == ' ') {
*cbuf = 0;
break;
}
char buf[1024];
const char* s;
ssize_t n;
long val;
int fd;
int i;
do
fd = open("/proc/self/stat", O_RDONLY);
while (fd == -1 && errno == EINTR);
if (fd == -1)
return uv__new_sys_error(errno);
do
n = read(fd, buf, sizeof(buf) - 1);
while (n == -1 && errno == EINTR);
SAVE_ERRNO(close(fd));
if (n == -1)
return uv__new_sys_error(errno);
buf[n] = '\0';
s = strchr(buf, ' ');
if (s == NULL)
goto err;
cbuf++;
s += 1;
if (*s != '(')
goto err;
s = strchr(s, ')');
if (s == NULL)
goto err;
for (i = 1; i <= 22; i++) {
s = strchr(s + 1, ' ');
if (s == NULL)
goto err;
}
/* State */
if (fscanf (f, "%c ", &ctmp) == 0) goto error; /* coverity[secure_coding] */
/* Parent process */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* Process group */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* Session id */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* TTY */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* TTY owner process group */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* Flags */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* Minor faults (no memory page) */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* Minor faults, children */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* Major faults (memory page faults) */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* Major faults, children */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* utime */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* stime */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* utime, children */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* stime, children */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* jiffies remaining in current time slice */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* 'nice' value */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* jiffies until next timeout */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* jiffies until next SIGALRM */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* start time (jiffies since system boot) */
if (fscanf (f, "%d ", &itmp) == 0) goto error; /* coverity[secure_coding] */
/* Virtual memory size */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* Resident set size */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
*rss = (size_t) utmp * page_size;
/* rlim */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* Start of text */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* End of text */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
/* Start of stack */
if (fscanf (f, "%u ", &utmp) == 0) goto error; /* coverity[secure_coding] */
fclose (f);
errno = 0;
val = strtol(s, NULL, 10);
if (errno != 0)
goto err;
if (val < 0)
goto err;
*rss = val * getpagesize();
return uv_ok_;
error:
fclose (f);
return uv__new_sys_error(errno);
err:
return uv__new_artificial_error(UV_EINVAL);
}
......
......@@ -33,6 +33,7 @@
#include <sys/uio.h>
#include <sys/un.h>
#include <unistd.h>
#include <limits.h> /* IOV_MAX */
#if defined(__APPLE__)
# include <sys/event.h>
......@@ -742,6 +743,10 @@ start:
iov = (struct iovec*) &(req->bufs[req->write_index]);
iovcnt = req->bufcnt - req->write_index;
/* Limit iov count to avoid EINVALs from writev() */
if (iovcnt > IOV_MAX)
iovcnt = IOV_MAX;
/*
* Now do the actual writev. Note that we've been updating the pointers
* inside the iov each time we write. So there is no need to offset it.
......
/* 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.
*/
provider uv {
probe tick__start(void* loop, int mode);
probe tick__stop(void* loop, int mode);
};
......@@ -19,6 +19,7 @@
* IN THE SOFTWARE.
*/
#include "uv.h"
/*
* Versions with an even minor version (e.g. 0.6.1 or 1.0.4) are API and ABI
......@@ -26,9 +27,12 @@
* releases.
*/
#undef UV_VERSION_MAJOR /* TODO(bnoordhuis) Remove in v0.11. */
#undef UV_VERSION_MINOR /* TODO(bnoordhuis) Remove in v0.11. */
#define UV_VERSION_MAJOR 0
#define UV_VERSION_MINOR 10
#define UV_VERSION_PATCH 3
#define UV_VERSION_PATCH 5
#define UV_VERSION_IS_RELEASE 1
......
......@@ -55,7 +55,7 @@ static void uv_init(void) {
/* Tell the CRT to not exit the application when an invalid parameter is */
/* passed. The main issue is that invalid FDs will trigger this behavior. */
#ifdef _WRITE_ABORT_MSG
#if !defined(__MINGW32__) || __MSVCRT_VERSION__ >= 0x800
_set_invalid_parameter_handler(uv__crt_invalid_parameter_handler);
#endif
......@@ -185,7 +185,6 @@ int uv_backend_timeout(const uv_loop_t* loop) {
static void uv_poll(uv_loop_t* loop, int block) {
BOOL success;
DWORD bytes, timeout;
ULONG_PTR key;
OVERLAPPED* overlapped;
......@@ -197,18 +196,16 @@ static void uv_poll(uv_loop_t* loop, int block) {
timeout = 0;
}
success = GetQueuedCompletionStatus(loop->iocp,
&bytes,
&key,
&overlapped,
timeout);
GetQueuedCompletionStatus(loop->iocp,
&bytes,
&key,
&overlapped,
timeout);
if (overlapped) {
/* Package was dequeued */
req = uv_overlapped_to_req(overlapped);
uv_insert_pending_req(loop, req);
} else if (GetLastError() != WAIT_TIMEOUT) {
/* Serious error */
uv_fatal_error(GetLastError(), "GetQueuedCompletionStatus");
......@@ -230,14 +227,13 @@ static void uv_poll_ex(uv_loop_t* loop, int block) {
timeout = 0;
}
assert(pGetQueuedCompletionStatusEx);
success = pGetQueuedCompletionStatusEx(loop->iocp,
overlappeds,
ARRAY_SIZE(overlappeds),
&count,
timeout,
FALSE);
if (success) {
for (i = 0; i < count; i++) {
/* Package was dequeued */
......
......@@ -1048,6 +1048,8 @@ static void fs__sendfile(uv_fs_t* req) {
}
}