stdafx.h
changeset 2978 1a04b74b61ae
parent 2976 a89ead6e2247
child 2980 cd4b945c5517
--- a/stdafx.h	Sun Feb 05 09:56:04 2006 +0000
+++ b/stdafx.h	Sun Feb 05 11:10:31 2006 +0000
@@ -7,9 +7,6 @@
 #include <string.h>
 #include <stdlib.h>
 
-/* Default to forced alignment-reading. Undef if wanted */
-#define OTTD_ALIGNMENT
-
 // MacOS X will use an NSAlert to display failed assertaions since they're lost unless running from a terminal
 // strgen always runs from terminal and don't need a window for asserts
 #if !defined(__APPLE__) || defined(STRGEN)
@@ -85,7 +82,6 @@
 # define CDECL
 # define NOT_REACHED() assert(0)
 # define GCC_PACK
-# undef OTTD_ALIGNMENT
 # include <malloc.h>
 #endif /* __WATCOMC__ */
 
@@ -141,7 +137,6 @@
 #  endif
 # endif /* _MSC_VER < 1300 */
 
-# undef OTTD_ALIGNMENT
 # define GCC_PACK
 
 // This is needed to zlib uses the stdcall calling convention on visual studio, also used with libpng (VS6 warning)
@@ -200,8 +195,13 @@
   typedef unsigned __int64 uint64;
 #endif /* __BEOS__ */
 
+#if defined(ARM) || defined(__arm__) || defined(__alpha__)
+# define OTTD_ALIGNMENT
+#endif
+
 // Setup alignment and conversion macros
 #if defined(TTD_BIG_ENDIAN)
+# define OTTD_ALIGNMENT
   static inline uint32 TO_LE32(uint32 x) { return BSWAP32(x); }
   static inline uint16 TO_LE16(uint16 x) { return BSWAP16(x); }
   static inline uint32 FROM_LE32(uint32 x) { return BSWAP32(x); }