mirror of https://github.com/nodejs/node.git
deps: update libuv to 1.2.1
PR: https://github.com/iojs/io.js/pull/423 Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Bert Belder <bertbelder@gmail.com>
This commit is contained in:
parent
e177377a4b
commit
07bd05ba33
|
@ -177,3 +177,4 @@ Logan Rosen <loganrosen@gmail.com>
|
||||||
Kenneth Perry <thothonegan@gmail.com>
|
Kenneth Perry <thothonegan@gmail.com>
|
||||||
John Marino <marino@FreeBSD.org>
|
John Marino <marino@FreeBSD.org>
|
||||||
Alexey Melnichuk <mimir@newmail.ru>
|
Alexey Melnichuk <mimir@newmail.ru>
|
||||||
|
Johan Bergström <bugs@bergstroem.nu>
|
||||||
|
|
|
@ -1,4 +1,32 @@
|
||||||
2015.01.06, Version 1.2.0 (Stable)
|
2015.01.15, Version 1.2.1 (Stable), 4ca78e989062a1099dc4b9ad182a98e8374134b1
|
||||||
|
|
||||||
|
Changes since version 1.2.0:
|
||||||
|
|
||||||
|
* unix: remove unused dtrace file (Saúl Ibarra Corretgé)
|
||||||
|
|
||||||
|
* test: skip TTY select test if /dev/tty can't be opened (Saúl Ibarra Corretgé)
|
||||||
|
|
||||||
|
* doc: clarify the behavior of uv_tty_init (Saúl Ibarra Corretgé)
|
||||||
|
|
||||||
|
* doc: clarify how uv_async_send behaves (Saúl Ibarra Corretgé)
|
||||||
|
|
||||||
|
* build: make dist now generates a full tarball (Johan Bergström)
|
||||||
|
|
||||||
|
* freebsd: make uv_exepath more resilient (Saúl Ibarra Corretgé)
|
||||||
|
|
||||||
|
* unix: make setting the tty mode to the same value a no-op (Saúl Ibarra
|
||||||
|
Corretgé)
|
||||||
|
|
||||||
|
* win,tcp: support uv_try_write (Bert Belder)
|
||||||
|
|
||||||
|
* test: enable test-tcp-try-write on windows (Bert Belder)
|
||||||
|
|
||||||
|
* win,tty: support uv_try_write (Bert Belder)
|
||||||
|
|
||||||
|
* unix: set non-block mode in uv_{pipe,tcp,udp}_open (Ben Noordhuis)
|
||||||
|
|
||||||
|
|
||||||
|
2015.01.06, Version 1.2.0 (Stable), 09f25b13cd149c7981108fc1a75611daf1277f83
|
||||||
|
|
||||||
Changes since version 1.1.0:
|
Changes since version 1.1.0:
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,24 @@ libuv_la_SOURCES += src/unix/async.c \
|
||||||
endif # WINNT
|
endif # WINNT
|
||||||
|
|
||||||
EXTRA_DIST = test/fixtures/empty_file \
|
EXTRA_DIST = test/fixtures/empty_file \
|
||||||
test/fixtures/load_error.node
|
test/fixtures/load_error.node \
|
||||||
|
include \
|
||||||
|
test \
|
||||||
|
docs \
|
||||||
|
img \
|
||||||
|
samples \
|
||||||
|
android-configure \
|
||||||
|
CONTRIBUTING.md \
|
||||||
|
LICENSE \
|
||||||
|
README.md \
|
||||||
|
checksparse.sh \
|
||||||
|
vcbuild.bat \
|
||||||
|
Makefile.mingw \
|
||||||
|
common.gypi \
|
||||||
|
gyp_uv.py \
|
||||||
|
uv.gyp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TESTS = test/run-tests
|
TESTS = test/run-tests
|
||||||
check_PROGRAMS = test/run-tests
|
check_PROGRAMS = test/run-tests
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
AC_PREREQ(2.57)
|
AC_PREREQ(2.57)
|
||||||
AC_INIT([libuv], [1.2.0], [https://github.com/libuv/libuv/issues])
|
AC_INIT([libuv], [1.2.1], [https://github.com/libuv/libuv/issues])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
m4_include([m4/libuv-extra-automake-flags.m4])
|
m4_include([m4/libuv-extra-automake-flags.m4])
|
||||||
m4_include([m4/as_case.m4])
|
m4_include([m4/as_case.m4])
|
||||||
|
|
|
@ -48,9 +48,10 @@ API
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
libuv will coalesce calls to :c:func:`uv_async_send`, that is, not every call to it will
|
libuv will coalesce calls to :c:func:`uv_async_send`, that is, not every call to it will
|
||||||
yield an execution of the callback, the only guarantee is that it will be called at least
|
yield an execution of the callback. For example: if :c:func:`uv_async_send` is called 5
|
||||||
once. Thus, calling this function may not wakeup the event loop if it was already called
|
times in a row before the callback is called, the callback will only be called once. If
|
||||||
previously within a short period of time.
|
:c:func:`uv_async_send` is called again after the callback was called, it will be called
|
||||||
|
again.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
The :c:type:`uv_handle_t` API functions also apply.
|
The :c:type:`uv_handle_t` API functions also apply.
|
||||||
|
|
|
@ -38,8 +38,7 @@ API
|
||||||
|
|
||||||
Open an existing file descriptor or HANDLE as a pipe.
|
Open an existing file descriptor or HANDLE as a pipe.
|
||||||
|
|
||||||
.. note::
|
.. versionchanged:: 1.2.1 the file descriptor is set to non-blocking mode.
|
||||||
The user is responsible for setting the file descriptor in non-blocking mode.
|
|
||||||
|
|
||||||
.. c:function:: int uv_pipe_bind(uv_pipe_t* handle, const char* name)
|
.. c:function:: int uv_pipe_bind(uv_pipe_t* handle, const char* name)
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,7 @@ API
|
||||||
|
|
||||||
Open an existing file descriptor or SOCKET as a TCP handle.
|
Open an existing file descriptor or SOCKET as a TCP handle.
|
||||||
|
|
||||||
.. note::
|
.. versionchanged:: 1.2.1 the file descriptor is set to non-blocking mode.
|
||||||
The user is responsible for setting the file descriptor in
|
|
||||||
non-blocking mode.
|
|
||||||
|
|
||||||
.. c:function:: int uv_tcp_nodelay(uv_tcp_t* handle, int enable)
|
.. c:function:: int uv_tcp_nodelay(uv_tcp_t* handle, int enable)
|
||||||
|
|
||||||
|
|
|
@ -58,8 +58,13 @@ API
|
||||||
`readable`, specifies if you plan on calling :c:func:`uv_read_start` with
|
`readable`, specifies if you plan on calling :c:func:`uv_read_start` with
|
||||||
this stream. stdin is readable, stdout is not.
|
this stream. stdin is readable, stdout is not.
|
||||||
|
|
||||||
|
On Unix this function will try to open ``/dev/tty`` and use it if the passed file
|
||||||
|
descriptor refers to a TTY. This lets libuv put the tty in non-blocking mode
|
||||||
|
without affecting other processes that share the tty.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
TTY streams which are not readable have blocking writes.
|
If opening ``/dev/tty`` fails, libuv falls back to blocking writes for non-readable
|
||||||
|
TTY streams.
|
||||||
|
|
||||||
.. c:function:: int uv_tty_set_mode(uv_tty_t*, uv_tty_mode_t mode)
|
.. c:function:: int uv_tty_set_mode(uv_tty_t*, uv_tty_mode_t mode)
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,8 @@ API
|
||||||
In other words, other datagram-type sockets like raw sockets or netlink
|
In other words, other datagram-type sockets like raw sockets or netlink
|
||||||
sockets can also be passed to this function.
|
sockets can also be passed to this function.
|
||||||
|
|
||||||
|
.. versionchanged:: 1.2.1 the file descriptor is set to non-blocking mode.
|
||||||
|
|
||||||
.. c:function:: int uv_udp_bind(uv_udp_t* handle, const struct sockaddr* addr, unsigned int flags)
|
.. c:function:: int uv_udp_bind(uv_udp_t* handle, const struct sockaddr* addr, unsigned int flags)
|
||||||
|
|
||||||
Bind the UDP handle to an IP address and port.
|
Bind the UDP handle to an IP address and port.
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#define UV_VERSION_MAJOR 1
|
#define UV_VERSION_MAJOR 1
|
||||||
#define UV_VERSION_MINOR 2
|
#define UV_VERSION_MINOR 2
|
||||||
#define UV_VERSION_PATCH 0
|
#define UV_VERSION_PATCH 1
|
||||||
#define UV_VERSION_IS_RELEASE 1
|
#define UV_VERSION_IS_RELEASE 1
|
||||||
#define UV_VERSION_SUFFIX ""
|
#define UV_VERSION_SUFFIX ""
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,9 @@ uint64_t uv__hrtime(uv_clocktype_t type) {
|
||||||
|
|
||||||
|
|
||||||
int uv_exepath(char* buffer, size_t* size) {
|
int uv_exepath(char* buffer, size_t* size) {
|
||||||
|
char abspath[PATH_MAX * 2 + 1];
|
||||||
int mib[4];
|
int mib[4];
|
||||||
size_t cb;
|
size_t abspath_size;
|
||||||
|
|
||||||
if (buffer == NULL || size == NULL || *size == 0)
|
if (buffer == NULL || size == NULL || *size == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -93,10 +94,19 @@ int uv_exepath(char* buffer, size_t* size) {
|
||||||
mib[3] = -1;
|
mib[3] = -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cb = *size;
|
abspath_size = sizeof abspath;;
|
||||||
if (sysctl(mib, 4, buffer, &cb, NULL, 0))
|
if (sysctl(mib, 4, abspath, &abspath_size, NULL, 0))
|
||||||
return -errno;
|
return -errno;
|
||||||
*size = strlen(buffer);
|
|
||||||
|
assert(abspath_size > 0);
|
||||||
|
abspath_size -= 1;
|
||||||
|
*size -= 1;
|
||||||
|
|
||||||
|
if (*size > abspath_size)
|
||||||
|
*size = abspath_size;
|
||||||
|
|
||||||
|
memcpy(buffer, abspath, *size);
|
||||||
|
buffer[*size] = '\0';
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,9 +125,13 @@ void uv__pipe_close(uv_pipe_t* handle) {
|
||||||
|
|
||||||
|
|
||||||
int uv_pipe_open(uv_pipe_t* handle, uv_file fd) {
|
int uv_pipe_open(uv_pipe_t* handle, uv_file fd) {
|
||||||
#if defined(__APPLE__)
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
err = uv__nonblock(fd, 1);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
|
#if defined(__APPLE__)
|
||||||
err = uv__stream_try_select((uv_stream_t*) handle, &fd);
|
err = uv__stream_try_select((uv_stream_t*) handle, &fd);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -156,6 +156,12 @@ int uv__tcp_connect(uv_connect_t* req,
|
||||||
|
|
||||||
|
|
||||||
int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) {
|
int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) {
|
||||||
|
int err;
|
||||||
|
|
||||||
|
err = uv__nonblock(sock, 1);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
return uv__stream_open((uv_stream_t*)handle,
|
return uv__stream_open((uv_stream_t*)handle,
|
||||||
sock,
|
sock,
|
||||||
UV_STREAM_READABLE | UV_STREAM_WRITABLE);
|
UV_STREAM_READABLE | UV_STREAM_WRITABLE);
|
||||||
|
|
|
@ -108,8 +108,10 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) {
|
||||||
struct termios tmp;
|
struct termios tmp;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
fd = uv__stream_fd(tty);
|
if (tty->mode == (int) mode)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
fd = uv__stream_fd(tty);
|
||||||
if (tty->mode == UV_TTY_MODE_NORMAL && mode != UV_TTY_MODE_NORMAL) {
|
if (tty->mode == UV_TTY_MODE_NORMAL && mode != UV_TTY_MODE_NORMAL) {
|
||||||
if (tcgetattr(fd, &tty->orig_termios))
|
if (tcgetattr(fd, &tty->orig_termios))
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
|
@ -565,6 +565,10 @@ int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) {
|
||||||
if (handle->io_watcher.fd != -1)
|
if (handle->io_watcher.fd != -1)
|
||||||
return -EALREADY; /* FIXME(bnoordhuis) Should be -EBUSY. */
|
return -EALREADY; /* FIXME(bnoordhuis) Should be -EBUSY. */
|
||||||
|
|
||||||
|
err = uv__nonblock(sock, 1);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
err = uv__set_reuse(sock);
|
err = uv__set_reuse(sock);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -136,6 +136,8 @@ int uv_tcp_read_start(uv_tcp_t* handle, uv_alloc_cb alloc_cb,
|
||||||
uv_read_cb read_cb);
|
uv_read_cb read_cb);
|
||||||
int uv_tcp_write(uv_loop_t* loop, uv_write_t* req, uv_tcp_t* handle,
|
int uv_tcp_write(uv_loop_t* loop, uv_write_t* req, uv_tcp_t* handle,
|
||||||
const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb);
|
const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb);
|
||||||
|
int uv__tcp_try_write(uv_tcp_t* handle, const uv_buf_t bufs[],
|
||||||
|
unsigned int nbufs);
|
||||||
|
|
||||||
void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle, uv_req_t* req);
|
void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle, uv_req_t* req);
|
||||||
void uv_process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle,
|
void uv_process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle,
|
||||||
|
@ -211,6 +213,8 @@ int uv_tty_read_start(uv_tty_t* handle, uv_alloc_cb alloc_cb,
|
||||||
int uv_tty_read_stop(uv_tty_t* handle);
|
int uv_tty_read_stop(uv_tty_t* handle);
|
||||||
int uv_tty_write(uv_loop_t* loop, uv_write_t* req, uv_tty_t* handle,
|
int uv_tty_write(uv_loop_t* loop, uv_write_t* req, uv_tty_t* handle,
|
||||||
const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb);
|
const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb);
|
||||||
|
int uv__tty_try_write(uv_tty_t* handle, const uv_buf_t bufs[],
|
||||||
|
unsigned int nbufs);
|
||||||
void uv_tty_close(uv_tty_t* handle);
|
void uv_tty_close(uv_tty_t* handle);
|
||||||
|
|
||||||
void uv_process_tty_read_req(uv_loop_t* loop, uv_tty_t* handle,
|
void uv_process_tty_read_req(uv_loop_t* loop, uv_tty_t* handle,
|
||||||
|
|
|
@ -184,8 +184,22 @@ int uv_write2(uv_write_t* req,
|
||||||
int uv_try_write(uv_stream_t* stream,
|
int uv_try_write(uv_stream_t* stream,
|
||||||
const uv_buf_t bufs[],
|
const uv_buf_t bufs[],
|
||||||
unsigned int nbufs) {
|
unsigned int nbufs) {
|
||||||
/* NOTE: Won't work with overlapped writes */
|
if (stream->flags & UV__HANDLE_CLOSING)
|
||||||
return UV_ENOSYS;
|
return UV_EBADF;
|
||||||
|
if (!(stream->flags & UV_HANDLE_WRITABLE))
|
||||||
|
return UV_EPIPE;
|
||||||
|
|
||||||
|
switch (stream->type) {
|
||||||
|
case UV_TCP:
|
||||||
|
return uv__tcp_try_write((uv_tcp_t*) stream, bufs, nbufs);
|
||||||
|
case UV_TTY:
|
||||||
|
return uv__tty_try_write((uv_tty_t*) stream, bufs, nbufs);
|
||||||
|
case UV_NAMED_PIPE:
|
||||||
|
return UV_EAGAIN;
|
||||||
|
default:
|
||||||
|
assert(0);
|
||||||
|
return UV_ENOSYS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -876,6 +876,30 @@ int uv_tcp_write(uv_loop_t* loop,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int uv__tcp_try_write(uv_tcp_t* handle,
|
||||||
|
const uv_buf_t bufs[],
|
||||||
|
unsigned int nbufs) {
|
||||||
|
int result;
|
||||||
|
DWORD bytes;
|
||||||
|
|
||||||
|
if (handle->write_reqs_pending > 0)
|
||||||
|
return UV_EAGAIN;
|
||||||
|
|
||||||
|
result = WSASend(handle->socket,
|
||||||
|
(WSABUF*) bufs,
|
||||||
|
nbufs,
|
||||||
|
&bytes,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
if (result == SOCKET_ERROR)
|
||||||
|
return uv_translate_sys_error(WSAGetLastError());
|
||||||
|
else
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle,
|
void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle,
|
||||||
uv_req_t* req) {
|
uv_req_t* req) {
|
||||||
DWORD bytes, flags, err;
|
DWORD bytes, flags, err;
|
||||||
|
|
|
@ -1878,6 +1878,21 @@ int uv_tty_write(uv_loop_t* loop,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int uv__tty_try_write(uv_tty_t* handle,
|
||||||
|
const uv_buf_t bufs[],
|
||||||
|
unsigned int nbufs) {
|
||||||
|
DWORD error;
|
||||||
|
|
||||||
|
if (handle->write_reqs_pending > 0)
|
||||||
|
return UV_EAGAIN;
|
||||||
|
|
||||||
|
if (uv_tty_write_bufs(handle, bufs, nbufs, &error))
|
||||||
|
return uv_translate_sys_error(error);
|
||||||
|
|
||||||
|
return uv__count_bufs(bufs, nbufs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void uv_process_tty_write_req(uv_loop_t* loop, uv_tty_t* handle,
|
void uv_process_tty_write_req(uv_loop_t* loop, uv_tty_t* handle,
|
||||||
uv_write_t* req) {
|
uv_write_t* req) {
|
||||||
int err;
|
int err;
|
||||||
|
|
|
@ -54,7 +54,6 @@ TEST_IMPL(close_fd) {
|
||||||
int fd[2];
|
int fd[2];
|
||||||
|
|
||||||
ASSERT(0 == pipe(fd));
|
ASSERT(0 == pipe(fd));
|
||||||
ASSERT(0 == fcntl(fd[0], F_SETFL, O_NONBLOCK));
|
|
||||||
ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0));
|
ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0));
|
||||||
ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0]));
|
ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0]));
|
||||||
fd[0] = -1; /* uv_pipe_open() takes ownership of the file descriptor. */
|
fd[0] = -1; /* uv_pipe_open() takes ownership of the file descriptor. */
|
||||||
|
|
|
@ -54,8 +54,10 @@ TEST_IMPL(osx_select) {
|
||||||
uv_tty_t tty;
|
uv_tty_t tty;
|
||||||
|
|
||||||
fd = open("/dev/tty", O_RDONLY);
|
fd = open("/dev/tty", O_RDONLY);
|
||||||
|
if (fd < 0) {
|
||||||
ASSERT(fd >= 0);
|
LOGF("Cannot open /dev/tty as read-only: %s\n", strerror(errno));
|
||||||
|
return TEST_SKIP;
|
||||||
|
}
|
||||||
|
|
||||||
r = uv_tty_init(uv_default_loop(), &tty, fd, 1);
|
r = uv_tty_init(uv_default_loop(), &tty, fd, 1);
|
||||||
ASSERT(r == 0);
|
ASSERT(r == 0);
|
||||||
|
@ -104,7 +106,10 @@ TEST_IMPL(osx_select_many_fds) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = open("/dev/tty", O_RDONLY);
|
fd = open("/dev/tty", O_RDONLY);
|
||||||
ASSERT(fd >= 0);
|
if (fd < 0) {
|
||||||
|
LOGF("Cannot open /dev/tty as read-only: %s\n", strerror(errno));
|
||||||
|
return TEST_SKIP;
|
||||||
|
}
|
||||||
|
|
||||||
r = uv_tty_init(uv_default_loop(), &tty, fd, 1);
|
r = uv_tty_init(uv_default_loop(), &tty, fd, 1);
|
||||||
ASSERT(r == 0);
|
ASSERT(r == 0);
|
||||||
|
|
|
@ -1243,7 +1243,6 @@ TEST_IMPL(closed_fd_events) {
|
||||||
|
|
||||||
/* create a pipe and share it with a child process */
|
/* create a pipe and share it with a child process */
|
||||||
ASSERT(0 == pipe(fd));
|
ASSERT(0 == pipe(fd));
|
||||||
ASSERT(0 == fcntl(fd[0], F_SETFL, O_NONBLOCK));
|
|
||||||
|
|
||||||
/* spawn_helper4 blocks indefinitely. */
|
/* spawn_helper4 blocks indefinitely. */
|
||||||
init_process_options("spawn_helper4", exit_cb);
|
init_process_options("spawn_helper4", exit_cb);
|
||||||
|
|
|
@ -28,16 +28,6 @@
|
||||||
|
|
||||||
#define MAX_BYTES 1024 * 1024
|
#define MAX_BYTES 1024 * 1024
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
TEST_IMPL(tcp_try_write) {
|
|
||||||
|
|
||||||
MAKE_VALGRIND_HAPPY();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* !_WIN32 */
|
|
||||||
|
|
||||||
static uv_tcp_t server;
|
static uv_tcp_t server;
|
||||||
static uv_tcp_t client;
|
static uv_tcp_t client;
|
||||||
static uv_tcp_t incoming;
|
static uv_tcp_t incoming;
|
||||||
|
@ -138,5 +128,3 @@ TEST_IMPL(tcp_try_write) {
|
||||||
MAKE_VALGRIND_HAPPY();
|
MAKE_VALGRIND_HAPPY();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !_WIN32 */
|
|
||||||
|
|
Loading…
Reference in New Issue