Patched to compile on BeOS and old, old GCC releases.
--HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402257
This commit is contained in:
parent
a258df05a0
commit
8bc3ad08b2
2 changed files with 14 additions and 4 deletions
|
@ -56,7 +56,7 @@ extern "C" {
|
|||
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 @@ static __inline__ Uint16 SDL_Swap16(Uint16 x) {
|
|||
}
|
||||
#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 @@ static __inline__ Uint32 SDL_Swap32(Uint32 x) {
|
|||
#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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue