diff options
author | truelight <truelight@openttd.org> | 2004-09-04 14:20:12 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-09-04 14:20:12 +0000 |
commit | 0fe07eac63a5c76f58ba7e25c1fba3fc762c4313 (patch) | |
tree | 6e2b691afebf8d8b014d667e8214654134147c6f /stdafx.h | |
parent | 85628544eeac566a70bf3f218bc078c096c65c50 (diff) | |
download | openttd-0fe07eac63a5c76f58ba7e25c1fba3fc762c4313.tar.xz |
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
Diffstat (limited to 'stdafx.h')
-rw-r--r-- | stdafx.h | 25 |
1 files changed, 5 insertions, 20 deletions
@@ -67,27 +67,12 @@ # define GCC_PACK #endif +// Windows has always LITTLE_ENDIAN #if defined(WIN32) -# define TTD_LITTLE_ENDIAN -#endif - -#if defined(i386) -# define TTD_LITTLE_ENDIAN -#endif - -#if defined(__MORPHOS__) -# define TTD_BIG_ENDIAN -#endif - -// Check endianness -#if !defined(TTD_LITTLE_ENDIAN) && !defined(TTD_BIG_ENDIAN) -# if defined(_BIG_ENDIAN) -# define TTD_BIG_ENDIAN -# elif defined(_LITTLE_ENDIAN) -# define TTD_LITTLE_ENDIAN -# else -# error No endianness defined, use either TTD_LITTLE_ENDIAN or TTD_BIG_ENDIAN -#endif + #define TTD_LITTLE_ENDIAN +#else +// Else include endian.h, which has the endian-type, autodetected by the Makefile + #include "endian.h" #endif #if defined(UNIX) |