]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Common/WinNtInclude.h
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / C / Common / WinNtInclude.h
1 /** @file
2 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
9 #ifndef __WIN_NT_INCLUDE_H__
10 #define __WIN_NT_INCLUDE_H__
11
12 #define GUID _WINNT_DUP_GUID_____
13 #define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD
14 #define LIST_ENTRY _WINNT_DUP_LIST_ENTRY
15
16 #if (_MSC_VER < 1800)
17 #define InterlockedIncrement _WINNT_DUP_InterlockedIncrement
18 #define InterlockedDecrement _WINNT_DUP_InterlockedDecrement
19 #define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64
20 #endif
21
22 #undef UNALIGNED
23 #undef CONST
24 #undef VOID
25
26 #ifndef __GNUC__
27 #include "windows.h"
28
29 //
30 // Win32 include files do not compile clean with /W4, so we use the warning
31 // pragma to suppress the warnings for Win32 only. This way our code can still
32 // compile at /W4 (highest warning level) with /WX (warnings cause build
33 // errors).
34 //
35 #pragma warning(disable : 4115)
36 #pragma warning(disable : 4201)
37 #pragma warning(disable : 4214)
38 #pragma warning(disable : 4028)
39 #pragma warning(disable : 4133)
40
41 //
42 // Set the warnings back on as the EFI code must be /W4.
43 //
44 #pragma warning(default : 4115)
45 #pragma warning(default : 4201)
46 #pragma warning(default : 4214)
47
48 #endif
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
58 #define VOID void
59
60 //
61 // Prevent collisions with Windows API name macros that deal with Unicode/Not issues
62 //
63 #undef LoadImage
64 #undef CreateEvent
65
66 #endif