summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-03-08 22:37:22 +0900
committerGitHub <[email protected]>2020-03-08 22:37:22 +0900
commit0dacc9a62a1772362f82e7c53cf18d6223e8a917 (patch)
tree5599b7521bcf5b745955bd2af80d6bc3a5d7fb20 /mrbgems/mruby-io
parent5bf5a2cc6e9e78cb84118c08dd9498bbe854e7cb (diff)
parent67606170e3ca001ecd6885dac957f4bbdb094bad (diff)
downloadmruby-0dacc9a62a1772362f82e7c53cf18d6223e8a917.tar.gz
mruby-0dacc9a62a1772362f82e7c53cf18d6223e8a917.zip
Merge pull request #4954 from dearblue/nostdio
Improve configuration guard
Diffstat (limited to 'mrbgems/mruby-io')
-rw-r--r--mrbgems/mruby-io/include/mruby/ext/io.h6
-rw-r--r--mrbgems/mruby-io/src/file_test.c1
-rw-r--r--mrbgems/mruby-io/src/io.c1
-rw-r--r--mrbgems/mruby-io/test/mruby_io_test.c1
4 files changed, 6 insertions, 3 deletions
diff --git a/mrbgems/mruby-io/include/mruby/ext/io.h b/mrbgems/mruby-io/include/mruby/ext/io.h
index c4eccb936..38ed0f222 100644
--- a/mrbgems/mruby-io/include/mruby/ext/io.h
+++ b/mrbgems/mruby-io/include/mruby/ext/io.h
@@ -5,6 +5,12 @@
#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
diff --git a/mrbgems/mruby-io/src/file_test.c b/mrbgems/mruby-io/src/file_test.c
index aadd1ac1c..d75cbd598 100644
--- a/mrbgems/mruby-io/src/file_test.c
+++ b/mrbgems/mruby-io/src/file_test.c
@@ -28,7 +28,6 @@
#include <fcntl.h>
#include <errno.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/mrbgems/mruby-io/src/io.c b/mrbgems/mruby-io/src/io.c
index 41d6b6120..8b0dcb244 100644
--- a/mrbgems/mruby-io/src/io.c
+++ b/mrbgems/mruby-io/src/io.c
@@ -55,7 +55,6 @@ typedef mrb_int pid_t;
#include <fcntl.h>
#include <errno.h>
-#include <stdio.h>
#include <string.h>
#define OPEN_ACCESS_MODE_FLAGS (O_RDONLY | O_WRONLY | O_RDWR)
diff --git a/mrbgems/mruby-io/test/mruby_io_test.c b/mrbgems/mruby-io/test/mruby_io_test.c
index 581472eaa..44b8acebb 100644
--- a/mrbgems/mruby-io/test/mruby_io_test.c
+++ b/mrbgems/mruby-io/test/mruby_io_test.c
@@ -56,7 +56,6 @@ mkdtemp(char *temp)
#endif
#include <sys/stat.h>
-#include <stdio.h>
#include <stdlib.h>
#include "mruby.h"