aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-20 15:30:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-20 15:30:29 +0000
commit4c98bdcb79e51ebd1a3b72b733af7c9b54645ecc (patch)
tree12003e471a8fd8661515e92527b6d1d7410adb43
parent1d6500b420565f539c311337ae4b2176c415ab21 (diff)
downloadruby-4c98bdcb79e51ebd1a3b72b733af7c9b54645ecc.tar.gz
io.c: conditionally used functions
* io.c (pipe_atexit): only used on Windows * io.c (rb_execarg_fixup_v): wrapper only used fork or spawnv is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/io.c b/io.c
index 33c2970a46..7e6ca89038 100644
--- a/io.c
+++ b/io.c
@@ -5680,6 +5680,7 @@ pipe_del_fptr(rb_io_t *fptr)
}
}
+#if defined (_WIN32) || defined(__CYGWIN__)
static void
pipe_atexit(void)
{
@@ -5692,6 +5693,7 @@ pipe_atexit(void)
list = tmp;
}
}
+#endif
static void
pipe_finalize(rb_io_t *fptr, int noraise)
@@ -5877,12 +5879,14 @@ popen_exec(void *pp, char *errmsg, size_t errmsg_len)
}
#endif
+#if defined(HAVE_WORKING_FORK) || defined(HAVE_SPAWNV)
static VALUE
rb_execarg_fixup_v(VALUE execarg_obj)
{
rb_execarg_parent_start(execarg_obj);
return Qnil;
}
+#endif
static VALUE
pipe_open(VALUE execarg_obj, const char *modestr, int fmode,