summaryrefslogtreecommitdiff
path: root/stdafx.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-09-04 14:20:12 +0000
committertruelight <truelight@openttd.org>2004-09-04 14:20:12 +0000
commit0fe07eac63a5c76f58ba7e25c1fba3fc762c4313 (patch)
tree6e2b691afebf8d8b014d667e8214654134147c6f /stdafx.h
parent85628544eeac566a70bf3f218bc078c096c65c50 (diff)
downloadopenttd-0fe07eac63a5c76f58ba7e25c1fba3fc762c4313.tar.xz
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
Diffstat (limited to 'stdafx.h')
-rw-r--r--stdafx.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/stdafx.h b/stdafx.h
index ab79d51eb..6e1034b2f 100644
--- a/stdafx.h
+++ b/stdafx.h
@@ -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)