Check for <wspiapi.h> and use it if present

Should help bug #603527 if glib is built in an environment that has
<wspiapi.h>.
This commit is contained in:
Tor Lillqvist
2009-12-14 03:09:46 +02:00
parent cdf00a6a9b
commit 8dc200db04
3 changed files with 16 additions and 1 deletions

View File

@@ -34,6 +34,14 @@
#include "gsimpleasyncresult.h"
#include "gsocketaddress.h"
#ifdef HAVE_WSPIAPI_H
/* <wspiapi.h> in the Windows SDK and in mingw-w64 has wrappers for
* inline workarounds for getaddrinfo, getnameinfo and freeaddrinfo if
* they aren't present at run-time (on Windows 2000).
*/
#include <wspiapi.h>
#endif
#include "gioalias.h"
G_DEFINE_TYPE (GWin32Resolver, g_win32_resolver, G_TYPE_THREADED_RESOLVER)