summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-02-13 13:33:49 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-02-20 11:46:54 +0900
commit7aa3f1fe697f03fc38989d72d2decd5037b8882c (patch)
tree93a5b5d98066bff7f7ddc1c299f1f15051122f24 /compile.c
parent8920e2040a8980fdceeb9b629b0ef79fac380960 (diff)
printf can be a macro
Namely glibc has this macro on -DFORTIFY_SOURCE. We have to prevent macro redefinition with different macro body.
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c1
1 files changed, 1 insertions, 0 deletions
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))