From c115b39e033979bac7cfd2db5735549430dc14f7 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 3 Sep 2018 08:20:41 +0000 Subject: Declare as gnu_printf on mingw [Bug #13496] From: MSP-Greg git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/defines.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/ruby/defines.h b/include/ruby/defines.h index 5774870e76..f5fd5bfcef 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -90,8 +90,13 @@ extern "C" { #endif /* __GNUC__ >= 3 */ #ifdef __GNUC__ +#ifdef __MINGW32__ +#define PRINTF_ARGS(decl, string_index, first_to_check) \ + decl __attribute__((format(gnu_printf, string_index, first_to_check))) +#else #define PRINTF_ARGS(decl, string_index, first_to_check) \ decl __attribute__((format(printf, string_index, first_to_check))) +#endif #else #define PRINTF_ARGS(decl, string_index, first_to_check) decl #endif -- cgit v1.2.3