#include "memdebug.h"
#endif
+/*
+ * This is a wrapper function for freeing name information in a protocol
+ * independent way. This takes care of using the appropriate underlaying
+ * proper function.
+ */
+void Curl_freeaddrinfo(void *freethis)
+{
+#ifdef ENABLE_IPV6
+ freeaddrinfo(freethis);
+#else
+ free(freethis);
+#endif
+}
+
/* --- resolve name or IP-number --- */
#ifdef ENABLE_IPV6
#endif
-/*
- * This is a wrapper function for freeing name information in a protocol
- * independent way. This takes care of using the appropriate underlaying
- * proper function.
- */
-void Curl_freeaddrinfo(void *freethis)
-{
-#ifdef ENABLE_IPV6
- freeaddrinfo(freethis);
-#else
- free(freethis);
-#endif
-}
-
/*
* Return name information about the given hostname and port number. If
* successful, the 'addrinfo' is returned and the forth argument will point to
}
#else /* following code is IPv4-only */
+#ifndef HAVE_GETHOSTBYNAME_R
/**
* Performs a "deep" copy of a hostent into a buffer
* (returns a pointer to the copy).
return copy;
}
+#endif
static char *MakeIP(unsigned long num,char *addr, int addr_len)
{