summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2020-08-30 12:21:53 +0200
committerMarc Hoersken <info@marc-hoersken.de>2020-09-02 16:30:39 +0200
commit3e4b32a3e1250d49bd0e45a35b3a08a2f4d07d8f (patch)
tree8203eec934f180afe2bad1ae54ac77dc8ffd7e69 /lib
parent20d74b7393d5aedcc9d54c92b8ed56cae473d04e (diff)
downloadcurl-3e4b32a3e1250d49bd0e45a35b3a08a2f4d07d8f.tar.gz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/curl_setup.h10
-rw-r--r--lib/setup-win32.h3
-rw-r--r--lib/system_win32.c11
3 files changed, 5 insertions, 19 deletions
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index 9b845c8d8..276caaa26 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -560,14 +560,6 @@
/* ---------------------------------------------------------------- */
/*
- * When using WINSOCK, TELNET protocol requires WINSOCK2 API.
- */
-
-#if defined(USE_WINSOCK) && (USE_WINSOCK != 2)
-# define CURL_DISABLE_TELNET 1
-#endif
-
-/*
* msvc 6.0 does not have struct sockaddr_storage and
* does not define IPPROTO_ESP in winsock2.h. But both
* are available if PSDK is properly installed.
@@ -705,7 +697,7 @@ int netware_init(void);
defined(HAVE_WINSOCK_H) || \
defined(HAVE_WINSOCK2_H) || \
defined(HAVE_WS2TCPIP_H)
-# error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
+# error "WinSock and lwIP TCP/IP stack definitions shall not coexist!"
# endif
#endif
diff --git a/lib/setup-win32.h b/lib/setup-win32.h
index 45b584766..d20662aa1 100644
--- a/lib/setup-win32.h
+++ b/lib/setup-win32.h
@@ -60,7 +60,6 @@
/*
* Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else
- * define USE_WINSOCK to 1 if we have and use WINSOCK API, else
* undefine USE_WINSOCK.
*/
@@ -70,7 +69,7 @@
# define USE_WINSOCK 2
#else
# ifdef HAVE_WINSOCK_H
-# define USE_WINSOCK 1
+# error "WinSock version 1 is no longer supported, version 2 is required!"
# endif
#endif
diff --git a/lib/system_win32.c b/lib/system_win32.c
index 2e59e032e..9b0797bf9 100644
--- a/lib/system_win32.c
+++ b/lib/system_win32.c
@@ -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