diff options
Diffstat (limited to 'src/helper/command.h')
-rw-r--r-- | src/helper/command.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/helper/command.h b/src/helper/command.h index c574efd5..ba825bcb 100644 --- a/src/helper/command.h +++ b/src/helper/command.h @@ -35,9 +35,10 @@ #include "jim.h" #endif -/* To achieve C99 printf compatibility in MinGW, gnu_printf should */ -/* be used for __attribute__((format( ... ))) */ -#ifdef IS_MINGW +/* To achieve C99 printf compatibility in MinGW, gnu_printf should be + * used for __attribute__((format( ... ))), with GCC v4.4 or later + */ +#if (defined(IS_MINGW) && (((__GNUC__ << 16) + __GNUC_MINOR__) >= 0x00040004)) #define PRINTF_ATTRIBUTE_FORMAT gnu_printf #else #define PRINTF_ATTRIBUTE_FORMAT printf |