aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/event
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-09-18 03:17:15 +0200
committerGitHub <noreply@github.com>2022-09-18 09:17:15 +0800
commit6d557e324fd4223fff3279a0112f40431c540163 (patch)
tree74b9d80ccfe5bb6ac628a3455aa1f2c6c3b20497 /src/nvim/event
parent3c3f3e7353ba2cb9071183cd05036ca2a98d3672 (diff)
downloadrneovim-6d557e324fd4223fff3279a0112f40431c540163.tar.gz
rneovim-6d557e324fd4223fff3279a0112f40431c540163.tar.bz2
rneovim-6d557e324fd4223fff3279a0112f40431c540163.zip
vim-patch:8.1.0941: macros for MS-Windows are inconsistent (#20215)
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) https://github.com/vim/vim/commit/4f97475d326c2773a78561fb874e4f23c25cbcd9
Diffstat (limited to 'src/nvim/event')
-rw-r--r--src/nvim/event/libuv_process.c8
-rw-r--r--src/nvim/event/stream.c8
-rw-r--r--src/nvim/event/stream.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/event/libuv_process.c b/src/nvim/event/libuv_process.c
index 0251ea9957..f012bacdd9 100644
--- a/src/nvim/event/libuv_process.c
+++ b/src/nvim/event/libuv_process.c
@@ -25,7 +25,7 @@ int libuv_process_spawn(LibuvProcess *uvproc)
uvproc->uvopts.file = proc->argv[0];
uvproc->uvopts.args = proc->argv;
uvproc->uvopts.flags = UV_PROCESS_WINDOWS_HIDE;
-#ifdef WIN32
+#ifdef MSWIN
// libuv collapses the argv to a CommandLineToArgvW()-style string. cmd.exe
// expects a different syntax (must be prepared by the caller before now).
if (os_shell_is_cmdexe(proc->argv[0])) {
@@ -55,7 +55,7 @@ int libuv_process_spawn(LibuvProcess *uvproc)
if (!proc->in.closed) {
uvproc->uvstdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
-#ifdef WIN32
+#ifdef MSWIN
uvproc->uvstdio[0].flags |= proc->overlapped ? UV_OVERLAPPED_PIPE : 0;
#endif
uvproc->uvstdio[0].data.stream = STRUCT_CAST(uv_stream_t,
@@ -64,7 +64,7 @@ int libuv_process_spawn(LibuvProcess *uvproc)
if (!proc->out.closed) {
uvproc->uvstdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
-#ifdef WIN32
+#ifdef MSWIN
// pipe must be readable for IOCP to work on Windows.
uvproc->uvstdio[1].flags |= proc->overlapped ?
(UV_READABLE_PIPE | UV_OVERLAPPED_PIPE) : 0;
@@ -113,7 +113,7 @@ static void close_cb(uv_handle_t *handle)
static void exit_cb(uv_process_t *handle, int64_t status, int term_signal)
{
Process *proc = handle->data;
-#if defined(WIN32)
+#if defined(MSWIN)
// Use stored/expected signal.
term_signal = proc->exit_signal;
#endif
diff --git a/src/nvim/event/stream.c b/src/nvim/event/stream.c
index b34fd73d52..bfb7a551b9 100644
--- a/src/nvim/event/stream.c
+++ b/src/nvim/event/stream.c
@@ -10,7 +10,7 @@
#include "nvim/log.h"
#include "nvim/macros.h"
#include "nvim/rbuffer.h"
-#ifdef WIN32
+#ifdef MSWIN
# include "nvim/os/os_win_console.h"
#endif
@@ -60,7 +60,7 @@ void stream_init(Loop *loop, Stream *stream, int fd, uv_stream_t *uvstream)
stream->uv.idle.data = stream;
} else {
assert(type == UV_NAMED_PIPE || type == UV_TTY);
-#ifdef WIN32
+#ifdef MSWIN
if (type == UV_TTY) {
uv_tty_init(&loop->uv, &stream->uv.tty, fd, 0);
uv_tty_set_mode(&stream->uv.tty, UV_TTY_MODE_RAW);
@@ -75,7 +75,7 @@ void stream_init(Loop *loop, Stream *stream, int fd, uv_stream_t *uvstream)
uv_pipe_init(&loop->uv, &stream->uv.pipe, 0);
uv_pipe_open(&stream->uv.pipe, fd);
stream->uvstream = STRUCT_CAST(uv_stream_t, &stream->uv.pipe);
-#ifdef WIN32
+#ifdef MSWIN
}
#endif
}
@@ -109,7 +109,7 @@ void stream_close(Stream *stream, stream_close_cb on_stream_close, void *data)
stream->close_cb = on_stream_close;
stream->close_cb_data = data;
-#ifdef WIN32
+#ifdef MSWIN
if (UV_TTY == uv_guess_handle(stream->fd)) {
// Undo UV_TTY_MODE_RAW from stream_init(). #10801
uv_tty_set_mode(&stream->uv.tty, UV_TTY_MODE_NORMAL);
diff --git a/src/nvim/event/stream.h b/src/nvim/event/stream.h
index 02e816b4be..b580d3c33d 100644
--- a/src/nvim/event/stream.h
+++ b/src/nvim/event/stream.h
@@ -35,7 +35,7 @@ struct stream {
uv_pipe_t pipe;
uv_tcp_t tcp;
uv_idle_t idle;
-#ifdef WIN32
+#ifdef MSWIN
uv_tty_t tty;
#endif
} uv;