win32: drop support for WinSock version 1, require version 2

IPv6, telnet and now also the multi API require WinSock
version 2 which is available starting with Windows 95.

Therefore we think it is time to drop support for version 1.

Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Reviewed-by: Viktor Szakats

Follow up to #5634
Closes #5854
This commit is contained in:
Marc Hoersken 2020-08-30 12:21:53 +02:00
parent 20d74b7393
commit 3e4b32a3e1
No known key found for this signature in database
GPG key ID: 61E03CBED7BC859E
5 changed files with 11 additions and 22 deletions

View file

@ -55,12 +55,7 @@ CURLcode Curl_win32_init(long flags)
WSADATA wsaData;
int res;
#if defined(ENABLE_IPV6) && (USE_WINSOCK < 2)
#error IPV6_requires_winsock2
#endif
wVersionRequested = MAKEWORD(USE_WINSOCK, USE_WINSOCK);
wVersionRequested = MAKEWORD(2, 2);
res = WSAStartup(wVersionRequested, &wsaData);
if(res != 0)
@ -83,9 +78,9 @@ CURLcode Curl_win32_init(long flags)
return CURLE_FAILED_INIT;
}
/* The Windows Sockets DLL is acceptable. Proceed. */
#elif defined(USE_LWIPSOCK)
#elif defined(USE_LWIPSOCK)
lwip_init();
#endif
#endif
} /* CURL_GLOBAL_WIN32 */
#ifdef USE_WINDOWS_SSPI