~ chicken-core (chicken-5) 92e1c1238c581ef3b29c8d783f1f4fbd40951151
commit 92e1c1238c581ef3b29c8d783f1f4fbd40951151 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 11:19:46 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 5c20f63f..e610f419 100644 --- a/chicken.h +++ b/chicken.h @@ -47,6 +47,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 @@ -71,14 +78,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