Vishal Bhoj | 82c8071 | 2015-12-15 21:13:33 +0530 | [diff] [blame^] | 1 | /**@file
|
| 2 |
|
| 3 | Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
| 4 | 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 | WinNtLib.h
|
| 14 |
|
| 15 | Abstract:
|
| 16 | Public include file for the WinNt Library
|
| 17 |
|
| 18 | **/
|
| 19 |
|
| 20 | #ifndef __WIN_NT_INCLUDE_H__
|
| 21 | #define __WIN_NT_INCLUDE_H__
|
| 22 |
|
| 23 | //
|
| 24 | // Win32 include files do not compile clean with /W4, so we use the warning
|
| 25 | // pragma to suppress the warnings for Win32 only. This way our code can stil
|
| 26 | // compile at /W4 (highest warning level) with /WX (warnings cause build
|
| 27 | // errors).
|
| 28 | //
|
| 29 | #pragma warning(disable : 4115)
|
| 30 | #pragma warning(disable : 4201)
|
| 31 | #pragma warning(disable : 4028)
|
| 32 | #pragma warning(disable : 4133)
|
| 33 |
|
| 34 | #define GUID _WINNT_DUP_GUID_____
|
| 35 | #define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD
|
| 36 | #define LIST_ENTRY _WINNT_DUP_LIST_ENTRY
|
| 37 | #if defined (MDE_CPU_IA32) && (_MSC_VER < 1800)
|
| 38 | #define InterlockedIncrement _WINNT_DUP_InterlockedIncrement
|
| 39 | #define InterlockedDecrement _WINNT_DUP_InterlockedDecrement
|
| 40 | #define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64
|
| 41 | #endif
|
| 42 | #undef UNALIGNED
|
| 43 | #undef CONST
|
| 44 | #undef VOID
|
| 45 | #undef DEBUG_EVENT
|
| 46 |
|
| 47 | // WQBugBug: This typedef is to make "windows.h" buildable.
|
| 48 | // It should be removed after the root cause why
|
| 49 | // size_t is undefined when go into the line below is found.
|
| 50 | #if defined (MDE_CPU_IA32)
|
| 51 | typedef UINT32 size_t ;
|
| 52 | #endif
|
| 53 |
|
| 54 | #include "windows.h"
|
| 55 |
|
| 56 | #undef GUID
|
| 57 | #undef _LIST_ENTRY
|
| 58 | #undef LIST_ENTRY
|
| 59 | #undef InterlockedIncrement
|
| 60 | #undef InterlockedDecrement
|
| 61 | #undef InterlockedCompareExchange64
|
| 62 | #undef InterlockedCompareExchangePointer
|
| 63 | #undef CreateEventEx
|
| 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 | //
|
| 74 | // Set the warnings back on as the EFI code must be /W4.
|
| 75 | //
|
| 76 | #pragma warning(default : 4115)
|
| 77 | #pragma warning(default : 4201)
|
| 78 |
|
| 79 |
|
| 80 | #endif
|