Add configuration guard for `MRB_DISABLE_STDIO`
ref and ref
* Need MRBAPI functions without `MRB_DISABLE_STDIO`:
* mrbgems/mruby-bin-debugger
* mrbgems/mruby-bin-mirb
* mrbgems/mruby-bin-mrbc
* mrbgems/mruby-bin-mruby
* mrbgems/mruby-bin-strip
* Need `stdio.h`:
* mrbgems/mruby-io
* mrbgems/mruby-print
* Need `snprintf()` in `stdio.h`:
* mrbgems/mruby-pack
* mrbgems/mruby-sprintf
MODIFY
mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h
mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h
# error mruby-bin-debugger need 'MRB_ENABLE_DEBUG_HOOK' configuration in your 'build_config.rb'
#endif
+#ifdef MRB_DISABLE_STDIO
+# error mruby-bin-debugger conflicts 'MRB_DISABLE_STDIO' configuration in your 'build_config.rb'
+#endif
+
/* configuration options: */
/* maximum size for command buffer */
#define MAX_COMMAND_LINE 1024

MODIFY
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
*/
#include <mruby.h>
+
+#ifdef MRB_DISABLE_STDIO
+# error mruby-bin-mirb conflicts 'MRB_DISABLE_STDIO' configuration in your 'build_config.rb'
+#endif
+
#include <mruby/array.h>
#include <mruby/proc.h>
#include <mruby/compile.h>

MODIFY
mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c
mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c
+#include <mruby.h>
+
+#ifdef MRB_DISABLE_STDIO
+# error mruby-bin-mrbc conflicts 'MRB_DISABLE_STDIO' configuration in your 'build_config.rb'
+#endif
+
#include <stdlib.h>
#include <string.h>
-#include <mruby.h>
#include <mruby/compile.h>
#include <mruby/dump.h>
#include <mruby/proc.h>

MODIFY
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c
+#include <mruby.h>
+
+#ifdef MRB_DISABLE_STDIO
+# error mruby-bin-mruby conflicts 'MRB_DISABLE_STDIO' configuration in your 'build_config.rb'
+#endif
+
#include <stdlib.h>
#include <string.h>
-#include <mruby.h>
#include <mruby/array.h>
#include <mruby/compile.h>
#include <mruby/dump.h>

MODIFY
mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c
mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c
+#include <mruby.h>
+
+#ifdef MRB_DISABLE_STDIO
+# error mruby-bin-strip conflicts 'MRB_DISABLE_STDIO' configuration in your 'build_config.rb'
+#endif
+
#include <stdlib.h>
#include <string.h>
-#include <mruby.h>
#include <mruby/irep.h>
#include <mruby/dump.h>

MODIFY
mrbgems/mruby-io/include/mruby/ext/io.h
mrbgems/mruby-io/include/mruby/ext/io.h
#ifndef MRUBY_IO_H
#define MRUBY_IO_H
+#include <mruby.h>
+
+#ifdef MRB_DISABLE_STDIO
+# error IO and File conflicts 'MRB_DISABLE_STDIO' configuration in your 'build_config.rb'
+#endif
+
#if defined(__cplusplus)
extern "C" {
#endif

MODIFY
mrbgems/mruby-pack/src/pack.c
mrbgems/mruby-pack/src/pack.c
** pack.c - Array#pack, String#unpack
*/
-#include "mruby.h"
+#include <mruby.h>
+
+#ifdef MRB_DISABLE_STDIO
+# error pack/unpack conflicts 'MRB_DISABLE_STDIO' configuration in your 'build_config.rb'
+#endif
+
#include "mruby/error.h"
#include "mruby/array.h"
#include "mruby/class.h"

MODIFY
mrbgems/mruby-print/src/print.c
mrbgems/mruby-print/src/print.c
#include <mruby.h>
+
+#ifdef MRB_DISABLE_STDIO
+# error print conflicts 'MRB_DISABLE_STDIO' configuration in your 'build_config.rb'
+#endif
+
#include <mruby/string.h>
#include <string.h>
#include <stdlib.h>

MODIFY
mrbgems/mruby-sprintf/src/sprintf.c
mrbgems/mruby-sprintf/src/sprintf.c
#include <mruby.h>
+#ifdef MRB_DISABLE_STDIO
+# error sprintf conflicts 'MRB_DISABLE_STDIO' configuration in your 'build_config.rb'
+#endif
+
#include <limits.h>
#include <string.h>
#include <mruby/string.h>

Add configuration guard for `MRB_DISABLE_STDIO`

ref #4576 and ref #4947

* Need MRBAPI functions without `MRB_DISABLE_STDIO`:
  * mrbgems/mruby-bin-debugger
  * mrbgems/mruby-bin-mirb
  * mrbgems/mruby-bin-mrbc
  * mrbgems/mruby-bin-mruby
  * mrbgems/mruby-bin-strip
* Need `stdio.h`:
  * mrbgems/mruby-io
  * mrbgems/mruby-print
* Need `snprintf()` in `stdio.h`:
  * mrbgems/mruby-pack
  * mrbgems/mruby-sprintf