Merge branch 'v1.x'

This commit is contained in:
Saúl Ibarra Corretgé 2016-08-10 13:34:39 +01:00
commit 2d76ce229f
4 changed files with 11 additions and 4 deletions

View File

@ -291,7 +291,10 @@ int uv__stream_try_select(uv_stream_t* stream, int* fd) {
timeout.tv_sec = 0;
timeout.tv_nsec = 1;
ret = kevent(kq, filter, 1, events, 1, &timeout);
do
ret = kevent(kq, filter, 1, events, 1, &timeout);
while (ret == -1 && errno == EINTR);
uv__close(kq);
if (ret == -1)

View File

@ -425,7 +425,7 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req,
}
_snwprintf(filenamew, size, L"%s\\%.*s", handle->dirw,
file_info->FileNameLength / sizeof(WCHAR),
file_info->FileNameLength / (DWORD)sizeof(WCHAR),
file_info->FileName);
filenamew[size - 1] = L'\0';

View File

@ -54,6 +54,10 @@
/* The number of nanoseconds in one second. */
#define UV__NANOSEC 1000000000
/* Max user name length, from iphlpapi.h */
#ifndef UNLEN
# define UNLEN 256
#endif
/* Cached copy of the process title, plus a mutex guarding it. */
static char *process_title;

View File

@ -231,7 +231,7 @@ TEST_IMPL(pipe_getsockname_blocking) {
len1 = sizeof buf1;
r = uv_pipe_getsockname(&pipe_client, buf1, &len1);
ASSERT(r == 0);
ASSERT(buf1[len1 - 1] != 0);
ASSERT(len1 == 0); /* It's an annonymous pipe. */
r = uv_read_start((uv_stream_t*)&pipe_client, NULL, NULL);
ASSERT(r == 0);
@ -240,7 +240,7 @@ TEST_IMPL(pipe_getsockname_blocking) {
len2 = sizeof buf2;
r = uv_pipe_getsockname(&pipe_client, buf2, &len2);
ASSERT(r == 0);
ASSERT(buf2[len2 - 1] != 0);
ASSERT(len2 == 0); /* It's an annonymous pipe. */
r = uv_read_stop((uv_stream_t*)&pipe_client);
ASSERT(r == 0);