fix build on debian ppc64 with -maltivec (nw)

problem is caused by <SDL2/SDL_cpuinfo.h> puling in <altivec.h> which #defines vector, pixel and bool
however when the compiler is in Apple Altivec mode, these are context-sensitive keywords and don't need to be #defined
we never need the #defines in our own code because we use the GCC-specific __vector instead of vector
so we trick the header to think the compiler is in Apple Altivec mode to suppress the #defines
This commit is contained in:
Vas Crabb 2016-07-12 23:17:19 +10:00
parent ba32818610
commit 3eb0e84041

View File

@ -79,4 +79,9 @@ struct _IO_FILE {}; //_IO_FILE is an opaque type in the emscripten libc which m
#undef _FORTIFY_SOURCE
#endif
// nasty hack to stop altivec #define vector/bool/pixel screwing us over
#if defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__)
#define __APPLE_ALTIVEC__ 1
#endif
#endif /* SDLMAME_UNIX */