]> git.proxmox.com Git - mirror_edk2.git/blob - EmulatorPkg/Win/Host/WinInclude.h
EmulatorPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / EmulatorPkg / Win / Host / WinInclude.h
1 /**@file
2 Public include file for the WinNt Library
3
4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 **/
7
8 #ifndef __WIN_NT_INCLUDE_H__
9 #define __WIN_NT_INCLUDE_H__
10
11 //
12 // Win32 include files do not compile clean with /W4, so we use the warning
13 // pragma to suppress the warnings for Win32 only. This way our code can stil
14 // compile at /W4 (highest warning level) with /WX (warnings cause build
15 // errors).
16 //
17 #pragma warning(disable : 4115)
18 #pragma warning(disable : 4201)
19 #pragma warning(disable : 4028)
20 #pragma warning(disable : 4133)
21
22 #define GUID _WINNT_DUP_GUID_____
23 #define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD
24 #define LIST_ENTRY _WINNT_DUP_LIST_ENTRY
25 #if defined (MDE_CPU_IA32) && (_MSC_VER < 1800)
26 #define InterlockedIncrement _WINNT_DUP_InterlockedIncrement
27 #define InterlockedDecrement _WINNT_DUP_InterlockedDecrement
28 #define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64
29 #endif
30 #undef UNALIGNED
31 #undef CONST
32 #undef VOID
33 #undef DEBUG_EVENT
34
35 // WQBugBug: This typedef is to make "windows.h" buildable.
36 // It should be removed after the root cause why
37 // size_t is undefined when go into the line below is found.
38 #if defined (MDE_CPU_IA32)
39 typedef UINT32 size_t ;
40 #endif
41
42 #include "windows.h"
43
44 #undef GUID
45 #undef _LIST_ENTRY
46 #undef LIST_ENTRY
47 #undef InterlockedIncrement
48 #undef InterlockedDecrement
49 #undef InterlockedCompareExchange64
50 #undef InterlockedCompareExchangePointer
51 #undef CreateEventEx
52
53 #define VOID void
54
55 //
56 // Prevent collisions with Windows API name macros that deal with Unicode/Not issues
57 //
58 #undef LoadImage
59 #undef CreateEvent
60 #undef FAR
61
62 //
63 // Set the warnings back on as the EFI code must be /W4.
64 //
65 #pragma warning(default : 4115)
66 #pragma warning(default : 4201)
67
68
69 #endif