diff --git a/include/SDL_endian.h b/include/SDL_endian.h index b11a83a61..d09209b69 100644 --- a/include/SDL_endian.h +++ b/include/SDL_endian.h @@ -69,7 +69,7 @@ extern "C" { * \file SDL_endian.h */ #if defined(__GNUC__) && defined(__i386__) && \ - !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */) + !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */) SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x) { @@ -99,7 +99,7 @@ SDL_Swap16(Uint16 x) __asm__("rev16 %w1, %w0" : "=r"(x) : "r"(x)); return x; } -#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__) +#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__)) SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x) { @@ -120,7 +120,8 @@ SDL_Swap16(Uint16 x) } #endif -#if defined(__GNUC__) && defined(__i386__) +#if defined(__GNUC__) && defined(__i386__) && \ + !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */) SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x) { @@ -152,7 +153,7 @@ SDL_Swap32(Uint32 x) __asm__("rev %w1, %w0": "=r"(x):"r"(x)); return x; } -#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__) +#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__)) SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x) { @@ -183,7 +184,8 @@ SDL_Swap32(Uint32 x) } #endif -#if defined(__GNUC__) && defined(__i386__) +#if defined(__GNUC__) && defined(__i386__) && \ + !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */) SDL_FORCE_INLINE Uint64 SDL_Swap64(Uint64 x) {