diff options
author | Yang Tse <yangsita@gmail.com> | 2009-10-21 02:30:56 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-10-21 02:30:56 +0000 |
commit | ff3223259f31becea6f1d95a826c6f23a0265aaa (patch) | |
tree | da2df81ade05c98b8f8c067d8e81a86a40773b26 /lib | |
parent | 3da1ade4e505837fefb0cb8003ce7c63c34d1f87 (diff) |
Detect when msvc 6.0 is in use without PSDK installed, intentionally
fail to build when this happens, and show an appropriate error.
The brave of heart can circumvect this. Defining ALLOW_MSVC6_WITHOUT_PSDK
in lib/config-win32.h, although absolutely discouraged and unsupported,
this will allow the die hard MSVC hacker to build in such a discouraged
environment.
The actually supported 'fix' is to install 'February 2003 Platform SDK'
a.k.a. 'Windows Server 2003 PSDK' which can be freely downloaded from
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
Diffstat (limited to 'lib')
-rw-r--r-- | lib/setup.h | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/lib/setup.h b/lib/setup.h index f3ea36f8d..ec62e3b20 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -414,15 +414,53 @@ #endif /* + * 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. */ #ifdef _MSC_VER -#if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP)) -#undef HAVE_STRUCT_SOCKADDR_STORAGE +# if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP)) +# undef HAVE_STRUCT_SOCKADDR_STORAGE +# endif #endif + +/* + * msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN + * defined in ws2tcpip.h as well as to provide IPv6 support. + */ + +#ifdef _MSC_VER +# if !defined(HAVE_WS2TCPIP_H) || ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN)) +# undef HAVE_FREEADDRINFO +# undef HAVE_GETADDRINFO +# undef HAVE_GETNAMEINFO +# undef ENABLE_IPV6 +# endif +#endif + +/* + * Intentionally fail to build when using msvc 6.0 without PSDK installed. + * The brave of heart can circumvect this, defining ALLOW_MSVC6_WITHOUT_PSDK + * in lib/config-win32.h although absolutely discouraged and unsupported. + */ + +#if defined(_MSC_VER) && !defined(__POCC__) +# if !defined(HAVE_WINDOWS_H) || ((_MSC_VER < 1300) && !defined(_FILETIME_)) +# if !defined(ALLOW_MSVC6_WITHOUT_PSDK) +# error MSVC 6.0 requires 'February 2003 Platform SDK' a.k.a. 'Windows Server 2003 PSDK' +# else +# define CURL_DISABLE_LDAP 1 +# endif +# endif #endif #ifdef NETWARE |