mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Declare as gnu_printf on mingw
[Bug #13496] From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5cde9a39a3
commit
c115b39e03
2 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -8,8 +8,13 @@ AC_CACHE_CHECK([for printf prefix for $1], [rb_cv_pri_prefix_]AS_TR_SH($1),[
|
|||
[@%:@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
|
||||
|
|
Loading…
Add table
Reference in a new issue