[v8,14/14] eal: do not define typeof macro when building with MSVC

Message ID 1682997341-2271-15-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Series msvc integration changes |


Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-testing warning Testing issues
ci/iol-x86_64-unit-testing success Testing PASS
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-broadcom-Functional fail Functional Testing issues

Commit Message

Tyler Retzlaff May 2, 2023, 3:15 a.m. UTC
  When building with MSVC do not assume typeof is a macro and don't
define a typeof macro that conflicts with C23 typeof keyword.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
 lib/eal/include/rte_common.h | 2 ++
 1 file changed, 2 insertions(+)


diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index 0c55a23..ce66287 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -24,9 +24,11 @@ 
 /* OS specific include */
 #include <rte_os.h>
 #ifndef typeof
 #define typeof __typeof__
 #ifndef __cplusplus
 #ifndef asm