Commit 0e662e3b authored by Masaki Muranaka's avatar Masaki Muranaka

Make some printf enclose in #ifdef ENABLE_STDIO.

parent 6ae3a1b8
...@@ -277,23 +277,27 @@ mrb_sprintf(mrb_state *mrb, const char *fmt, ...) ...@@ -277,23 +277,27 @@ mrb_sprintf(mrb_state *mrb, const char *fmt, ...)
void void
mrb_warn(const char *fmt, ...) mrb_warn(const char *fmt, ...)
{ {
#ifdef ENABLE_STDIO
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
printf("warning: "); printf("warning: ");
vprintf(fmt, args); vprintf(fmt, args);
va_end(args); va_end(args);
#endif
} }
void void
mrb_bug(const char *fmt, ...) mrb_bug(const char *fmt, ...)
{ {
#ifdef ENABLE_STDIO
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
printf("bug: "); printf("bug: ");
vprintf(fmt, args); vprintf(fmt, args);
va_end(args); va_end(args);
#endif
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment