xref: /aosp_15_r20/external/armnn/profiling/common/include/WindowsWrapper.hpp (revision 89c4ff92f2867872bb9e2354d150bf0c8c502810)
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 // This header brings in the Win32 API header, with some small modifications applied to prevent clashes with our code.
7 
8 #if defined(_MSC_VER)
9 
10 #define NOMINMAX    // Prevent definition of min/max macros that interfere with std::min/max
11 #define WIN32_LEAN_AND_MEAN
12 #include <Windows.h>
13 // Windows.h defines some names that we don't need and interfere with some of our definition
14 #undef TIME_MS      // Instrument.hpp
15 #undef CreateEvent  // ITimelineDecoder.hpp
16 
17 #endif
18 
19 #if defined(__MINGW32__)
20 
21 #define NOMINMAX    // Prevent definition of min/max macros that interfere with std::min/max
22 #define WIN32_LEAN_AND_MEAN
23 #define WINVER 0x0A00
24 #define _WIN32_WINNT 0x0A00
25 #include <windows.h>
26 // Windows.h defines some names that we don't need and interfere with some of our definition
27 #undef TIME_MS      // Instrument.hpp
28 #undef CreateEvent  // ITimelineDecoder.hpp
29 
30 #endif
31