Mercurial > sdl-ios-xcode
comparison include/SDL_endian.h @ 4551:a5865d4b6495 SDL-1.2
RedHat patch: SDL-1.2.14-byteorder.patch
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 18 Jul 2010 11:22:47 -0700 |
parents | 7a53f8efc017 |
children |
comparison
equal
deleted
inserted
replaced
4547:963f939494a1 | 4551:a5865d4b6495 |
---|---|
37 #define SDL_LIL_ENDIAN 1234 | 37 #define SDL_LIL_ENDIAN 1234 |
38 #define SDL_BIG_ENDIAN 4321 | 38 #define SDL_BIG_ENDIAN 4321 |
39 /*@}*/ | 39 /*@}*/ |
40 | 40 |
41 #ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */ | 41 #ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */ |
42 #ifdef __linux__ | |
43 #include <endian.h> | |
44 #define SDL_BYTEORDER __BYTE_ORDER | |
45 #else /* __linux __ */ | |
42 #if defined(__hppa__) || \ | 46 #if defined(__hppa__) || \ |
43 defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ | 47 defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ |
44 (defined(__MIPS__) && defined(__MISPEB__)) || \ | 48 (defined(__MIPS__) && defined(__MISPEB__)) || \ |
45 defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ | 49 defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ |
46 defined(__sparc__) | 50 defined(__sparc__) |
47 #define SDL_BYTEORDER SDL_BIG_ENDIAN | 51 #define SDL_BYTEORDER SDL_BIG_ENDIAN |
48 #else | 52 #else |
49 #define SDL_BYTEORDER SDL_LIL_ENDIAN | 53 #define SDL_BYTEORDER SDL_LIL_ENDIAN |
50 #endif | 54 #endif |
55 #endif /* __linux __ */ | |
51 #endif /* !SDL_BYTEORDER */ | 56 #endif /* !SDL_BYTEORDER */ |
52 | 57 |
53 | 58 |
54 #include "begin_code.h" | 59 #include "begin_code.h" |
55 /* Set up for C function definitions, even when using C++ */ | 60 /* Set up for C function definitions, even when using C++ */ |