summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-01-23 15:47:28 +0000
committermaedhros <maedhros@openttd.org>2007-01-23 15:47:28 +0000
commit24b81e6e460fddf6116c2347d300cc534acf232a (patch)
treed233417f82996403051ff7a20b2a6302f1d0ae7d /src/stdafx.h
parent96e3e8cd1a75c2e4b5401d4b7eaea1472fecede0 (diff)
downloadopenttd-24b81e6e460fddf6116c2347d300cc534acf232a.tar.xz
(svn r8374) -Fix (r8367): LLONG_MAX isn't always defined, and INT64_MAX describes the
required value better anyway. However, INT64_MAX comes from stdint.h which doesn't seem to exist on MSVC or MorphOS, so it's defined manually for them.
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index 8bff614b4..4d618c903 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -316,4 +316,14 @@ assert_compile(sizeof(uint8) == 1);
# define Point OTTD_AMIGA_POINT
#endif
+// We need INT64_MAX, which for most systems comes from stdint.h. However, MSVC
+// does not have stdint.h and apparently neither does MorphOS, so define
+// INT64_MAX for them ourselves.
+#if !defined(_MSC_VER) && !defined( __MORPHOS__)
+# define __STDC_LIMIT_MACROS
+# include <stdint.h>
+#else
+# define INT64_MAX 9223372036854775807LL
+#endif
+
#endif /* STDAFX_H */