diff options
author | Yang Tse <yangsita@gmail.com> | 2006-10-18 21:05:40 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2006-10-18 21:05:40 +0000 |
commit | 5df4be11657fc49d74e1e6b39c0003f7cf2f3772 (patch) | |
tree | 93d2ef65b7accbd9a6572dbfca634dc69e95ffce /lib/easy.c | |
parent | 96445f1b7da2013c294c541530f0160e248b430e (diff) |
Check for USE_WINSOCK instead of WIN32 where the check was done
to verify winsock API availability.
Diffstat (limited to 'lib/easy.c')
-rw-r--r-- | lib/easy.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/easy.c b/lib/easy.c index a400f84f1..b2e026326 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -106,7 +106,7 @@ /* The last #include file should be: */ #include "memdebug.h" -#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#ifdef USE_WINSOCK /* win32_cleanup() is for win32 socket cleanup functionality, the opposite of win32_init() */ static void win32_cleanup(void) @@ -122,12 +122,12 @@ static CURLcode win32_init(void) WSADATA wsaData; int err; -#ifdef ENABLE_IPV6 - wVersionRequested = MAKEWORD(2, 0); -#else - wVersionRequested = MAKEWORD(1, 1); +#if defined(ENABLE_IPV6) && (USE_WINSOCK < 2) + Error IPV6_requires_winsock2 #endif + wVersionRequested = MAKEWORD(USE_WINSOCK, USE_WINSOCK); + err = WSAStartup(wVersionRequested, &wsaData); if (err != 0) |