Mercurial > vim
diff src/channel.c @ 7797:0d46cea25641 v7.4.1195
commit https://github.com/vim/vim/commit/f12d983deab06b0408781d7a6c2f8970d765b723
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 29 21:11:25 2016 +0100
patch 7.4.1195
Problem: The channel feature does not work in the MS-Windows console.
Solution: Add win32 console support. (Yasuhiro Matsumoto)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 29 Jan 2016 21:15:05 +0100 |
parents | 4f23088b47ea |
children | 83861277e6a3 |
line wrap: on
line diff
--- a/src/channel.c +++ b/src/channel.c @@ -91,7 +91,7 @@ typedef struct { #ifdef FEAT_GUI_GTK gint ch_inputHandler; /* Cookie for input */ #endif -#ifdef FEAT_GUI_W32 +#ifdef WIN32 int ch_inputHandler; /* simply ret.value of WSAAsyncSelect() */ #endif @@ -279,14 +279,14 @@ channel_open(char *hostname, int port_in int sd; struct sockaddr_in server; struct hostent * host; -#ifdef FEAT_GUI_W32 +#ifdef WIN32 u_short port = port_in; #else int port = port_in; #endif int idx; -#ifdef FEAT_GUI_W32 +#ifdef WIN32 channel_init_winsock(); #endif @@ -861,7 +861,7 @@ channel_read_block(int idx) return channel_get(idx); } -# if defined(FEAT_GUI_W32) || defined(PROTO) +# if defined(WIN32) || defined(PROTO) /* * Lookup the channel index from the socket. * Returns -1 when the socket isn't found. @@ -965,7 +965,7 @@ channel_poll_check(int ret_in, void *fds } # endif /* UNIX && !HAVE_SELECT */ -# if (defined(UNIX) && defined(HAVE_SELECT)) || defined(PROTO) +# if (!defined(FEAT_GUI_W32) && defined(HAVE_SELECT)) || defined(PROTO) /* * The type of "rfds" is hidden to avoid problems with the function proto. */ @@ -1007,6 +1007,6 @@ channel_select_check(int ret_in, void *r return ret; } -# endif /* UNIX && HAVE_SELECT */ +# endif /* !FEAT_GUI_W32 && HAVE_SELECT */ #endif /* FEAT_CHANNEL */