diff --git a/include/etl/platform.h b/include/etl/platform.h index 6c21e285..b108027e 100644 --- a/include/etl/platform.h +++ b/include/etl/platform.h @@ -31,6 +31,20 @@ SOFTWARE. #ifndef ETL_PLATFORM_INCLUDED #define ETL_PLATFORM_INCLUDED +//************************************* +// Enable all limit macros +// Note: This macro must be defined before the first include of stdint.h +#if !defined(__STDC_LIMIT_MACROS) + #define __STDC_LIMIT_MACROS +#endif + +//************************************* +// Enable all constant macros +// Note: This macro must be defined before the first include of stdint.h +#if !defined(__STDC_CONSTANT_MACROS) + #define __STDC_CONSTANT_MACROS +#endif + #include #include #include @@ -382,18 +396,6 @@ SOFTWARE. #define ETL_HAS_INITIALIZER_LIST 0 #endif -//************************************* -// Enable all limit macros -#if !defined(__STDC_LIMIT_MACROS) - #define __STDC_LIMIT_MACROS -#endif - -//************************************* -// Enable all constant macros -#if !defined(__STDC_CONSTANT_MACROS) - #define __STDC_CONSTANT_MACROS -#endif - //************************************* // Check for availability of certain builtins #include "profiles/determine_builtin_support.h"