summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2023-07-21 08:53:24 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-07-24 03:57:52 +0000
commit5309ddc83bd51740dd28a3ba253a0ae9999738f0 (patch)
tree6b598c9abc2c64e90023d32bb30b991157bedd69 /EmulatorPkg
parent925c445fd37bf529ca78f9d6c416cca37c7e6da5 (diff)
downloadedk2-5309ddc83bd51740dd28a3ba253a0ae9999738f0.tar.gz
edk2-5309ddc83bd51740dd28a3ba253a0ae9999738f0.tar.bz2
edk2-5309ddc83bd51740dd28a3ba253a0ae9999738f0.zip
EmulatorPkg/Win/Host: Fix RUNTIME_FUNCTION redefinition error
Update WinInclude.h to prevent error due to redefinition of RUNTIME_FUNCTION using same technique that has been used in the past for structure types such as LIST_ENTRY. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Diffstat (limited to 'EmulatorPkg')
-rw-r--r--EmulatorPkg/Win/Host/WinInclude.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/EmulatorPkg/Win/Host/WinInclude.h b/EmulatorPkg/Win/Host/WinInclude.h
index c2b6cfa3d6..877d2b0ed0 100644
--- a/EmulatorPkg/Win/Host/WinInclude.h
+++ b/EmulatorPkg/Win/Host/WinInclude.h
@@ -10,7 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
// Win32 include files do not compile clean with /W4, so we use the warning
-// pragma to suppress the warnings for Win32 only. This way our code can stil
+// pragma to suppress the warnings for Win32 only. This way our code can still
// compile at /W4 (highest warning level) with /WX (warnings cause build
// errors).
//
@@ -19,9 +19,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#pragma warning(disable : 4028)
#pragma warning(disable : 4133)
-#define GUID _WINNT_DUP_GUID_____
-#define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD
-#define LIST_ENTRY _WINNT_DUP_LIST_ENTRY
+#define GUID _WINNT_DUP_GUID_____
+#define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD
+#define LIST_ENTRY _WINNT_DUP_LIST_ENTRY
+#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION
#if defined (MDE_CPU_IA32) && (_MSC_VER < 1800)
#define InterlockedIncrement _WINNT_DUP_InterlockedIncrement
#define InterlockedDecrement _WINNT_DUP_InterlockedDecrement
@@ -45,6 +46,7 @@ typedef UINT32 size_t;
#undef GUID
#undef _LIST_ENTRY
#undef LIST_ENTRY
+#undef RUNTIME_FUNCTION
#undef InterlockedIncrement
#undef InterlockedDecrement
#undef InterlockedCompareExchange64