summaryrefslogtreecommitdiff
path: root/config-win32.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-11-01 16:52:57 +0000
committerYang Tse <yangsita@gmail.com>2008-11-01 16:52:57 +0000
commitd74c816b769b73125d10d5b6f8f7b425c5954525 (patch)
treedcbe05b5484860219cb13e48dd07cb3d5fd12c5f /config-win32.h
parentc0711bdca9afc81e25f7dbe6857fffc4426e7cdb (diff)
downloadc-ares-d74c816b769b73125d10d5b6f8f7b425c5954525.tar.gz
c-ares-d74c816b769b73125d10d5b6f8f7b425c5954525.tar.bz2
c-ares-d74c816b769b73125d10d5b6f8f7b425c5954525.zip
WIN32 availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite
convoluted, compiler dependant and in some cases even build target dependat.
Diffstat (limited to 'config-win32.h')
-rw-r--r--config-win32.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/config-win32.h b/config-win32.h
index 6e548dc..7a7adb6 100644
--- a/config-win32.h
+++ b/config-win32.h
@@ -222,6 +222,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
+
/* ---------------------------------------------------------------- */
/* IPV6 COMPATIBILITY */
/* ---------------------------------------------------------------- */