Allow compiling for Windows XP and higher.
[tinc] / lib / fake-getaddrinfo.h
index 6b1744c..d31a89a 100644 (file)
@@ -1,14 +1,8 @@
-/* $Id: fake-getaddrinfo.h,v 1.1.2.1 2002/07/12 11:45:21 guus Exp $ */
+/* $Id$ */
 
 #ifndef _FAKE_GETADDRINFO_H
 #define _FAKE_GETADDRINFO_H
 
-#include "config.h"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-
 #include "fake-gai-errnos.h"
 
 #ifndef AI_PASSIVE
 # define NI_NUMERICSERV    8
 #endif
 
+#ifndef AI_NUMERICHOST
+#define AI_NUMERICHOST 4
+#endif
+
 #ifndef HAVE_STRUCT_ADDRINFO
 struct addrinfo {
        int     ai_flags;       /* AI_PASSIVE, AI_CANONNAME */
@@ -35,16 +33,16 @@ struct addrinfo {
 };
 #endif /* !HAVE_STRUCT_ADDRINFO */
 
-#ifndef HAVE_GETADDRINFO
+#if !HAVE_DECL_GETADDRINFO
 int getaddrinfo(const char *hostname, const char *servname, 
                 const struct addrinfo *hints, struct addrinfo **res);
 #endif /* !HAVE_GETADDRINFO */
 
-#ifndef HAVE_GAI_STRERROR
+#if !HAVE_DECL_GAI_STRERROR
 char *gai_strerror(int ecode);
 #endif /* !HAVE_GAI_STRERROR */
 
-#ifndef HAVE_FREEADDRINFO
+#if !HAVE_DECL_FREEADDRINFO
 void freeaddrinfo(struct addrinfo *ai);
 #endif /* !HAVE_FREEADDRINFO */