WinNtInclude.h 1.6 KB

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