diff options
| author | Paolo Bosetti <[email protected]> | 2013-12-10 14:34:26 +0100 |
|---|---|---|
| committer | Paolo Bosetti <[email protected]> | 2013-12-10 14:34:26 +0100 |
| commit | 23afaf02dc146346da823f85cea7a51263d0e2b7 (patch) | |
| tree | f8eb81a88486f024a1473f37db85eadc964da0d8 /src/io.c | |
| parent | 5a59fd3a5c83395847448db333c9df9d253a158c (diff) | |
| download | mruby-23afaf02dc146346da823f85cea7a51263d0e2b7.tar.gz mruby-23afaf02dc146346da823f85cea7a51263d0e2b7.zip | |
Made compatible with VisualStudio
Diffstat (limited to 'src/io.c')
| -rw-r--r-- | src/io.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -14,6 +14,16 @@ #include "mruby/ext/io.h" #include "error.h" +#if defined(_WIN32) || defined(_WIN64) + #include <io.h> + #define open _open + #define close _close + #define read _read + #define write _write + #define lseek _lseek +#else +#endif + static int mrb_io_modestr_to_flags(mrb_state *mrb, const char *modestr); static int mrb_io_modenum_to_flags(mrb_state *mrb, int modenum); static int mrb_io_flags_to_modenum(mrb_state *mrb, int flags); |
