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