include/SDL_byteorder.h
changeset 1353 7ba544e2888d
parent 1312 c9b51268668f
child 1354 22f39393668a
     1.1 --- a/include/SDL_byteorder.h	Thu Feb 09 05:46:55 2006 +0000
     1.2 +++ b/include/SDL_byteorder.h	Thu Feb 09 09:07:13 2006 +0000
     1.3 @@ -25,38 +25,24 @@
     1.4  #ifndef _SDL_byteorder_h
     1.5  #define _SDL_byteorder_h
     1.6  
     1.7 +#include "SDL_config.h"
     1.8 +
     1.9  /* The two types of endianness */
    1.10  #define SDL_LIL_ENDIAN	1234
    1.11  #define SDL_BIG_ENDIAN	4321
    1.12  
    1.13 -#ifdef __linux__
    1.14 -# include <endian.h>
    1.15 -# if BYTE_ORDER == LITTLE_ENDIAN
    1.16 -#  define SDL_BYTEORDER SDL_LIL_ENDIAN
    1.17 -# else
    1.18 -#  define SDL_BYTEORDER SDL_BIG_ENDIAN
    1.19 -# endif
    1.20 -
    1.21 -#else
    1.22 -
    1.23 -/* Pardon the mess, I'm trying to determine the endianness of this host.
    1.24 -   I'm doing it by preprocessor defines rather than some sort of configure
    1.25 -   script so that application code can use this too.  The "right" way would
    1.26 -   be to dynamically generate this file on install, but that's a lot of work.
    1.27 - */
    1.28 +#ifndef SDL_BYTEORDER	/* Not defined in SDL_config.h? */
    1.29  #if (defined(__i386__) || defined(__i386)) || \
    1.30 -     defined(__ia64__) || defined(WIN32) || \
    1.31 +     defined(__ia64__) || defined(__x86_64__) || \
    1.32      (defined(__alpha__) || defined(__alpha)) || \
    1.33      (defined(__arm__) || defined(__thumb__)) || \
    1.34      (defined(__sh__) || defined(__sh64__)) || \
    1.35      (defined(__mips__) && defined(__MIPSEL__)) || \
    1.36 -     defined(__SYMBIAN32__) || defined(__x86_64__) || \
    1.37 -     defined(__OS2__) || defined(__LITTLE_ENDIAN__)
    1.38 +     defined(__SYMBIAN32__) || defined(__OS2__)
    1.39  #define SDL_BYTEORDER	SDL_LIL_ENDIAN
    1.40  #else
    1.41  #define SDL_BYTEORDER	SDL_BIG_ENDIAN
    1.42  #endif
    1.43 -
    1.44 -#endif /* __linux__ */
    1.45 +#endif /* !SDL_BYTEORDER */
    1.46  
    1.47  #endif /* _SDL_byteorder_h */