File tree Expand file tree Collapse file tree 4 files changed +17
-4
lines changed
Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -954,11 +954,12 @@ channel_clear(int idx)
954954/*
955955 * Check for reading from "fd" with "timeout" msec.
956956 * Return FAIL when there is nothing to read.
957+ * Always returns OK for FEAT_GUI_W32.
957958 */
958959 static int
959960channel_wait (int fd , int timeout )
960961{
961- #ifdef HAVE_SELECT
962+ #if defined( HAVE_SELECT ) && !defined( FEAT_GUI_W32 )
962963 struct timeval tval ;
963964 fd_set rfds ;
964965 int ret ;
@@ -1045,6 +1046,16 @@ channel_read(int idx)
10451046 if (len < MAXMSGSIZE )
10461047 break ; /* did read everything that's available */
10471048 }
1049+ #ifdef FEAT_GUI_W32
1050+ if (len == SOCKET_ERROR )
1051+ {
1052+ /* For Win32 GUI channel_wait() always returns OK and we handle the
1053+ * situation that there is nothing to read here.
1054+ * TODO: how about a timeout? */
1055+ if (WSAGetLastError () == WSAEWOULDBLOCK )
1056+ return ;
1057+ }
1058+ #endif
10481059
10491060 /* Reading a socket disconnection (readlen == 0), or a socket error. */
10501061 if (readlen <= 0 )
Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ if !has('channel')
66endif
77
88" This test requires the Python command to run the test server.
9- " This most likely only works on Unix and Windows console .
9+ " This most likely only works on Unix and Windows.
1010if has (' unix' )
1111 " We also need the pkill command to make sure the server can be stopped.
1212 if ! executable (' python' ) || ! executable (' pkill' )
1313 finish
1414 endif
15- elseif has (' win32' ) && ! has ( ' gui_win32 ' )
15+ elseif has (' win32' )
1616 " Use Python Launcher for Windows (py.exe).
1717 if ! executable (' py' )
1818 finish
Original file line number Diff line number Diff line change @@ -742,6 +742,8 @@ static char *(features[]) =
742742
743743static int included_patches [] =
744744{ /* Add new patch number below this line */
745+ /**/
746+ 1260 ,
745747/**/
746748 1259 ,
747749/**/
Original file line number Diff line number Diff line change @@ -519,7 +519,7 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */
519519# ifdef HAVE_SYS_POLL_H
520520# include <sys/poll.h>
521521# define HAVE_POLL
522- # elif defined(WIN32 ) && !defined( FEAT_GUI_W32 )
522+ # elif defined(WIN32 )
523523# define HAVE_SELECT
524524# else
525525# ifdef HAVE_POLL_H
You can’t perform that action at this time.
0 commit comments