forked from aniani/vim
patch 8.0.0959: build failure on MS-Windows
Problem: Build failure on MS-Windows. Solution: Use ioctlsocket() instead of fcntl().
This commit is contained in:
@@ -3542,6 +3542,7 @@ channel_handle_events(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Set "channel"/"part" to non-blocking.
|
* Set "channel"/"part" to non-blocking.
|
||||||
|
* Only works for sockets and pipes.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
channel_set_nonblock(channel_T *channel, ch_part_T part)
|
channel_set_nonblock(channel_T *channel, ch_part_T part)
|
||||||
@@ -3552,15 +3553,12 @@ channel_set_nonblock(channel_T *channel, ch_part_T part)
|
|||||||
if (fd != INVALID_FD)
|
if (fd != INVALID_FD)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (part == PART_SOCK)
|
u_long val = 1;
|
||||||
{
|
|
||||||
u_long val = 1;
|
|
||||||
|
|
||||||
ioctlsocket(fd, FIONBIO, &val);
|
ioctlsocket(fd, FIONBIO, &val);
|
||||||
}
|
#else
|
||||||
else
|
fcntl(fd, F_SETFL, O_NONBLOCK);
|
||||||
#endif
|
#endif
|
||||||
fcntl(fd, F_SETFL, O_NONBLOCK);
|
|
||||||
ch_part->ch_nonblocking = TRUE;
|
ch_part->ch_nonblocking = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3706,7 +3704,6 @@ channel_send(
|
|||||||
|
|
||||||
if (last != NULL)
|
if (last != NULL)
|
||||||
{
|
{
|
||||||
ch_log(channel, "Creating new entry");
|
|
||||||
last->wq_prev = wq->wq_prev;
|
last->wq_prev = wq->wq_prev;
|
||||||
last->wq_next = NULL;
|
last->wq_next = NULL;
|
||||||
if (wq->wq_prev == NULL)
|
if (wq->wq_prev == NULL)
|
||||||
|
@@ -769,6 +769,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
959,
|
||||||
/**/
|
/**/
|
||||||
958,
|
958,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user