X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fhave.h;h=f19c599288cc9bc7b100cf1980bb80efa9169653;hb=cfc9fee931c70554353ce6c4acc3407baac08745;hp=318d549f295eb897720e120cad3dece6c6415b30;hpb=0cd2953d4136a72ddb38b54054f63d497b0e5526;p=tinc diff --git a/src/have.h b/src/have.h index 318d549f..f19c5992 100644 --- a/src/have.h +++ b/src/have.h @@ -4,7 +4,7 @@ /* have.h -- include headers which are known to exist Copyright (C) 1998-2005 Ivo Timmermans - 2003-2016 Guus Sliepen + 2003-2021 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,8 +22,11 @@ */ #ifdef HAVE_MINGW -#define WINVER WindowsXP +#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_ALLOCA_H +#include +#elif defined(HAVE_NETBSD) +#define alloca(size) __builtin_alloca(size) +#endif + #ifdef HAVE_MINGW +#ifdef HAVE_W32API_H #include +#endif + #include #include #include + +#ifdef _MSC_VER +#include +#include +#include #endif +#endif // HAVE_MINGW #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,