summaryrefslogtreecommitdiff
path: root/stdafx.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-23 14:46:16 +0000
committertruelight <truelight@openttd.org>2004-12-23 14:46:16 +0000
commita9bb5be49d8b6b26a78b315aceeed972554b46dc (patch)
tree70df1e5fa1346ddc8214906f90ce7ff391e41e98 /stdafx.h
parentd91326fb4ae64a06dc08458c157b83f3197b5d9c (diff)
downloadopenttd-a9bb5be49d8b6b26a78b315aceeed972554b46dc.tar.xz
(svn r1248) -Add: initial OS/2 support (read docs/ReadMe_OS2.txt) (orudge)
Works fine, beside some minor stuff: - Network is not working yet - Keyboard is not working - No MIDI support - 'A few file selector bugs involving drives'
Diffstat (limited to 'stdafx.h')
-rw-r--r--stdafx.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/stdafx.h b/stdafx.h
index 30313085b..693979970 100644
--- a/stdafx.h
+++ b/stdafx.h
@@ -24,6 +24,10 @@
# include <sys/types.h>
#endif
+#if defined(__OS2__)
+# include <types.h>
+#endif
+
#ifdef __BEOS__
#include <SupportDefs.h>
#endif
@@ -77,6 +81,18 @@
# endif
#endif
+#if defined(__WATCOMC__)
+# define NORETURN
+# define FORCEINLINE inline
+# define CDECL
+# define NOT_REACHED()
+# define GCC_PACK
+# undef TTD_ALIGNMENT_4
+# undef TTD_ALIGNMENT_2
+
+# include <malloc.h>
+#endif
+
// Stuff for MSVC
#if defined(_MSC_VER)
# include <malloc.h> // alloca()
@@ -93,7 +109,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap);
#endif
// Windows has always LITTLE_ENDIAN
-#if defined(WIN32)
+#if defined(WIN32) || defined(__OS2__)
#define TTD_LITTLE_ENDIAN
#else
// Else include endian.h, which has the endian-type, autodetected by the Makefile
@@ -182,7 +198,11 @@ enum {
#endif
// Compile time assertions
-#define assert_compile(expr) void __ct_assert__(int a[1 - 2 * !(expr)])
+#ifdef __OS2__
+# define assert_compile(expr)
+#else
+# define assert_compile(expr) void __ct_assert__(int a[1 - 2 * !(expr)])
+#endif
assert_compile(sizeof(uint32) == 4);
assert_compile(sizeof(uint16) == 2);