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