removing winsock 2 dependence
Date: Wed, 25 Feb 2004 18:41:26 -0800
Here's a patch to remove winsock 2 dependence. Some of the changes here are
duplicates of what I sent earlier to get MSVC 6 to build. It's probably
best to deal with that first and then deal with this, but I'd love to get
this change in so I wanted to give everyone a chance to see it as early as
The "interesting" changes are:
- remove LINKLIBS from lib/Makefile.vc6. There's no need for it to be
- change ws2_32.lib to wsock32.lib in src/Makefile.vc6.
- change win32_init in lib/easy.c to only require WinSock 1.1.
- change operate() in src/main.c to check the return value of main_init().
- change lib/telnet.c to check for WinSock 2.0. If it's there, dynamically
load ws2_32.dll and determine function pointers for the 3 functions it
In other words, telnet still requires WinSock 2.0. But, you can build curl
and include telnet, and run all other protocols on a box that only has
WinSock 1.1. If you try to use telnet on something that doesn't have at
least 2.0, you'll get an error like this:
curl: (2) WSAStartup failed (10092)
I don't really have a good setup for testing telnet. I'm working on it.
I'll also run the testsuite soon.
- application/octet-stream attachment: winsock.patch