summaryrefslogtreecommitdiff
path: root/compat/mingw.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2009-11-23 22:55:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-11-24 08:58:17 (GMT)
commitfe3b2b7b827c75c21d61933e073050b6840f6dbc (patch)
treeba6cf588d0733dfdfc518a769ce368767c252af9 /compat/mingw.h
parentb7cc9f82594a2d5fe12867c515d86d91ecedad8f (diff)
downloadgit-fe3b2b7b827c75c21d61933e073050b6840f6dbc.zip
git-fe3b2b7b827c75c21d61933e073050b6840f6dbc.tar.gz
git-fe3b2b7b827c75c21d61933e073050b6840f6dbc.tar.bz2
Enable support for IPv6 on MinGW
The IPv6 support functions are loaded dynamically, to maintain backwards compatibility with versions of Windows prior to XP, and fallback wrappers are provided, implemented in terms of gethostbyname and gethostbyaddr. Signed-off-by: Martin Storsjo <martin@martin.st> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/mingw.h')
-rw-r--r--compat/mingw.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index 51993ef..b3d299f 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -1,4 +1,5 @@
#include <winsock2.h>
+#include <ws2tcpip.h>
/*
* things that are not available in header files
@@ -178,6 +179,18 @@ char *mingw_getenv(const char *name);
struct hostent *mingw_gethostbyname(const char *host);
#define gethostbyname mingw_gethostbyname
+void mingw_freeaddrinfo(struct addrinfo *res);
+#define freeaddrinfo mingw_freeaddrinfo
+
+int mingw_getaddrinfo(const char *node, const char *service,
+ const struct addrinfo *hints, struct addrinfo **res);
+#define getaddrinfo mingw_getaddrinfo
+
+int mingw_getnameinfo(const struct sockaddr *sa, socklen_t salen,
+ char *host, DWORD hostlen, char *serv, DWORD servlen,
+ int flags);
+#define getnameinfo mingw_getnameinfo
+
int mingw_socket(int domain, int type, int protocol);
#define socket mingw_socket