]> git.proxmox.com Git - mirror_edk2.git/blob - Nt32Pkg/Include/Common/WinNTInclude.h
345d15d37676f9099c2b4712b2be87a690183a34
[mirror_edk2.git] / Nt32Pkg / Include / Common / WinNTInclude.h
1 /**@file
2
3 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5
6 Module Name:
7 WinNtLib.h
8
9 Abstract:
10 Public include file for the WinNt Library
11
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
67 //
68 // Set the warnings back on as the EFI code must be /W4.
69 //
70 #pragma warning(default : 4115)
71 #pragma warning(default : 4201)
72
73
74 #endif