New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win32: drop support for WinSock version 1, require version 2 #5854
Conversation
Is there really a reason to continue supporting Winsock 1 |
I don't think there is a good reason to still support it, but can we just drop support for it without deprecating it first? |
I think a good alternative would be to define |
aa13ca8
to
97a8aeb
Compare
Yes. Who is using it? Unless you have Windows 95 that for some reason doesn't have winsock 2. And anyway who is building for that and how? I don't even know if that's still possible, this aside. |
Okay, fine with me. But does that then mean that we shouldn't check for WinSock version 2 and just assume Lines 61 to 75 in fbe07c6
Lines 58 to 60 in fbe07c6
Lines 201 to 239 in fbe07c6
All of this could probably be simplified to compile time only checks if we just assume WinSock 2 and drop the dynamic library load, as suggested here: #5634 (comment) |
Sure. Removing support for winsock1 that isn't used by anyone is also a benefit as it will make the code easier to read etc. |
Okay, so I will start on reworking this PR into something to drop support for WinSock 1 and just assume WinSock 2 statically. |
We should just document it as a requirement in docs/INTERNALS where we note other "at least this version" stuff. |
18bb1fc
to
40db989
Compare
a243719
to
42a00c9
Compare
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.
Drop dynamic loading of ws2_32.dll and instead rely on the imported version which is now required to be at least 2.2.
42a00c9
to
c5bdbad
Compare
@bagder what do you think? Are we ready to go and drop support for WinSock 1 or should we announce this first somehow? |
Stupid mobile app replaced existing reviewers instead of just adding new ones, sorry for that. |
Thank you everyone, merging this now... |
Drop dynamic loading of ws2_32.dll and instead rely on the imported version which is now required to be at least 2.2. Reviewed-by: Marcel Raad Reviewed-by: Jay Satiro Reviewed-by: Daniel Stenberg Reviewed-by: Viktor Szakats Closes #5854
New PR content:
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.
Original PR content:
While digging through the WinSock setup in the curl source code, I found out that there is actually code to handle the differences between WinSock version 1 and 2. Therefore the changes introduced with #5634 should also still support compilation against older WinSock versions.
An alternative to repeating the same check in every
#if
statement would be to define an internal variable insidemulti.c
ormultihandle.h
and just#ifdef
on that one instead of justUSE_WINSOCK
.--
Update the ifdef-jungle to check for WinSock version 2.
Follow up to #5634