-#include <windows.h>
+#include "winapi.h"
+#include <shellapi.h>
#include <msp/stringcodec/utf16.h>
#include <msp/stringcodec/utf8.h>
#include "application.h"
#ifndef MSP_CORE_MODULE_PLATFORM_H_
#define MSP_CORE_MODULE_PLATFORM_H_
-#include <windows.h>
+#include "winapi.h"
namespace Msp {
-#include <windows.h>
+#include "winapi.h"
#include "mutex.h"
#include "mutex_private.h"
#ifndef MSP_CORE_MUTEX_PLATFORM_H_
#define MSP_CORE_MUTEX_PLATFORM_H_
-#include <windows.h>
+#include "winapi.h"
namespace Msp {
-#include <windows.h>
+#include "winapi.h"
#include <msp/core/systemerror.h>
#include <msp/io/handle_private.h>
#include <msp/strings/utils.h>
#ifndef MSP_CORE_PROCESS_PLATFORM_H_
#define MSP_CORE_PROCESS_PLATFORM_H_
-#include <windows.h>
+#include "winapi.h"
namespace Msp {
-#include <windows.h>
+#include "winapi.h"
#include <msp/core/systemerror.h>
#include <msp/time/timedelta.h>
#include "semaphore.h"
-#include <windows.h>
+#include "winapi.h"
#include <msp/strings/lexicalcast.h>
#include "systemerror.h"
-#include <windows.h>
+#include "winapi.h"
#include "thread.h"
#include "thread_private.h"
#ifndef MSP_CORE_THREAD_PLATFORM_H_
#define MSP_CORE_THREAD_PLATFORM_H_
-#include <windows.h>
+#include "winapi.h"
namespace Msp {
--- /dev/null
+#ifndef MSP_CORE_WINAPI_H_
+#define MSP_CORE_WINAPI_H_
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+#include <windows.h>
+
+#endif
-#include <windows.h>
+#include <msp/core/winapi.h>
#include <msp/core/mutex.h>
#include <msp/core/systemerror.h>
#include <msp/strings/regex.h>
-#include <windows.h>
+#include <msp/core/winapi.h>
#include <aclapi.h>
#include <msp/core/systemerror.h>
#include <msp/strings/format.h>
#ifndef MSP_FS_STAT_PLATFORM_H_
#define MSP_FS_STAT_PLATFORM_H_
-#include <windows.h>
+#include <msp/core/winapi.h>
namespace Msp {
namespace FS {
-#include <windows.h>
+#include <msp/core/winapi.h>
#include <msp/core/except.h>
#include <msp/core/systemerror.h>
#include "dir.h"
-#include <windows.h>
+#include <msp/core/winapi.h>
#include <algorithm>
#include <msp/core/systemerror.h>
#include "eventreader.h"
#ifndef MSP_IO_HANDLE_PLATFORM_H_
#define MSP_IO_HANDLE_PLATFORM_H_
-#include <windows.h>
+#include <msp/core/winapi.h>
namespace Msp {
namespace IO {
#ifndef MSP_IO_POLL_PLATFORM_H_
#define MSP_IO_POLL_PLATFORM_H_
-#include <windows.h>
+#include <msp/core/winapi.h>
#include <vector>
#include "poll.h"
-#include <windows.h>
+#include <msp/core/winapi.h>
#include <msp/core/systemerror.h>
#include "handle.h"
#include "handle_private.h"
#ifndef MSP_IO_SERIAL_PLATFORM_H_
#define MSP_IO_SERIAL_PLATFORM_H_
-#include <windows.h>
+#include <msp/core/winapi.h>
namespace Msp {
namespace IO {
#ifndef MSP_TIME_RAWTIME_PLATFORM_H_
#define MSP_TIME_RAWTIME_PLATFORM_H_
-#include <windows.h>
+#include <msp/core/winapi.h>
#include "rawtime.h"
namespace Msp {
-#include <windows.h>
+#include <msp/core/winapi.h>
#include <msp/core/systemerror.h>
#include "timezone.h"
-#include <windows.h>
+#include <msp/core/winapi.h>
#include "rawtime_private.h"
#include "timedelta.h"
#include "timestamp.h"