]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/CodeTools/Source/Common/WinNtInclude.h
More renames for Tool Packages
[mirror_edk2.git] / Tools / CodeTools / Source / Common / WinNtInclude.h
diff --git a/Tools/CodeTools/Source/Common/WinNtInclude.h b/Tools/CodeTools/Source/Common/WinNtInclude.h
new file mode 100644 (file)
index 0000000..80e45b4
--- /dev/null
@@ -0,0 +1,73 @@
+/*--\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+  WinNtInclude.h\r
+\r
+Abstract:\r
+  Include file for the WinNt Library\r
+\r
+--*/\r
+\r
+#ifndef __WIN_NT_INCLUDE_H__\r
+#define __WIN_NT_INCLUDE_H__\r
+\r
+//\r
+// Win32 include files do not compile clean with /W4, so we use the warning\r
+// pragma to suppress the warnings for Win32 only. This way our code can stil\r
+// compile at /W4 (highest warning level) with /WX (warnings cause build\r
+// errors).\r
+//\r
+#pragma warning(disable : 4115)\r
+#pragma warning(disable : 4201)\r
+#pragma warning(disable : 4214)\r
+#pragma warning(disable : 4028)\r
+#pragma warning(disable : 4133)\r
+\r
+#define GUID  _WINNT_DUP_GUID_____\r
+#define _LIST_ENTRY  _WINNT_DUP_LIST_ENTRY_FORWARD\r
+#define LIST_ENTRY   _WINNT_DUP_LIST_ENTRY\r
+#define InterlockedIncrement _WINNT_DUP_InterlockedIncrement\r
+#define InterlockedDecrement _WINNT_DUP_InterlockedDecrement\r
+#define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64\r
+#undef UNALIGNED\r
+#undef CONST\r
+#undef VOID\r
+\r
+#ifndef __GNUC__\r
+#include "windows.h"\r
+#endif\r
+\r
+#undef GUID\r
+#undef _LIST_ENTRY\r
+#undef LIST_ENTRY\r
+#undef InterlockedIncrement\r
+#undef InterlockedDecrement\r
+#undef InterlockedCompareExchange64\r
+#undef InterlockedCompareExchangePointer\r
+\r
+#define VOID void\r
+\r
+//\r
+// Prevent collisions with Windows API name macros that deal with Unicode/Not issues\r
+//\r
+#undef LoadImage\r
+#undef CreateEvent\r
+\r
+//\r
+// Set the warnings back on as the EFI code must be /W4.\r
+//\r
+#pragma warning(default : 4115)\r
+#pragma warning(default : 4201)\r
+#pragma warning(default : 4214)\r
+\r
+\r
+#endif\r