diff include/SDL_endian.h @ 3909:6832b00d3594 SDL-1.2

Patched to compile on BeOS and old, old GCC releases.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 05 Feb 2007 06:44:51 +0000
parents d45aefcac017
children a1b03ba2fcd0
line wrap: on
line diff
--- a/include/SDL_endian.h	Sat Feb 03 08:17:12 2007 +0000
+++ b/include/SDL_endian.h	Mon Feb 05 06:44:51 2007 +0000
@@ -56,7 +56,7 @@
    header should only be included in files that actually use them.
 */
 #if defined(__GNUC__) && defined(__i386__) && \
-   !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
+   !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
 static __inline__ Uint16 SDL_Swap16(Uint16 x)
 {
 	__asm__("xchgb %b0,%h0" : "=q" (x) :  "0" (x));
@@ -88,7 +88,8 @@
 }
 #endif
 
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(__i386__) && \
+   !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
 static __inline__ Uint32 SDL_Swap32(Uint32 x)
 {
 	__asm__("bswap %0" : "=r" (x) : "0" (x));
@@ -123,7 +124,8 @@
 #endif
 
 #ifdef SDL_HAS_64BIT_TYPE
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(__i386__) && \
+   !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
 static __inline__ Uint64 SDL_Swap64(Uint64 x)
 {
 	union {