[前][次][番号順一覧][スレッド一覧]

ruby-changes:52411

From: nobu <ko1@a...>
Date: Mon, 3 Sep 2018 17:20:47 +0900 (JST)
Subject: [ruby-changes:52411] nobu:r64620 (trunk): Declare as gnu_printf on mingw

nobu	2018-09-03 17:20:41 +0900 (Mon, 03 Sep 2018)

  New Revision: 64620

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64620

  Log:
    Declare as gnu_printf on mingw
    
    [Bug #13496]
    
    From: MSP-Greg <MSP-Greg@u...>

  Modified files:
    trunk/include/ruby/defines.h
    trunk/tool/m4/ruby_check_printf_prefix.m4
Index: tool/m4/ruby_check_printf_prefix.m4
===================================================================
--- tool/m4/ruby_check_printf_prefix.m4	(revision 64619)
+++ tool/m4/ruby_check_printf_prefix.m4	(revision 64620)
@@ -8,8 +8,13 @@ AC_CACHE_CHECK([for printf prefix for $1 https://github.com/ruby/ruby/blob/trunk/tool/m4/ruby_check_printf_prefix.m4#L8
             [@%:@include <stdio.h>
 	    @%:@include <stddef.h>
             @%:@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
Index: include/ruby/defines.h
===================================================================
--- include/ruby/defines.h	(revision 64619)
+++ include/ruby/defines.h	(revision 64620)
@@ -90,8 +90,13 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L90
 #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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]