Mercurial > sdl-ios-xcode
diff include/SDL_byteorder.h @ 1353:7ba544e2888d
Started the process of improving configure support, and merging C types
and library support into a single header.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 09 Feb 2006 09:07:13 +0000 |
parents | c9b51268668f |
children | 22f39393668a |
line wrap: on
line diff
--- a/include/SDL_byteorder.h Thu Feb 09 05:46:55 2006 +0000 +++ b/include/SDL_byteorder.h Thu Feb 09 09:07:13 2006 +0000 @@ -25,38 +25,24 @@ #ifndef _SDL_byteorder_h #define _SDL_byteorder_h +#include "SDL_config.h" + /* The two types of endianness */ #define SDL_LIL_ENDIAN 1234 #define SDL_BIG_ENDIAN 4321 -#ifdef __linux__ -# include <endian.h> -# if BYTE_ORDER == LITTLE_ENDIAN -# define SDL_BYTEORDER SDL_LIL_ENDIAN -# else -# define SDL_BYTEORDER SDL_BIG_ENDIAN -# endif - -#else - -/* Pardon the mess, I'm trying to determine the endianness of this host. - I'm doing it by preprocessor defines rather than some sort of configure - script so that application code can use this too. The "right" way would - be to dynamically generate this file on install, but that's a lot of work. - */ +#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */ #if (defined(__i386__) || defined(__i386)) || \ - defined(__ia64__) || defined(WIN32) || \ + defined(__ia64__) || defined(__x86_64__) || \ (defined(__alpha__) || defined(__alpha)) || \ (defined(__arm__) || defined(__thumb__)) || \ (defined(__sh__) || defined(__sh64__)) || \ (defined(__mips__) && defined(__MIPSEL__)) || \ - defined(__SYMBIAN32__) || defined(__x86_64__) || \ - defined(__OS2__) || defined(__LITTLE_ENDIAN__) + defined(__SYMBIAN32__) || defined(__OS2__) #define SDL_BYTEORDER SDL_LIL_ENDIAN #else #define SDL_BYTEORDER SDL_BIG_ENDIAN #endif - -#endif /* __linux__ */ +#endif /* !SDL_BYTEORDER */ #endif /* _SDL_byteorder_h */