1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2016-05-20 15:30:29 +00:00
parent 1246e48397
commit cbde995b2f

4
io.c
View file

@ -5680,6 +5680,7 @@ pipe_del_fptr(rb_io_t *fptr)
} }
} }
#if defined (_WIN32) || defined(__CYGWIN__)
static void static void
pipe_atexit(void) pipe_atexit(void)
{ {
@ -5692,6 +5693,7 @@ pipe_atexit(void)
list = tmp; list = tmp;
} }
} }
#endif
static void static void
pipe_finalize(rb_io_t *fptr, int noraise) pipe_finalize(rb_io_t *fptr, int noraise)
@ -5877,12 +5879,14 @@ popen_exec(void *pp, char *errmsg, size_t errmsg_len)
} }
#endif #endif
#if defined(HAVE_WORKING_FORK) || defined(HAVE_SPAWNV)
static VALUE static VALUE
rb_execarg_fixup_v(VALUE execarg_obj) rb_execarg_fixup_v(VALUE execarg_obj)
{ {
rb_execarg_parent_start(execarg_obj); rb_execarg_parent_start(execarg_obj);
return Qnil; return Qnil;
} }
#endif
static VALUE static VALUE
pipe_open(VALUE execarg_obj, const char *modestr, int fmode, pipe_open(VALUE execarg_obj, const char *modestr, int fmode,