]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
WIN32 availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite
authorYang Tse <yangsita@gmail.com>
Sat, 1 Nov 2008 16:52:57 +0000 (16:52 +0000)
committerYang Tse <yangsita@gmail.com>
Sat, 1 Nov 2008 16:52:57 +0000 (16:52 +0000)
convoluted, compiler dependant and in some cases even build target dependat.

ares/config-win32.h
lib/config-win32.h
src/config-win32.h

index 6e548dcdfa5d1e645c9e32a0b225e571eb910363..7a7adb640824d0130f1e86151bcef657f9802dce 100644 (file)
 #  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                       */
 /* ---------------------------------------------------------------- */
index 5ac22b9ef11a973fa1d884052383fbfe1b023075..b782631ded8578e3a816a5c23ae4d7f7eb28d014 100644 (file)
 #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
 
 #  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                        */
 /* ---------------------------------------------------------------- */
index c32ab17171a51d1cf970aff1729b4112b9d4304a..61471a323e52f2ecd31f199eebde65db8b2cab49 100644 (file)
 #  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                        */
 /* ---------------------------------------------------------------- */