WinNtInclude.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /** @file
  2. Include file for the WinNt Library
  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. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  10. **/
  11. #ifndef __WIN_NT_INCLUDE_H__
  12. #define __WIN_NT_INCLUDE_H__
  13. #define GUID _WINNT_DUP_GUID_____
  14. #define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD
  15. #define LIST_ENTRY _WINNT_DUP_LIST_ENTRY
  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. #undef UNALIGNED
  22. #undef CONST
  23. #undef VOID
  24. #ifndef __GNUC__
  25. #include "windows.h"
  26. //
  27. // Win32 include files do not compile clean with /W4, so we use the warning
  28. // pragma to suppress the warnings for Win32 only. This way our code can still
  29. // compile at /W4 (highest warning level) with /WX (warnings cause build
  30. // errors).
  31. //
  32. #pragma warning(disable : 4115)
  33. #pragma warning(disable : 4201)
  34. #pragma warning(disable : 4214)
  35. #pragma warning(disable : 4028)
  36. #pragma warning(disable : 4133)
  37. //
  38. // Set the warnings back on as the EFI code must be /W4.
  39. //
  40. #pragma warning(default : 4115)
  41. #pragma warning(default : 4201)
  42. #pragma warning(default : 4214)
  43. #endif
  44. #undef GUID
  45. #undef _LIST_ENTRY
  46. #undef LIST_ENTRY
  47. #undef InterlockedIncrement
  48. #undef InterlockedDecrement
  49. #undef InterlockedCompareExchange64
  50. #undef InterlockedCompareExchangePointer
  51. #define VOID void
  52. //
  53. // Prevent collisions with Windows API name macros that deal with Unicode/Not issues
  54. //
  55. #undef LoadImage
  56. #undef CreateEvent
  57. #endif