X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fhave.h;h=36d17b6096d3cca7dbe65c68d70131d785c7d8c6;hb=373b0c12d9d0e8a3b449fd18be704e28dd6403e1;hp=bb236622e98f01eeb0a5fc7357fe4f7ce7ff17f4;hpb=0345a1468613e1ba4a4aa6dbbef44a26f1eb42d9;p=tinc diff --git a/src/have.h b/src/have.h index bb236622..36d17b60 100644 --- a/src/have.h +++ b/src/have.h @@ -21,9 +21,12 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifdef HAVE_MINGW -#define WINVER WindowsXP +#ifdef HAVE_WINDOWS +#define WINVER 0x0600 +#define _WIN32_WINNT 0x0600 #define WIN32_LEAN_AND_MEAN +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS #endif #include @@ -35,17 +38,34 @@ #include #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include #include #include -#ifdef HAVE_MINGW +#ifdef HAVE_ALLOCA_H +#include +#elif defined(HAVE_NETBSD) +#define alloca(size) __builtin_alloca(size) +#endif + +#ifdef HAVE_WINDOWS +#ifdef HAVE_W32API_H #include +#endif + #include #include #include + +#ifdef _MSC_VER +#include +#include +#include #endif +#endif // HAVE_WINDOWS #ifdef HAVE_TERMIOS_H #include @@ -82,6 +102,10 @@ #include #endif +#ifdef HAVE_SYS_MMAN_H +#include +#endif + #ifdef HAVE_SYS_WAIT_H #include #endif @@ -104,6 +128,8 @@ #ifdef HAVE_DIRENT_H #include +#elif defined(_MSC_VER) +#include "dirent.h" #endif /* SunOS really wants sys/socket.h BEFORE net/if.h, @@ -211,7 +237,7 @@ #undef STATUS #endif -#ifdef HAVE_MINGW +#ifdef HAVE_WINDOWS #define SLASH "\\" #else #define SLASH "/"