~ chicken-core (chicken-5) e6ee1f154b8bae578504838b858e54f2e7d3ad63
commit e6ee1f154b8bae578504838b858e54f2e7d3ad63 Author: Evan Hanson <evhan@foldling.org> AuthorDate: Wed Jan 18 10:32:04 2017 +1300 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Wed Jan 18 10:41:22 2017 +1300 Include chicken-config.h before feature macro definitions Now that chicken-config.h includes a flag that enables or disables the various feature macros defined in chicken.h (_XOPEN_SOURCE et al.), we need to make sure it precedes their definitions. diff --git a/chicken.h b/chicken.h index 4acacee6..6497efae 100644 --- a/chicken.h +++ b/chicken.h @@ -41,6 +41,13 @@ # define __C99FEATURES__ #endif +/* + * N.B. This file MUST not rely upon "chicken-config.h" + */ +#if defined(HAVE_CONFIG_H) || defined(HAVE_CHICKEN_CONFIG_H) +# include "chicken-config.h" +#endif + /* Some OSes really dislike feature macros for standard levels */ #ifdef C_USE_STD_FEATURE_MACROS @@ -65,14 +72,6 @@ #endif /* C_USE_STD_FEATURE_MACROS */ -/* - * N.B. This file MUST not rely upon "chicken-config.h" - */ -#if defined(HAVE_CONFIG_H) || defined(HAVE_CHICKEN_CONFIG_H) -# include "chicken-config.h" -#endif - - /* Kind of platform */ #if defined(__LP64__) || defined(_LP64) || defined(__MINGW64__) || defined(_WIN64)Trap