Skip to content

Commit 75583e5

Browse files
committed
* goruby.c: windows support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 7bc839b commit 75583e5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

goruby.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
#include <unistd.h>
2-
31
void Init_golf(void);
42
#define ruby_options goruby_options
53
#define ruby_run_node goruby_run_node
64
#include "main.c"
75
#undef ruby_options
86
#undef ruby_run_node
97

8+
#if defined _WIN32
9+
#include <io.h>
10+
#include <fcntl.h>
11+
#define pipe(p) _pipe(p, 32L, _O_NOINHERIT)
12+
#elif defined HAVE_UNISTD_H
13+
#include <unistd.h>
14+
#endif
15+
1016
RUBY_EXTERN void *ruby_options(int argc, char **argv);
1117
RUBY_EXTERN int ruby_run_node(void*);
1218
RUBY_EXTERN void ruby_init_ext(const char *name, void (*init)(void));

0 commit comments

Comments
 (0)