X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fhave.h;h=36d17b6096d3cca7dbe65c68d70131d785c7d8c6;hb=373b0c12d9d0e8a3b449fd18be704e28dd6403e1;hp=6d65bcd354e611649cdea163517a05db266ad594;hpb=e70b5b5bd77bb66e8dd324c17d86d9bff151aa82;p=tinc diff --git a/src/have.h b/src/have.h index 6d65bcd3..36d17b60 100644 --- a/src/have.h +++ b/src/have.h @@ -1,7 +1,10 @@ +#ifndef TINC_HAVE_H +#define TINC_HAVE_H + /* have.h -- include headers which are known to exist Copyright (C) 1998-2005 Ivo Timmermans - 2003-2012 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 @@ -18,38 +21,51 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __TINC_HAVE_H__ -#define __TINC_HAVE_H__ - -#ifdef HAVE_MINGW -#ifdef WITH_WINDOWS2000 -#define WINVER Windows2000 -#else -#define WINVER WindowsXP -#endif +#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 #include #include +#include #include #include #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_WINDOWS +#ifdef HAVE_W32API_H #include +#endif + #include #include #include -#endif -#ifdef HAVE_STDBOOL_H -#include +#ifdef _MSC_VER +#include +#include +#include #endif +#endif // HAVE_WINDOWS #ifdef HAVE_TERMIOS_H #include @@ -61,6 +77,10 @@ /* Include system specific headers */ +#ifdef HAVE_STDDEF_H +#include +#endif + #ifdef HAVE_SYSLOG_H #include #endif @@ -69,9 +89,6 @@ #include #endif -#ifdef HAVE_TIME_H -#include -#endif #ifdef HAVE_SYS_TYPES_H #include @@ -85,6 +102,10 @@ #include #endif +#ifdef HAVE_SYS_MMAN_H +#include +#endif + #ifdef HAVE_SYS_WAIT_H #include #endif @@ -101,16 +122,14 @@ #include #endif -#ifdef HAVE_SYS_UIO_H -#include -#endif - #ifdef HAVE_SYS_UN_H #include #endif #ifdef HAVE_DIRENT_H #include +#elif defined(_MSC_VER) +#include "dirent.h" #endif /* SunOS really wants sys/socket.h BEFORE net/if.h, @@ -196,10 +215,32 @@ #include #endif -#ifdef HAVE_MINGW +#ifdef HAVE_ARPA_NAMESER_H +#include +#endif + +#ifdef HAVE_RESOLV_H +#include +#endif + +#ifdef HAVE_LINUX_IF_TUN_H +#include +#endif + +#ifdef HAVE_GETOPT_H +#include +#else +#include "getopt.h" +#endif + +#ifdef STATUS +#undef STATUS +#endif + +#ifdef HAVE_WINDOWS #define SLASH "\\" #else #define SLASH "/" #endif -#endif /* __TINC_SYSTEM_H__ */ +#endif