]> git.proxmox.com Git - mirror_edk2.git/blob - EmulatorPkg/Win/Host/WinInclude.h
EmulatorPkg/Win: Add Windows host support
[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 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 **/
13
14 #ifndef __WIN_NT_INCLUDE_H__
15 #define __WIN_NT_INCLUDE_H__
16
17 //
18 // Win32 include files do not compile clean with /W4, so we use the warning
19 // pragma to suppress the warnings for Win32 only. This way our code can stil
20 // compile at /W4 (highest warning level) with /WX (warnings cause build
21 // errors).
22 //
23 #pragma warning(disable : 4115)
24 #pragma warning(disable : 4201)
25 #pragma warning(disable : 4028)
26 #pragma warning(disable : 4133)
27
28 #define GUID _WINNT_DUP_GUID_____
29 #define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD
30 #define LIST_ENTRY _WINNT_DUP_LIST_ENTRY
31 #if defined (MDE_CPU_IA32) && (_MSC_VER < 1800)
32 #define InterlockedIncrement _WINNT_DUP_InterlockedIncrement
33 #define InterlockedDecrement _WINNT_DUP_InterlockedDecrement
34 #define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64
35 #endif
36 #undef UNALIGNED
37 #undef CONST
38 #undef VOID
39 #undef DEBUG_EVENT
40
41 // WQBugBug: This typedef is to make "windows.h" buildable.
42 // It should be removed after the root cause why
43 // size_t is undefined when go into the line below is found.
44 #if defined (MDE_CPU_IA32)
45 typedef UINT32 size_t ;
46 #endif
47
48 #include "windows.h"
49
50 #undef GUID
51 #undef _LIST_ENTRY
52 #undef LIST_ENTRY
53 #undef InterlockedIncrement
54 #undef InterlockedDecrement
55 #undef InterlockedCompareExchange64
56 #undef InterlockedCompareExchangePointer
57 #undef CreateEventEx
58
59 #define VOID void
60
61 //
62 // Prevent collisions with Windows API name macros that deal with Unicode/Not issues
63 //
64 #undef LoadImage
65 #undef CreateEvent
66 #undef FAR
67
68 //
69 // Set the warnings back on as the EFI code must be /W4.
70 //
71 #pragma warning(default : 4115)
72 #pragma warning(default : 4201)
73
74
75 #endif