From 072e429220b19a75ecf2bbfadf1ac8d88dd5fad6 Mon Sep 17 00:00:00 2001 From: bjarni Date: Wed, 24 Jan 2007 00:55:35 +0000 Subject: (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) --- src/stdafx.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src') 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 +#else +# define INT64_MAX 9223372036854775807LL +#endif + #include #include #include @@ -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 -#else -# define INT64_MAX 9223372036854775807LL -#endif - #endif /* STDAFX_H */ -- cgit v1.2.3-54-g00ecf