public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	Rebecca Cran <rebecca@bsdio.com>, Andrew Fish <afish@apple.com>
Subject: Re: [edk2-devel] [Patch 1/2] EmulatorPkg/Win/Host: Fix RUNTIME_FUNCTION redefinition error
Date: Mon, 24 Jul 2023 01:56:45 +0000	[thread overview]
Message-ID: <MN6PR11MB8244397988E6BC974BEEAA6D8C02A@MN6PR11MB8244.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230722010622.1708-2-michael.d.kinney@intel.com>

Reviewed-by: Ray Ni <ray.ni@intel.com>

> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Saturday, July 22, 2023 9:06 AM
> To: devel@edk2.groups.io
> Cc: Gerd Hoffmann <kraxel@redhat.com>; Rebecca Cran <rebecca@bsdio.com>;
> Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [Patch 1/2] 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>
> ---
>  EmulatorPkg/Win/Host/WinInclude.h | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/EmulatorPkg/Win/Host/WinInclude.h
> b/EmulatorPkg/Win/Host/WinInclude.h
> index c2b6cfa3d658..877d2b0ed016 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
> --
> 2.40.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107151): https://edk2.groups.io/g/devel/message/107151
Mute This Topic: https://groups.io/mt/100288521/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-07-24  1:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-22  1:06 [edk2-devel] [Patch 0/2] Move RUNTIME_FUNCTION redefintion fix to EmulatorPkg Michael D Kinney
2023-07-22  1:06 ` [edk2-devel] [Patch 1/2] EmulatorPkg/Win/Host: Fix RUNTIME_FUNCTION redefinition error Michael D Kinney
2023-07-24  1:56   ` Ni, Ray [this message]
2023-07-22  1:06 ` [edk2-devel] [Patch 2/2] MdePkg/Include/IndustryStandard: Remove VS20xx workaround Michael D Kinney
2023-07-24  1:09 ` [edk2-devel] 回复: [Patch 0/2] Move RUNTIME_FUNCTION redefintion fix to EmulatorPkg gaoliming via groups.io
2023-07-24  1:11 ` [edk2-devel] " Rebecca Cran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN6PR11MB8244397988E6BC974BEEAA6D8C02A@MN6PR11MB8244.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox