SDL_endian.h revision b565d46b836401fa5dac23f9f8f0841c7a41e58e
1b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet/* 2b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet SDL - Simple DirectMedia Layer 3b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet Copyright (C) 1997-2006 Sam Lantinga 4b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 5b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet This library is free software; you can redistribute it and/or 6b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet modify it under the terms of the GNU Lesser General Public 7b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet License as published by the Free Software Foundation; either 8b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet version 2.1 of the License, or (at your option) any later version. 9b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 10b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet This library is distributed in the hope that it will be useful, 11b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet but WITHOUT ANY WARRANTY; without even the implied warranty of 12b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet Lesser General Public License for more details. 14b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 15b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet You should have received a copy of the GNU Lesser General Public 16b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet License along with this library; if not, write to the Free Software 17b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 19b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet Sam Lantinga 20b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet slouken@libsdl.org 21b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet*/ 22b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 23b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet/* Functions for reading and writing endian-specific values */ 24b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 25b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#ifndef _SDL_endian_h 26b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define _SDL_endian_h 27b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 28b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#include "SDL_stdinc.h" 29b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 30b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet/* The two types of endianness */ 31b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_LIL_ENDIAN 1234 32b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_BIG_ENDIAN 4321 33b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 34b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */ 35b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#if defined(__hppa__) || \ 36b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ 37b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet (defined(__MIPS__) && defined(__MISPEB__)) || \ 38b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ 39b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet defined(__sparc__) 40b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_BYTEORDER SDL_BIG_ENDIAN 41b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#else 42b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_BYTEORDER SDL_LIL_ENDIAN 43b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#endif 44b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#endif /* !SDL_BYTEORDER */ 45b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 46b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 47b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#include "begin_code.h" 48b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet/* Set up for C function definitions, even when using C++ */ 49b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#ifdef __cplusplus 50b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetextern "C" { 51b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#endif 52b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 53b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet/* Use inline functions for compilers that support them, and static 54b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet functions for those that do not. Because these functions become 55b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet static for compilers that do not support inline functions, this 56b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet header should only be included in files that actually use them. 57b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet*/ 58b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#if defined(__GNUC__) && defined(__i386__) && \ 59b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */) 60b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint16 SDL_Swap16(Uint16 x) 61b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 62b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x)); 63b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return x; 64b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 65b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#elif defined(__GNUC__) && defined(__x86_64__) 66b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint16 SDL_Swap16(Uint16 x) 67b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 68b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("xchgb %b0,%h0" : "=Q" (x) : "0" (x)); 69b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return x; 70b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 71b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) 72b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint16 SDL_Swap16(Uint16 x) 73b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 74b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet Uint16 result; 75b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 76b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x)); 77b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return result; 78b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 79b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) 80b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint16 SDL_Swap16(Uint16 x) 81b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 82b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("rorw #8,%0" : "=d" (x) : "0" (x) : "cc"); 83b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return x; 84b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 85b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#else 86b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint16 SDL_Swap16(Uint16 x) { 87b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return((x<<8)|(x>>8)); 88b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 89b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#endif 90b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 91b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#if defined(__GNUC__) && defined(__i386__) && \ 92b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */) 93b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint32 SDL_Swap32(Uint32 x) 94b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 95b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("bswap %0" : "=r" (x) : "0" (x)); 96b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return x; 97b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 98b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#elif defined(__GNUC__) && defined(__x86_64__) 99b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint32 SDL_Swap32(Uint32 x) 100b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 101b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("bswapl %0" : "=r" (x) : "0" (x)); 102b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return x; 103b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 104b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) 105b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint32 SDL_Swap32(Uint32 x) 106b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 107b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet Uint32 result; 108b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 109b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("rlwimi %0,%2,24,16,23" : "=&r" (result) : "0" (x>>24), "r" (x)); 110b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("rlwimi %0,%2,8,8,15" : "=&r" (result) : "0" (result), "r" (x)); 111b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x)); 112b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return result; 113b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 114b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) 115b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint32 SDL_Swap32(Uint32 x) 116b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 117b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0" : "=d" (x) : "0" (x) : "cc"); 118b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return x; 119b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 120b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#else 121b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint32 SDL_Swap32(Uint32 x) { 122b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return((x<<24)|((x<<8)&0x00FF0000)|((x>>8)&0x0000FF00)|(x>>24)); 123b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 124b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#endif 125b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 126b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#ifdef SDL_HAS_64BIT_TYPE 127b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#if defined(__GNUC__) && defined(__i386__) && \ 128b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */) 129b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint64 SDL_Swap64(Uint64 x) 130b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 131b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet union { 132b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet struct { Uint32 a,b; } s; 133b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet Uint64 u; 134b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet } v; 135b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet v.u = x; 136b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1" 137b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet : "=r" (v.s.a), "=r" (v.s.b) 138b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet : "0" (v.s.a), "1" (v.s.b)); 139b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return v.u; 140b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 141b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#elif defined(__GNUC__) && defined(__x86_64__) 142b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint64 SDL_Swap64(Uint64 x) 143b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 144b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet __asm__("bswapq %0" : "=r" (x) : "0" (x)); 145b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return x; 146b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 147b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#else 148b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohetstatic __inline__ Uint64 SDL_Swap64(Uint64 x) 149b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet{ 150b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet Uint32 hi, lo; 151b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 152b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet /* Separate into high and low 32-bit values and swap them */ 153b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet lo = (Uint32)(x&0xFFFFFFFF); 154b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet x >>= 32; 155b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet hi = (Uint32)(x&0xFFFFFFFF); 156b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet x = SDL_Swap32(lo); 157b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet x <<= 32; 158b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet x |= SDL_Swap32(hi); 159b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet return(x); 160b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 161b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#endif 162b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#else 163b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet/* This is mainly to keep compilers from complaining in SDL code. 164b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet If there is no real 64-bit datatype, then compilers will complain about 165b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet the fake 64-bit datatype that SDL provides when it compiles user code. 166b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet*/ 167b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_Swap64(X) (X) 168b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#endif /* SDL_HAS_64BIT_TYPE */ 169b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 170b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 171b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet/* Byteswap item from the specified endianness to the native endianness */ 172b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#if SDL_BYTEORDER == SDL_LIL_ENDIAN 173b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapLE16(X) (X) 174b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapLE32(X) (X) 175b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapLE64(X) (X) 176b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapBE16(X) SDL_Swap16(X) 177b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapBE32(X) SDL_Swap32(X) 178b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapBE64(X) SDL_Swap64(X) 179b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#else 180b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapLE16(X) SDL_Swap16(X) 181b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapLE32(X) SDL_Swap32(X) 182b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapLE64(X) SDL_Swap64(X) 183b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapBE16(X) (X) 184b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapBE32(X) (X) 185b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#define SDL_SwapBE64(X) (X) 186b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#endif 187b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 188b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet/* Ends C function definitions when using C++ */ 189b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#ifdef __cplusplus 190b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet} 191b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#endif 192b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#include "close_code.h" 193b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet 194b565d46b836401fa5dac23f9f8f0841c7a41e58eXavier Ducrohet#endif /* _SDL_endian_h */ 195