Reviewed-by: Jiewen Yao <jiewen....@intel.com> > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael D > Kinney > Sent: Tuesday, May 30, 2023 1:07 AM > To: devel@edk2.groups.io > Cc: Gao, Liming <gaolim...@byosoft.com.cn>; Liu, Zhiguang > <zhiguang....@intel.com>; Oliver Smith-Denny <o...@linux.microsoft.com>; > Pedro Falcato <pedro.falc...@gmail.com>; Pop, Aaron > <aaron...@microsoft.com> > Subject: [edk2-devel] [Patch 1/2] MdePkg/Include/IndustryStandard: Address > C++ keyword collisions > > 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 <gaolim...@byosoft.com.cn> > Cc: Zhiguang Liu <zhiguang....@intel.com> > Cc: Oliver Smith-Denny <o...@linux.microsoft.com> > Cc: Pedro Falcato <pedro.falc...@gmail.com> > Cc: Aaron Pop <aaron...@microsoft.com> > Signed-off-by: Michael D Kinney <michael.d.kin...@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 > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#105403): https://edk2.groups.io/g/devel/message/105403 Mute This Topic: https://groups.io/mt/99204100/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-