win: fixing build for older MSVC compilers
Fixes: https://github.com/libuv/libuv/issues/1900 PR-URL: https://github.com/libuv/libuv/pull/1885 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Bert Belder <bertbelder@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
e4087dedf8
commit
1d878b01f7
@ -21,7 +21,6 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <io.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -1294,7 +1293,7 @@ static int uv__pipe_write_data(uv_loop_t* loop,
|
||||
size_t nbufs,
|
||||
uv_stream_t* send_handle,
|
||||
uv_write_cb cb,
|
||||
bool copy_always) {
|
||||
int copy_always) {
|
||||
int err;
|
||||
int result;
|
||||
uv_buf_t write_buf;
|
||||
@ -1536,7 +1535,7 @@ int uv__pipe_write_ipc(uv_loop_t* loop,
|
||||
/* Write buffers. We set the `always_copy` flag, so it is not a problem that
|
||||
* some of the written data lives on the stack. */
|
||||
err = uv__pipe_write_data(
|
||||
loop, req, handle, bufs, buf_count, send_handle, cb, true);
|
||||
loop, req, handle, bufs, buf_count, send_handle, cb, 1);
|
||||
|
||||
/* If we had to heap-allocate the bufs array, free it now. */
|
||||
if (bufs != stack_bufs) {
|
||||
@ -1561,7 +1560,7 @@ int uv__pipe_write(uv_loop_t* loop,
|
||||
/* Non-IPC pipe write: put data on the wire directly. */
|
||||
assert(send_handle == NULL);
|
||||
return uv__pipe_write_data(
|
||||
loop, req, handle, bufs, nbufs, NULL, cb, false);
|
||||
loop, req, handle, bufs, nbufs, NULL, cb, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -103,6 +103,7 @@ static int uv__create_stdio_pipe_pair(uv_loop_t* loop,
|
||||
DWORD client_access = 0;
|
||||
HANDLE child_pipe = INVALID_HANDLE_VALUE;
|
||||
int err;
|
||||
int overlap;
|
||||
|
||||
if (flags & UV_READABLE_PIPE) {
|
||||
/* The server needs inbound access too, otherwise CreateNamedPipe() won't
|
||||
@ -130,7 +131,7 @@ static int uv__create_stdio_pipe_pair(uv_loop_t* loop,
|
||||
sa.lpSecurityDescriptor = NULL;
|
||||
sa.bInheritHandle = TRUE;
|
||||
|
||||
BOOL overlap = server_pipe->ipc || (flags & UV_OVERLAPPED_PIPE);
|
||||
overlap = server_pipe->ipc || (flags & UV_OVERLAPPED_PIPE);
|
||||
child_pipe = CreateFileA(pipe_name,
|
||||
client_access,
|
||||
0,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user