0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 7.4.1459

Problem:    MS-Windows doesn't know socklen_t.
Solution:   Use previous method for WIN32.
This commit is contained in:
Bram Moolenaar
2016-02-28 22:33:46 +01:00
parent fdd6ce4a2f
commit e081e21f76
2 changed files with 12 additions and 4 deletions

View File

@@ -681,8 +681,10 @@ channel_open(
struct timeval tv; struct timeval tv;
fd_set rfds; fd_set rfds;
fd_set wfds; fd_set wfds;
#ifndef WIN32
int so_error = 0; int so_error = 0;
socklen_t so_error_len = sizeof(so_error); socklen_t so_error_len = sizeof(so_error);
#endif
FD_ZERO(&rfds); FD_ZERO(&rfds);
FD_SET(sd, &rfds); FD_SET(sd, &rfds);
@@ -709,9 +711,12 @@ channel_open(
return NULL; return NULL;
} }
#ifdef WIN32
/* On Win32: select() is expected to work and wait for up to the /* On Win32: select() is expected to work and wait for up to the
* waittime for the socket to be open. * waittime for the socket to be open. */
* On Linux-like systems: See socket(7) for the behavior if (!FD_ISSET(sd, &wfds) || ret == 0)
#else
/* On Linux-like systems: See socket(7) for the behavior
* After putting the socket in non-blocking mode, connect() will * After putting the socket in non-blocking mode, connect() will
* return EINPROGRESS, select() will not wait (as if writing is * return EINPROGRESS, select() will not wait (as if writing is
* possible), need to use getsockopt() to check if the socket is * possible), need to use getsockopt() to check if the socket is
@@ -741,6 +746,7 @@ channel_open(
} }
if (!FD_ISSET(sd, &wfds) || so_error != 0) if (!FD_ISSET(sd, &wfds) || so_error != 0)
#endif
{ {
#ifndef WIN32 #ifndef WIN32
struct timeval end_tv; struct timeval end_tv;

View File

@@ -743,6 +743,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 */
/**/
1459,
/**/ /**/
1458, 1458,
/**/ /**/