Permalink
Browse files

* goruby.c: windows support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent 7bc839b commit 75583e52ce1303d142f9f34abe8e01e66f917cb6 @nobu nobu committed Dec 21, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 goruby.c
View
@@ -1,12 +1,18 @@
-#include <unistd.h>
-
void Init_golf(void);
#define ruby_options goruby_options
#define ruby_run_node goruby_run_node
#include "main.c"
#undef ruby_options
#undef ruby_run_node
+#if defined _WIN32
+#include <io.h>
+#include <fcntl.h>
+#define pipe(p) _pipe(p, 32L, _O_NOINHERIT)
+#elif defined HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
RUBY_EXTERN void *ruby_options(int argc, char **argv);
RUBY_EXTERN int ruby_run_node(void*);
RUBY_EXTERN void ruby_init_ext(const char *name, void (*init)(void));

0 comments on commit 75583e5

Please sign in to comment.