diff options
author | Yang Tse <yangsita@gmail.com> | 2008-11-01 16:52:57 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-11-01 16:52:57 +0000 |
commit | 050a39a7a578106989b32f80a625c46a87b52ca1 (patch) | |
tree | 86722e788f9257c5539790d7206c38e9b9ae28ef /lib/config-win32.h | |
parent | 5f085789b92be623e7a73d1172486a64daf42895 (diff) | |
download | curl-050a39a7a578106989b32f80a625c46a87b52ca1.tar.gz |
WIN32 availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite
convoluted, compiler dependant and in some cases even build target dependat.
Diffstat (limited to 'lib/config-win32.h')
-rw-r--r-- | lib/config-win32.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/config-win32.h b/lib/config-win32.h index 5ac22b9ef..b782631de 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -219,16 +219,6 @@ #define HAVE_UTIME 1 #endif -/* The following 2 functions are strictly only available when - * _WIN32_WINNT is 0x0501 or larger. But we assume this value - * is defined. See below. */ - -/* Define if you have the getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 - -/* Define if you have the getnameinfo function. */ -#define HAVE_GETNAMEINFO 1 - /* Define to the type qualifier of arg 1 for getnameinfo. */ #define GETNAMEINFO_QUAL_ARG1 const @@ -400,6 +390,20 @@ # endif #endif +/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite */ +/* convoluted, compiler dependant and in some cases even build target dependat. */ +#if defined(HAVE_WS2TCPIP_H) +# if defined(_MSC_VER) && (_MSC_VER >= 1200) +# define HAVE_FREEADDRINFO 1 +# define HAVE_GETADDRINFO 1 +# define HAVE_GETNAMEINFO 1 +# elif defined(__MINGW32__) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501) +# define HAVE_FREEADDRINFO 1 +# define HAVE_GETADDRINFO 1 +# define HAVE_GETNAMEINFO 1 +# endif +#endif + /* ---------------------------------------------------------------- */ /* LARGE FILE SUPPORT */ /* ---------------------------------------------------------------- */ |