diff options
| author | Tomoyuki Sahara <[email protected]> | 2014-03-14 10:41:56 +0900 |
|---|---|---|
| committer | Tomoyuki Sahara <[email protected]> | 2014-03-14 10:41:56 +0900 |
| commit | 14031bdf44c255ecce805bb998b2f0d1e4dfe5a8 (patch) | |
| tree | 7072f0f19ef8762ae3af6478dad3b35ba67bb858 /include | |
| parent | f7c054bd39f0809641ab474771f0f85a5282c72e (diff) | |
| parent | 39bd240116b2980f90f9d8f350e18311959db54b (diff) | |
| download | mruby-14031bdf44c255ecce805bb998b2f0d1e4dfe5a8.tar.gz mruby-14031bdf44c255ecce805bb998b2f0d1e4dfe5a8.zip | |
Merge pull request #11 from pbosetti/master
Can build on VisualStudio, revised.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/ext/io.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/mruby/ext/io.h b/include/mruby/ext/io.h index a104d6d1f..4a476e0d5 100644 --- a/include/mruby/ext/io.h +++ b/include/mruby/ext/io.h @@ -11,20 +11,24 @@ extern "C" { #include <errno.h> -#include <unistd.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> -#include <sys/wait.h> +#if defined(_WIN32) || defined(_WIN64) + #include <winsock.h> +#else + #include <unistd.h> + #include <sys/wait.h> +#endif #include <stdio.h> #include <string.h> #include <limits.h> struct mrb_io { - int fd; /* file descriptor */ - int fd2; /* file descriptor */ - int pid; /* child's pid (for pipes) */ + int fd; /* file descriptor */ + int fd2; /* file descriptor */ + int pid; /* child's pid (for pipes) */ }; struct mrb_io_type { |
