]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Common/WinNtInclude.h
96c17993a1795e7759d922dac2e1948e9ba02120
[mirror_edk2.git] / BaseTools / Source / C / Common / WinNtInclude.h
1 /** @file
2
3 Copyright (c) 2006 - 2008, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13 WinNtInclude.h
14
15 Abstract:
16 Include file for the WinNt Library
17
18 **/
19
20 #ifndef __WIN_NT_INCLUDE_H__
21 #define __WIN_NT_INCLUDE_H__
22
23 #define GUID _WINNT_DUP_GUID_____
24 #define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD
25 #define LIST_ENTRY _WINNT_DUP_LIST_ENTRY
26 #define InterlockedIncrement _WINNT_DUP_InterlockedIncrement
27 #define InterlockedDecrement _WINNT_DUP_InterlockedDecrement
28 #define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64
29 #undef UNALIGNED
30 #undef CONST
31 #undef VOID
32
33 #ifndef __GNUC__
34 #include "windows.h"
35
36 //
37 // Win32 include files do not compile clean with /W4, so we use the warning
38 // pragma to suppress the warnings for Win32 only. This way our code can stil
39 // compile at /W4 (highest warning level) with /WX (warnings cause build
40 // errors).
41 //
42 #pragma warning(disable : 4115)
43 #pragma warning(disable : 4201)
44 #pragma warning(disable : 4214)
45 #pragma warning(disable : 4028)
46 #pragma warning(disable : 4133)
47
48 //
49 // Set the warnings back on as the EFI code must be /W4.
50 //
51 #pragma warning(default : 4115)
52 #pragma warning(default : 4201)
53 #pragma warning(default : 4214)
54
55 #endif
56
57 #undef GUID
58 #undef _LIST_ENTRY
59 #undef LIST_ENTRY
60 #undef InterlockedIncrement
61 #undef InterlockedDecrement
62 #undef InterlockedCompareExchange64
63 #undef InterlockedCompareExchangePointer
64
65 #define VOID void
66
67 //
68 // Prevent collisions with Windows API name macros that deal with Unicode/Not issues
69 //
70 #undef LoadImage
71 #undef CreateEvent
72
73 #endif