diff src/channel.c @ 12158:b3e39486880a v8.0.0959

patch 8.0.0959: build failure on MS-Windows commit https://github.com/vim/vim/commit/f66a2cda2c425c441fc5e20c8f8893c9630e3aaa Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 18 21:53:22 2017 +0200 patch 8.0.0959: build failure on MS-Windows Problem: Build failure on MS-Windows. Solution: Use ioctlsocket() instead of fcntl().
author Christian Brabandt <cb@256bit.org>
date Fri, 18 Aug 2017 22:00:04 +0200
parents 71e10b81226d
children 51e5a8602624
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -3542,6 +3542,7 @@ channel_handle_events(void)
 
 /*
  * Set "channel"/"part" to non-blocking.
+ * Only works for sockets and pipes.
  */
     void
 channel_set_nonblock(channel_T *channel, ch_part_T part)
@@ -3552,15 +3553,12 @@ channel_set_nonblock(channel_T *channel,
     if (fd != INVALID_FD)
     {
 #ifdef _WIN32
-	if (part == PART_SOCK)
-	{
-	    u_long	val = 1;
-
-	    ioctlsocket(fd, FIONBIO, &val);
-	}
-	else
+	u_long	val = 1;
+
+	ioctlsocket(fd, FIONBIO, &val);
+#else
+	fcntl(fd, F_SETFL, O_NONBLOCK);
 #endif
-	    fcntl(fd, F_SETFL, O_NONBLOCK);
 	ch_part->ch_nonblocking = TRUE;
     }
 }
@@ -3706,7 +3704,6 @@ channel_send(
 
 		    if (last != NULL)
 		    {
-		ch_log(channel, "Creating new entry");
 			last->wq_prev = wq->wq_prev;
 			last->wq_next = NULL;
 			if (wq->wq_prev == NULL)