diff options
author | Yang Tse <yangsita@gmail.com> | 2010-01-22 20:27:48 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2010-01-22 20:27:48 +0000 |
commit | 143586403055b977bfe17b06042ebc3beb5d4d82 (patch) | |
tree | 83b2cc9c957dbf1ffd7d5ffe5e3207dee905e523 /lib/setup.h | |
parent | 4a8a73147610ec6522afe5d847761d95b54aca16 (diff) | |
download | curl-143586403055b977bfe17b06042ebc3beb5d4d82.tar.gz |
Definitions of resolver specialty compile-time defines CURLRES_* moved
from hostip.h to setup.h in order to allow proper inclusion in any file.
This represents no functional change at all in which resolver is used,
everything still works as usual, internally and externally there is no
difference in behavior.
Diffstat (limited to 'lib/setup.h')
-rw-r--r-- | lib/setup.h | 62 |
1 files changed, 48 insertions, 14 deletions
diff --git a/lib/setup.h b/lib/setup.h index a8549a7d8..980a91699 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -407,6 +407,27 @@ #endif /* WIN32 */ +/* + * msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN + * defined in ws2tcpip.h as well as to provide IPv6 support. + */ + +#if defined(_MSC_VER) && !defined(__POCC__) +# if !defined(HAVE_WS2TCPIP_H) || \ + ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN)) +# undef HAVE_GETADDRINFO_THREADSAFE +# undef HAVE_FREEADDRINFO +# undef HAVE_GETADDRINFO +# undef HAVE_GETNAMEINFO +# undef ENABLE_IPV6 +# endif +#endif + +/* ---------------------------------------------------------------- */ +/* resolver specialty compile-time defines */ +/* CURLRES_* defines to use in the host*.c sources */ +/* ---------------------------------------------------------------- */ + #if defined(WIN32) && !defined(__CYGWIN__) && !defined(USE_ARES) && \ !defined(__LCC__) /* lcc-win32 doesn't have _beginthreadex() */ #ifdef ENABLE_IPV6 @@ -424,6 +445,33 @@ #define CURL_NO__BEGINTHREADEX #endif +#ifdef USE_ARES +# define CURLRES_ASYNCH +# define CURLRES_ARES +#endif + +#ifdef USE_THREADING_GETHOSTBYNAME +# define CURLRES_ASYNCH +# define CURLRES_THREADED +#endif + +#ifdef USE_THREADING_GETADDRINFO +# define CURLRES_ASYNCH +# define CURLRES_THREADED +#endif + +#ifdef ENABLE_IPV6 +# define CURLRES_IPV6 +#else +# define CURLRES_IPV4 +#endif + +#ifndef CURLRES_ASYNCH +# define CURLRES_SYNCH +#endif + +/* ---------------------------------------------------------------- */ + /* * When using WINSOCK, TELNET protocol requires WINSOCK2 API. */ @@ -445,20 +493,6 @@ #endif /* - * msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN - * defined in ws2tcpip.h as well as to provide IPv6 support. - */ - -#if defined(_MSC_VER) && !defined(__POCC__) -# 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 circumvent this, defining ALLOW_MSVC6_WITHOUT_PSDK * in lib/config-win32.h although absolutely discouraged and unsupported. |