From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: devel@edk2.groups.io
Cc: Liming Gao <gaoliming@byosoft.com.cn>,
Zhiguang Liu <zhiguang.liu@intel.com>,
Oliver Smith-Denny <osde@linux.microsoft.com>,
Pedro Falcato <pedro.falcato@gmail.com>,
Aaron Pop <aaronpop@microsoft.com>
Subject: [Patch 1/2] MdePkg/Include/IndustryStandard: Address C++ keyword collisions
Date: Mon, 29 May 2023 10:06:48 -0700 [thread overview]
Message-ID: <20230529170649.1506-2-michael.d.kinney@intel.com> (raw)
In-Reply-To: <20230529170649.1506-1-michael.d.kinney@intel.com>
Update Tpm12.h and Tpm20.h and not use c++ reserved keywords
operator and xor in C structures to support use of these
include files when building with a C++ compiler.
* Change operator -> Operator
* Change xor -> Xor
NOTE: This is a non-backwards compatible change to Tpm12.h
and Tmp20.h. And consumers of these include files that access
the "operator" or "xor" fields must be updated.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Oliver Smith-Denny <osde@linux.microsoft.com>
Cc: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Aaron Pop <aaronpop@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
MdePkg/Include/IndustryStandard/Tpm12.h | 4 ++--
MdePkg/Include/IndustryStandard/Tpm20.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/MdePkg/Include/IndustryStandard/Tpm12.h b/MdePkg/Include/IndustryStandard/Tpm12.h
index 155dcc9f5f99..147c0863fffd 100644
--- a/MdePkg/Include/IndustryStandard/Tpm12.h
+++ b/MdePkg/Include/IndustryStandard/Tpm12.h
@@ -744,8 +744,8 @@ typedef struct tdTPM_PERMANENT_FLAGS {
BOOLEAN TPMpost;
BOOLEAN TPMpostLock;
BOOLEAN FIPS;
- BOOLEAN operator;
- BOOLEAN enableRevokeEK;
+ BOOLEAN Operator;
+ BOOLEAN enableRevokeEK;
BOOLEAN nvLocked;
BOOLEAN readSRKPub;
BOOLEAN tpmEstablished;
diff --git a/MdePkg/Include/IndustryStandard/Tpm20.h b/MdePkg/Include/IndustryStandard/Tpm20.h
index 4440f3769f26..c827af13efd0 100644
--- a/MdePkg/Include/IndustryStandard/Tpm20.h
+++ b/MdePkg/Include/IndustryStandard/Tpm20.h
@@ -1247,7 +1247,7 @@ typedef union {
TPMI_AES_KEY_BITS aes;
TPMI_SM4_KEY_BITS SM4;
TPM_KEY_BITS sym;
- TPMI_ALG_HASH xor;
+ TPMI_ALG_HASH Xor;
} TPMU_SYM_KEY_BITS;
// Table 123 - TPMU_SYM_MODE Union
@@ -1320,7 +1320,7 @@ typedef struct {
// Table 136 - TPMU_SCHEME_KEYEDHASH Union
typedef union {
TPMS_SCHEME_HMAC hmac;
- TPMS_SCHEME_XOR xor;
+ TPMS_SCHEME_XOR Xor;
} TPMU_SCHEME_KEYEDHASH;
// Table 137 - TPMT_KEYEDHASH_SCHEME Structure
--
2.40.1.windows.1
next prev parent reply other threads:[~2023-05-29 17:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 17:06 [Patch 0/2] Address C++ keyword collisions Michael D Kinney
2023-05-29 17:06 ` Michael D Kinney [this message]
2023-05-30 4:14 ` [edk2-devel] [Patch 1/2] MdePkg/Include/IndustryStandard: " Yao, Jiewen
2023-05-29 17:06 ` [Patch 2/2] SecurityPkg/Library/TpmCommandLib: Change xor to Xor Michael D Kinney
2023-05-30 12:10 ` [Patch 0/2] Address C++ keyword collisions Pedro Falcato
2023-05-30 18:57 ` Michael D Kinney
2023-05-30 16:26 ` [edk2-devel] " Oliver Smith-Denny
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=20230529170649.1506-2-michael.d.kinney@intel.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