]> granicus.if.org Git - icinga2/blob - lib/base/win32.hpp
Merge pull request #7002 from Icinga/bugfix/check_network-percent-6155
[icinga2] / lib / base / win32.hpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #ifndef WIN32_H
4 #define WIN32_H
5
6 #define WIN32_LEAN_AND_MEAN
7 #ifndef _WIN32_WINNT
8 #define _WIN32_WINNT _WIN32_WINNT_VISTA
9 #endif /* _WIN32_WINNT */
10 #define NOMINMAX
11 #include <winsock2.h>
12 #include <windows.h>
13 #include <ws2tcpip.h>
14 #include <imagehlp.h>
15 #include <shlwapi.h>
16
17 #include <direct.h>
18
19 #ifdef __MINGW32__
20 #       ifndef IPV6_V6ONLY
21 #               define IPV6_V6ONLY 27
22 #       endif /* IPV6_V6ONLY */
23 #endif /* __MINGW32__ */
24
25 typedef int socklen_t;
26 typedef SSIZE_T ssize_t;
27
28 #define MAXPATHLEN MAX_PATH
29
30 #ifdef _MSC_VER
31 typedef DWORD pid_t;
32 #define strcasecmp stricmp
33 #endif /* _MSC_VER */
34
35 #endif /* WIN32_H */