summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-01-24 00:55:35 +0000
committerbjarni <bjarni@openttd.org>2007-01-24 00:55:35 +0000
commit625368772e8f0d957bd41a3d90a9632f105938d4 (patch)
treeaff30796862ac0fe64de949490681e0aa7cc5d80 /src/stdafx.h
parente40723568a9218c1dafdcb603352eb84857292e5 (diff)
downloadopenttd-625368772e8f0d957bd41a3d90a9632f105938d4.tar.xz
(svn r8382) -Fix (r8374): moved the include of stdint.h to the front of stdafx.h
This fixes the issue where OSX included stdint.h though other includes before defining __STDC_LIMIT_MACROS (and failed to compile because of this)
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index 4d618c903..3de865245 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -3,6 +3,17 @@
#ifndef STDAFX_H
#define STDAFX_H
+/* It seems that we need to include stdint.h before anything else
+ * 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
+
#include <stdio.h>
#include <stddef.h>
#include <string.h>
@@ -316,14 +327,4 @@ 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 */