From 7aa3f1fe697f03fc38989d72d2decd5037b8882c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Thu, 13 Feb 2020 13:33:49 +0900 Subject: [PATCH] printf can be a macro Namely glibc has this macro on -DFORTIFY_SOURCE. We have to prevent macro redefinition with different macro body. --- compile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/compile.c b/compile.c index ace7a468e9..985debe559 100644 --- a/compile.c +++ b/compile.c @@ -189,6 +189,7 @@ const ID rb_iseq_shared_exc_local_tbl[] = {idERROR_INFO}; #endif #if CPDEBUG > 1 || CPDEBUG < 0 +#undef printf #define printf ruby_debug_printf #define debugs if (compile_debug_print_indent(1)) ruby_debug_printf #define debug_compile(msg, v) ((void)(compile_debug_print_indent(1) && fputs((msg), stderr)), (v))