Allow compiling for Windows XP and higher.
This allows us to use getaddrinfo(), getnameinfo() and related functions, which allow tinc to make connections over existing IPv6 networks. These functions are not available on Windows 2000 however. By default, support is enabled, but when compiling for Windows 2000 the configure switch --with-windows2000 should be used. Since getaddrinfo() et al. are not functions but macros on Windows, we have to use AC_CHECK_DECLS() instead of AC_CHECK_FUNCS() in configure.in.
This commit is contained in:
parent
f80bf14f28
commit
fa9bedd47c
7 changed files with 25 additions and 19 deletions
16
have.h
16
have.h
|
@ -31,6 +31,17 @@
|
|||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_MINGW
|
||||
#ifdef WITH_WINDOWS2000
|
||||
#define WINVER Windows2000
|
||||
#else
|
||||
#define WINVER WindowsXP
|
||||
#endif
|
||||
#include <w32api.h>
|
||||
#include <windows.h>
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
@ -160,9 +171,4 @@
|
|||
#include <netinet/if_ether.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MINGW
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#endif /* __TINC_SYSTEM_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue