From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from BN6PR00CU002.outbound.protection.outlook.com (BN6PR00CU002.outbound.protection.outlook.com [52.101.57.22]) by mx.groups.io with SMTP id smtpd.web11.8746.1684802449554276340 for ; Mon, 22 May 2023 17:40:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=BTuBf41B; spf=pass (domain: microsoft.com, ip: 52.101.57.22, mailfrom: aaronpop@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jDj07bqk2lQweh0glclKHnD/MzFM86XvmDy3ng0CgG26OD8o9Jj2/p1s2str44WC6kU41e+oRmIGWe8GmXG/xgzE68JHGJ3xASUb+ZUAk/gRn0tEJAuG1WvPEP6EoTygDlFpzifwuxPIE4zPbo+yGX1AocA+F5gqc5r5OhvcxmZVc+YjUtf8g4mNvLTBnLvVGmFFxXI9iVty7r4kDZI8S+VtjtaL5v7a0B/Hl4IcdPTPPRsnl/3dIMDQ3qAQXsL0GjCuQmDNYaZRKVAA1wcsyClsR6M/EakZ/WDy34cQuDrV4gjmwGuwZ3YDK1Odlr4VLLLmCPUKD0QpYwo/W+S0KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ofyDI0NpSEPMwVPfJN7hQoRCJ/J0NOC/qaQYqppZz1s=; b=WPhhMSNvFM5rPPqC5Q+5pj2zOiYy4t6JDdzQghX4WUmI9+UcCNrt6OItqD7kL3aWSy51BLpxKUmGvoqn+KBmD/ndBlIcveLZG+PoZZ4SHzonBI4yQ20JphCmupznI6FjmF943HSuunCCyNwp03PTdxdcLL72dceEF0j4S7D0Y+R4S161GTv+FFOg7PHaRPiqRz3QL/r/AZubn8Yx7oY2GRjA+j32KHpu0br6XIMoKupioEjZPN3/XUZJkiDqzEBm+Q2cqd7hlXwdRJUGSyoIPYnkJyVL5CRFjfyf9n0iQeV9qGrtBcDTevEliV5h+PixTPApD2At8oSINlK4qPcL+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ofyDI0NpSEPMwVPfJN7hQoRCJ/J0NOC/qaQYqppZz1s=; b=BTuBf41BZ4YQAZrkRF1CmvOv2U7Es96m0CkHZqfILR4N/i7NsbCJ6iJVF0k9CXAMsb0GOQnHvnxKsF44EFdSgIvvbyuWVx0DYsD0mTKuHJQrskpyNYss4FqObSzsyI01x+NBLTUQ/aB/+qKMG51V6qcW5PQQLPSWlBl7CsaSUtY= Received: from MW4PR21MB1940.namprd21.prod.outlook.com (2603:10b6:303:72::13) by DS0PR21MB3881.namprd21.prod.outlook.com (2603:10b6:8:124::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.12; Tue, 23 May 2023 00:40:46 +0000 Received: from MW4PR21MB1940.namprd21.prod.outlook.com ([fe80::a611:2a39:d0ee:ac6f]) by MW4PR21MB1940.namprd21.prod.outlook.com ([fe80::a611:2a39:d0ee:ac6f%7]) with mapi id 15.20.6455.004; Tue, 23 May 2023 00:40:45 +0000 From: aaronpop@microsoft.com To: "devel@edk2.groups.io" CC: "Kinney, Michael D" Subject: GoogleTest Compatibility with MdePkg's IndustyStandard header files Thread-Topic: GoogleTest Compatibility with MdePkg's IndustyStandard header files Thread-Index: AdmNCFzONb90exfORZ2x+UzGvNjL+w== Date: Tue, 23 May 2023 00:40:45 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=6ca6b3d0-a1a7-4645-a98a-43f873bd8465;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-05-22T23:40:24Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR21MB1940:EE_|DS0PR21MB3881:EE_ x-ms-office365-filtering-correlation-id: f32e9b76-c008-49f6-ff0f-08db5b265874 x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LAj5s+mgsNgFhoqWC5jNjemnj/3pOaiR65XPP+lVrE7GzA5TV1h84BagnHfRGOlcEXZKMt84CmqTQ4wOKdRu8esgGbIGRLJmofOJuuFX8u7cVO70BFhTbxjQSPkT7Ci/g1wxfbIWboI2UGuvfRCV2sG1yY26lSdiofJnsxSNWiTmY0cCc7tEDY+87XZ0Mw57PyWiKfSkEn4n2a/za84cG3d2k9+CEn4aodArk3hyxEFGD0iu+vaFqrwNhXf4Z2J96UJLyfmUYa7KIy8a6c41G/pZtpilGRwCs47LZJYzN61XfguOehJaZjbYPxR3rq8aCRcX2DOWz250qFjzNm+Ugm1TWWLsLgWqIg1dYLu1UPIXdFi1GN3Cxsfz73IZTSi93nG6i/FXeB8ig0z6sYILsg0BZti0gkZzq2x9gQj2RS4f8uhWNk/6ZG61wty2API4rGCy7XNq1QwzJ6kpLBq0Qeti8FX9kOgONYl61ZrBKDuVZb2daJSEYpeVNKINjxmjxDVkUgXoVqzcVoqxSWteVLH1tQgkCn6Y8G1vo26zi6SAL/GBxMKsgoOaPrnR0E/PSuQ1jARppNkJTb8M3tXyHSFDfAfEQRt+W8XcsE4wdSslTA7D7lKqrJZKc7i6vMTURXPlS86wYhHjwr8wWOUuE+FTxWFOg/077rdppRHa3cs= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR21MB1940.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(346002)(39860400002)(376002)(366004)(136003)(451199021)(8990500004)(186003)(4744005)(2906002)(86362001)(33656002)(38070700005)(38100700002)(82960400001)(82950400001)(122000001)(55016003)(52536014)(5660300002)(8676002)(8936002)(10290500003)(6916009)(4326008)(66476007)(64756008)(66556008)(76116006)(66946007)(66446008)(7696005)(316002)(478600001)(41300700001)(786003)(71200400001)(9686003)(6506007)(26005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2eVZH7v3uYFX785c6h6gLzfzR1oLt2DreI0CSZp1EAeusVTkrGyojfamrf5U?= =?us-ascii?Q?FHGxbLYNKEzAtIiLAqWv3orV+oz6BxQcjRlskiaRt37i/KaJRKgqzThMqf/s?= =?us-ascii?Q?cOMQs9OjVFmtkKm7bqW9G2oFqz0SDcaPzE/46LNtQTvPpGDMTm9084izxlqt?= =?us-ascii?Q?iAgQNb4qL36W3VqFA/cwXmRORq+QvSCTmDaA5pjPCQdMKWXpHOvqFd2dbc9K?= =?us-ascii?Q?Cf1e3PK1rbp9IuGzfIqc6K7vYH70xMj4EPrDRiG8xwv0vORhB73RFtEV90ql?= =?us-ascii?Q?FAXT7nsUKGBBB4XkETA7LD6ZpNnVRgSfLHkK3js5wlaIyo7ITyGUf3AoBn/M?= =?us-ascii?Q?6/FFfM8NWo7BZaeHvWdQvvle8HisF9xMBfu60LMLhw4cUIk2nsvVgVuY9juc?= =?us-ascii?Q?K8VrNI0jf7YMQsFzE/eWo+KvoabXwc3TD7NHgGeGog7DW919cgxiihic3h07?= =?us-ascii?Q?9dugsTnpiZzF/Q6h2kK34Oroioh68lz7LyAor7z6OBkTh6t5iG6aNAYSQePe?= =?us-ascii?Q?81yuOok4wptFgaROvFw7n7yW6gpEryieKcHLR3WHrG/t00NHjPorNxhIhnko?= =?us-ascii?Q?psByh5HhxEHCVVMSObAWctTYOVYjKvNIZ1MA073rSyAyqEaBJnUBfdV1BRBV?= =?us-ascii?Q?Fgb5GbAar4XIpO3MxFpNLI6u8bO1uuO1iHO8slBXh4+DaEe2AXvXskp8Fsa7?= =?us-ascii?Q?wJxAS3f0to4k54E32g9Zpc5kXTn3utBODjpH+SycAGLTqptYkg+PZpo8pdNU?= =?us-ascii?Q?X7q1lUteR5uy2BB4GfzqSi9RzSLPcgnljZwPh9hAoUl2VTaDfGDbY1F/E3kY?= =?us-ascii?Q?iczqAepZgj+pUTV5ruasImDxHoYNFjnXEUYBFUpmDYSs9OWq6cklcj2tXisn?= =?us-ascii?Q?snq7BGco5x6uo057bF/+1JaPmMpMwfLwcvvctpMKn48x+W5AZsXlcJKGFuqE?= =?us-ascii?Q?z3K4X5K/3WugjVOIkyJgSNBJ8IcKv2UWvvQnvgku7Rfk6gU+GpfpcpKY2zWN?= =?us-ascii?Q?pC0YSZajYxp1QN+O+a6YA+2yg1dQsPptQiTLzV/ZRjFJeXJjttqlvePwazX3?= =?us-ascii?Q?4/4h+i4+s1RozOUhq46iWpnySq37BE5RTf2VUD99/qvtelcfEInv8o0RCblD?= =?us-ascii?Q?PtPNzJeaZPVPfaYZ54emcyb4NA0AT/2j3hqqc9Q+hZodjjFcTIOh9EqXwCgw?= =?us-ascii?Q?UPJ1FAxzpPyp8rM29rn/zWVmzTxq9BOAVFWrckBEJ8EOxlXQfie/rTQoF9Zm?= =?us-ascii?Q?eahgi7DJiq+EmHLTpeCGRBSWB32mHqoXG/HehW6kUwZ2bgahi8kiBzTYwjJA?= =?us-ascii?Q?ps/y6GvcDTKpZUxy1GpPjBRyZ3hw5QGgkoxcPj+tAbS96wkqE2/2twpBrgBV?= =?us-ascii?Q?bYr3edeliOOwMbXrGkeIr7t+B+BvUc+Rp/lKuTkpJOA9le3L5tNbpLDs3Ol8?= =?us-ascii?Q?8kQdW4lzoTTmICsOP/vjnJC9ZMk56a4Bh5nCkYiycMw7Eq39FeJCoTtS957Z?= =?us-ascii?Q?wJc8VAyexvr2VUWY0Gwpbe9WVl59Y1et6Mkn?= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR21MB1940.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f32e9b76-c008-49f6-ff0f-08db5b265874 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2023 00:40:45.3837 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AMnhSu6DnY6cwuQkV0EdTZ+n8qNFymR7b5J7/ywo00QcpfC0HnDN38mWpTMpXqMBvhcqGK28W8UswrX0bq03fA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR21MB3881 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MW4PR21MB19404B34FBE9C39AEE9C26B0DD40AMW4PR21MB1940namp_" --_000_MW4PR21MB19404B34FBE9C39AEE9C26B0DD40AMW4PR21MB1940namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Google Test, and CPP, has more keywords C uses. Tpm12.h and Tpm20.h have references to struct names that are `operator` and= `xor`, both of which trigger build errors because they conflict with CPP's= keywords. Operator triggered a build error in MSVC. Xor only triggered a build error = under GCC, MSVC did not have a problem with it. The work arounds suggested in the call, (using defines to get around the co= nflict) worked for operator, but did not work for xor with gcc. Tpm12.h: TPM_PERMANENT_FLAGS BOOLEAN operator; Tpm20.h: TPMU_SCHEME_KEYEDHASH TPMS_SCHEME_XOR xor; TPMU_SYM_KEY_BITS TPMI_ALG_HASH xor; What is the suggested method of trying to make existing header files compat= ible with google test? Thanks, Aaron --_000_MW4PR21MB19404B34FBE9C39AEE9C26B0DD40AMW4PR21MB1940namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Google Test, and CPP, has more keywords  C uses= .

 

Tpm12.h and Tpm20.h have references to struct names = that are `operator` and `xor`, both of which trigger build errors because t= hey conflict with CPP’s keywords.

 

Operator triggered a build error in MSVC. Xor only t= riggered a build error under GCC, MSVC did not have a problem with it.

 

The work arounds suggested in the call, (using defin= es to get around the conflict) worked for operator, but did not work for xo= r with gcc. 

 

 

Tpm12.h:

TPM_PERMANENT_FLAGS

  BOOLEAN      &n= bsp;            = ;        operator;

 

 

Tpm20.h:

TPMU_SCHEME_KEYEDHASH

  TPMS_SCHEME_XOR  xor;

TPMU_SYM_KEY_BITS

  TPMI_ALG_HASH     xor;

 

 

What is the suggested method of trying to make exist= ing header files compatible with google test?

 

Thanks,

Aaron

--_000_MW4PR21MB19404B34FBE9C39AEE9C26B0DD40AMW4PR21MB1940namp_--