projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
meson: use Python script for version detection
[tinc]
/
src
/
have.h
diff --git
a/src/have.h
b/src/have.h
index
d1dd91d
..
36d17b6
100644
(file)
--- a/
src/have.h
+++ b/
src/have.h
@@
-21,10
+21,12
@@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifdef HAVE_
MINGW
+#ifdef HAVE_
WINDOWS
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#define WIN32_LEAN_AND_MEAN
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#define WIN32_LEAN_AND_MEAN
+#define _CRT_SECURE_NO_WARNINGS
+#define _CRT_NONSTDC_NO_WARNINGS
#endif
#include <stdio.h>
#endif
#include <stdio.h>
@@
-36,17
+38,34
@@
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <unistd.h>
+#endif
#include <limits.h>
#include <math.h>
#include <time.h>
#include <limits.h>
#include <math.h>
#include <time.h>
-#ifdef HAVE_MINGW
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#elif defined(HAVE_NETBSD)
+#define alloca(size) __builtin_alloca(size)
+#endif
+
+#ifdef HAVE_WINDOWS
+#ifdef HAVE_W32API_H
#include <w32api.h>
#include <w32api.h>
+#endif
+
#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
+
+#ifdef _MSC_VER
+#include <io.h>
+#include <process.h>
+#include <direct.h>
#endif
#endif
+#endif // HAVE_WINDOWS
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#ifdef HAVE_TERMIOS_H
#include <termios.h>
@@
-109,6
+128,8
@@
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#ifdef HAVE_DIRENT_H
#include <dirent.h>
+#elif defined(_MSC_VER)
+#include "dirent.h"
#endif
/* SunOS really wants sys/socket.h BEFORE net/if.h,
#endif
/* SunOS really wants sys/socket.h BEFORE net/if.h,
@@
-216,7
+237,7
@@
#undef STATUS
#endif
#undef STATUS
#endif
-#ifdef HAVE_
MINGW
+#ifdef HAVE_
WINDOWS
#define SLASH "\\"
#else
#define SLASH "/"
#define SLASH "\\"
#else
#define SLASH "/"