From e27066ad1ad88c9b40acb5d8107747b7ca69cb07 Mon Sep 17 00:00:00 2001 From: Michel Normand Date: Tue, 3 Dec 2019 09:50:10 +0100 Subject: [PATCH] Avoid warning when mame build with ppc64 (BE) * use # if defined ... rather than # if ... to avoid warning when build on ppc64 (BE) * replace test of _LITTLE_ENDIAN by __BIG_ENDIAN__ gcc predefined macro, to keep default as little endian. This is a correction of previous commit#77d6f608 pr#199 Signed-off-by: Michel Normand --- include/bx/platform.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/bx/platform.h b/include/bx/platform.h index d4445d3..e9ca8b4 100644 --- a/include/bx/platform.h +++ b/include/bx/platform.h @@ -135,18 +135,18 @@ #endif // #if BX_CPU_PPC -// _LITTLE_ENDIAN exists on ppc64le. -# if _LITTLE_ENDIAN -# undef BX_CPU_ENDIAN_LITTLE -# define BX_CPU_ENDIAN_LITTLE 1 -# else +// __BIG_ENDIAN__ is gcc predefined macro +# if defined(__BIG_ENDIAN__) # undef BX_CPU_ENDIAN_BIG # define BX_CPU_ENDIAN_BIG 1 +# else +# undef BX_CPU_ENDIAN_LITTLE +# define BX_CPU_ENDIAN_LITTLE 1 # endif #else # undef BX_CPU_ENDIAN_LITTLE # define BX_CPU_ENDIAN_LITTLE 1 -#endif // BX_PLATFORM_ +#endif // BX_CPU_PPC // http://sourceforge.net/apps/mediawiki/predef/index.php?title=Operating_Systems #if defined(_DURANGO) || defined(_XBOX_ONE)