use mingw ANSI stdio
[Bug #13496] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fb7a569077
commit
1cf2bb4b20
@ -90,9 +90,9 @@ extern "C" {
|
|||||||
#endif /* __GNUC__ >= 3 */
|
#endif /* __GNUC__ >= 3 */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#ifdef __MINGW32__
|
#if defined __MINGW_PRINTF_FORMAT
|
||||||
#define PRINTF_ARGS(decl, string_index, first_to_check) \
|
#define PRINTF_ARGS(decl, string_index, first_to_check) \
|
||||||
decl __attribute__((format(gnu_printf, string_index, first_to_check)))
|
decl __attribute__((format(__MINGW_PRINTF_FORMAT, string_index, first_to_check)))
|
||||||
#else
|
#else
|
||||||
#define PRINTF_ARGS(decl, string_index, first_to_check) \
|
#define PRINTF_ARGS(decl, string_index, first_to_check) \
|
||||||
decl __attribute__((format(printf, string_index, first_to_check)))
|
decl __attribute__((format(printf, string_index, first_to_check)))
|
||||||
|
@ -8,9 +8,9 @@ AC_CACHE_CHECK([for printf prefix for $1], [rb_cv_pri_prefix_]AS_TR_SH($1),[
|
|||||||
[@%:@include <stdio.h>
|
[@%:@include <stdio.h>
|
||||||
@%:@include <stddef.h>
|
@%:@include <stddef.h>
|
||||||
@%:@ifdef __GNUC__
|
@%:@ifdef __GNUC__
|
||||||
@%:@ifdef __MINGW32__
|
@%:@if defined __MINGW_PRINTF_FORMAT
|
||||||
@%:@define PRINTF_ARGS(decl, string_index, first_to_check) \
|
@%:@define PRINTF_ARGS(decl, string_index, first_to_check) \
|
||||||
decl __attribute__((format(gnu_printf, string_index, first_to_check)))
|
decl __attribute__((format(__MINGW_PRINTF_FORMAT, string_index, first_to_check)))
|
||||||
@%:@else
|
@%:@else
|
||||||
@%:@define PRINTF_ARGS(decl, string_index, first_to_check) \
|
@%:@define PRINTF_ARGS(decl, string_index, first_to_check) \
|
||||||
decl __attribute__((format(printf, string_index, first_to_check)))
|
decl __attribute__((format(printf, string_index, first_to_check)))
|
||||||
|
@ -12,6 +12,7 @@ rm -f conftest*])
|
|||||||
AS_IF([test "$rb_cv_mingw32" = yes], [
|
AS_IF([test "$rb_cv_mingw32" = yes], [
|
||||||
target_os="mingw32"
|
target_os="mingw32"
|
||||||
: ${ac_tool_prefix:="`expr "$CC" : ['\(.*-\)g\?cc[^/]*$']`"}
|
: ${ac_tool_prefix:="`expr "$CC" : ['\(.*-\)g\?cc[^/]*$']`"}
|
||||||
|
AC_DEFINE(__USE_MINGW_ANSI_STDIO, 1) dnl for gnu_printf
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
AS_CASE(["$target_os"], [mingw*msvc], [
|
AS_CASE(["$target_os"], [mingw*msvc], [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user