From 4c98bdcb79e51ebd1a3b72b733af7c9b54645ecc Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 20 May 2016 15:30:29 +0000 Subject: 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 --- io.c | 4 ++++ 1 file changed, 4 insertions(+) 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, -- cgit v1.2.3