From: David Marchand Date: Fri, 13 Nov 2015 09:35:25 +0000 (+0100) Subject: eal: revert C++ app build fix X-Git-Tag: spdx-start~8018 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e103df6b73a46db52b8d161faa72e4cf9d11670c;p=dpdk.git eal: revert C++ app build fix It does not build with every C++ compilers. Reverts the _UNDERLYING_TYPE workarounds to prepare for another fix in the next patch. Fixes: 621389bbbe08 ("eal: fix C++ app build") Signed-off-by: David Marchand --- diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_cpuflags.h b/lib/librte_eal/common/include/arch/ppc_64/rte_cpuflags.h index f1cfc4f6f3..df45047037 100644 --- a/lib/librte_eal/common/include/arch/ppc_64/rte_cpuflags.h +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_cpuflags.h @@ -49,7 +49,7 @@ extern "C" { #define AT_HWCAP2 26 /* software based registers */ -enum cpu_register_t __RTE_REGISTER_UNDERLYING_TYPE { +enum cpu_register_t { REG_HWCAP = 0, REG_HWCAP2, }; @@ -57,7 +57,7 @@ enum cpu_register_t __RTE_REGISTER_UNDERLYING_TYPE { /** * Enumeration of all CPU features supported */ -enum rte_cpu_flag_t __RTE_CPUFLAG_UNDERLYING_TYPE { +enum rte_cpu_flag_t { RTE_CPUFLAG_PPC_LE = 0, RTE_CPUFLAG_TRUE_LE, RTE_CPUFLAG_PSERIES_PERFMON_COMPAT, diff --git a/lib/librte_eal/common/include/arch/tile/rte_cpuflags.h b/lib/librte_eal/common/include/arch/tile/rte_cpuflags.h index d6696d3d23..08aa957021 100644 --- a/lib/librte_eal/common/include/arch/tile/rte_cpuflags.h +++ b/lib/librte_eal/common/include/arch/tile/rte_cpuflags.h @@ -45,14 +45,14 @@ extern "C" { #include "generic/rte_cpuflags.h" /* software based registers */ -enum cpu_register_t __RTE_REGISTER_UNDERLYING_TYPE { +enum cpu_register_t { REG_DUMMY = 0 }; /** * Enumeration of all CPU features supported */ -enum rte_cpu_flag_t __RTE_CPUFLAG_UNDERLYING_TYPE { +enum rte_cpu_flag_t { RTE_CPUFLAG_NUMFLAGS /**< This should always be the last! */ }; diff --git a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h index df1834c1ee..dd5655356d 100644 --- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h +++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h @@ -45,7 +45,7 @@ extern "C" { #include "generic/rte_cpuflags.h" -enum rte_cpu_flag_t __RTE_CPUFLAG_UNDERLYING_TYPE { +enum rte_cpu_flag_t { /* (EAX 01h) ECX features*/ RTE_CPUFLAG_SSE3 = 0, /**< SSE3 */ RTE_CPUFLAG_PCLMULQDQ, /**< PCLMULQDQ */ @@ -150,7 +150,7 @@ enum rte_cpu_flag_t __RTE_CPUFLAG_UNDERLYING_TYPE { RTE_CPUFLAG_NUMFLAGS, /**< This should always be the last! */ }; -enum cpu_register_t __RTE_REGISTER_UNDERLYING_TYPE { +enum cpu_register_t { RTE_REG_EAX = 0, RTE_REG_EBX, RTE_REG_ECX, diff --git a/lib/librte_eal/common/include/generic/rte_cpuflags.h b/lib/librte_eal/common/include/generic/rte_cpuflags.h index 5352cbc32d..61c4db1904 100644 --- a/lib/librte_eal/common/include/generic/rte_cpuflags.h +++ b/lib/librte_eal/common/include/generic/rte_cpuflags.h @@ -44,23 +44,15 @@ #include #include -#ifdef __cplusplus -#define __RTE_CPUFLAG_UNDERLYING_TYPE : unsigned int -#define __RTE_REGISTER_UNDERLYING_TYPE : unsigned int -#else -#define __RTE_CPUFLAG_UNDERLYING_TYPE -#define __RTE_REGISTER_UNDERLYING_TYPE -#endif - /** * Enumeration of all CPU features supported */ -enum rte_cpu_flag_t __RTE_CPUFLAG_UNDERLYING_TYPE; +enum rte_cpu_flag_t; /** * Enumeration of CPU registers */ -enum cpu_register_t __RTE_REGISTER_UNDERLYING_TYPE; +enum cpu_register_t; typedef uint32_t cpuid_registers_t[4];