diff options
| author | Tomoyuki Sahara <[email protected]> | 2014-04-17 16:29:27 +0900 |
|---|---|---|
| committer | Tomoyuki Sahara <[email protected]> | 2014-04-17 16:29:27 +0900 |
| commit | 1c4f46f3244bf4b4b3e8acf55348e6104a2ace4f (patch) | |
| tree | 788c9ed8c88e4242ad9cd0bcf116e8e17f289022 /src | |
| parent | a11780f4f1197aa2082804f80630a775dc26153d (diff) | |
| download | mruby-1c4f46f3244bf4b4b3e8acf55348e6104a2ace4f.tar.gz mruby-1c4f46f3244bf4b4b3e8acf55348e6104a2ace4f.zip | |
remove standard header files from io.h.
Diffstat (limited to 'src')
| -rw-r--r-- | src/file_test.c | 17 | ||||
| -rw-r--r-- | src/io.c | 18 |
2 files changed, 29 insertions, 6 deletions
diff --git a/src/file_test.c b/src/file_test.c index 37b139c78..d3dfb15ba 100644 --- a/src/file_test.c +++ b/src/file_test.c @@ -3,11 +3,10 @@ */ #include "mruby.h" - -#include "mruby/ext/io.h" #include "mruby/class.h" #include "mruby/data.h" #include "mruby/string.h" +#include "mruby/ext/io.h" #if MRUBY_RELEASE_NO < 10000 #include "error.h" @@ -15,16 +14,26 @@ #include "mruby/error.h" #endif +#include <sys/types.h> +#include <sys/stat.h> + #if defined(_WIN32) || defined(_WIN64) #define LSTAT stat + #include <winsock.h> #else #define LSTAT lstat #include <sys/file.h> + #include <sys/param.h> + #include <sys/wait.h> #include <libgen.h> #include <pwd.h> - #include <sys/param.h> + #include <unistd.h> #endif -#include <limits.h> + +#include <fcntl.h> + +#include <errno.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> @@ -3,10 +3,10 @@ */ #include "mruby.h" -#include "mruby/hash.h" #include "mruby/array.h" #include "mruby/class.h" #include "mruby/data.h" +#include "mruby/hash.h" #include "mruby/string.h" #include "mruby/variable.h" #include "mruby/ext/io.h" @@ -17,7 +17,11 @@ #include "mruby/error.h" #endif +#include <sys/types.h> +#include <sys/stat.h> + #if defined(_WIN32) || defined(_WIN64) + #include <winsock.h> #include <io.h> #define open _open #define close _close @@ -25,10 +29,20 @@ #define write _write #define lseek _lseek #else + #include <sys/wait.h> + #include <unistd.h> #endif +#include <fcntl.h> + +#include <errno.h> +#include <stdio.h> +#include <string.h> + + static int mrb_io_modestr_to_flags(mrb_state *mrb, const char *modestr); static int mrb_io_flags_to_modenum(mrb_state *mrb, int flags); +static void fptr_finalize(mrb_state *mrb, struct mrb_io *fptr, int noraise); #if MRUBY_RELEASE_NO < 10000 static struct RClass * @@ -318,7 +332,7 @@ mrb_io_initialize(mrb_state *mrb, mrb_value io) return io; } -void +static void fptr_finalize(mrb_state *mrb, struct mrb_io *fptr, int noraise) { int n = 0; |
