diff --git a/src/include/general.h b/src/include/general.h index b29d039..f8cb927 100644 --- a/src/include/general.h +++ b/src/include/general.h @@ -22,7 +22,9 @@ #define __GENERAL_H #define _GNU_SOURCE -#define __USE_MINGW_ANSI_STDIO 1 +#if !defined(__USE_MINGW_ANSI_STDIO) +# define __USE_MINGW_ANSI_STDIO 1 +#endif #include #include #include diff --git a/src/platforms/pc/cl_utils.c b/src/platforms/pc/cl_utils.c index 40a8f9a..e5b55d1 100644 --- a/src/platforms/pc/cl_utils.c +++ b/src/platforms/pc/cl_utils.c @@ -22,13 +22,13 @@ * binary file from the command line. */ +#include "general.h" #include #include #include #include #include -#include "general.h" #include "target.h" #include "target_internal.h" diff --git a/src/platforms/pc/gdb_if.c b/src/platforms/pc/gdb_if.c index e00cf3a..3199465 100644 --- a/src/platforms/pc/gdb_if.c +++ b/src/platforms/pc/gdb_if.c @@ -24,6 +24,7 @@ */ #if defined(_WIN32) || defined(__CYGWIN__) +# define __USE_MINGW_ANSI_STDIO 1 # include # include # include diff --git a/src/target/samx5x.c b/src/target/samx5x.c index 66f1fda..e23912c 100644 --- a/src/target/samx5x.c +++ b/src/target/samx5x.c @@ -31,9 +31,9 @@ * particularly Sections 12. DSU and 25. NVMCTRL */ +#include "general.h" #include -#include "general.h" #include "target.h" #include "target_internal.h" #include "cortexm.h"