[前][次][番号順一覧][スレッド一覧]

ruby-changes:43016

From: nobu <ko1@a...>
Date: Sat, 21 May 2016 00:30:33 +0900 (JST)
Subject: [ruby-changes:43016] nobu:r55090 (trunk): io.c: conditionally used functions

nobu	2016-05-21 00:30:29 +0900 (Sat, 21 May 2016)

  New Revision: 55090

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55090

  Log:
    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.

  Modified files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 55089)
+++ io.c	(revision 55090)
@@ -5680,6 +5680,7 @@ pipe_del_fptr(rb_io_t *fptr) https://github.com/ruby/ruby/blob/trunk/io.c#L5680
     }
 }
 
+#if defined (_WIN32) || defined(__CYGWIN__)
 static void
 pipe_atexit(void)
 {
@@ -5692,6 +5693,7 @@ pipe_atexit(void) https://github.com/ruby/ruby/blob/trunk/io.c#L5693
 	list = tmp;
     }
 }
+#endif
 
 static void
 pipe_finalize(rb_io_t *fptr, int noraise)
@@ -5877,12 +5879,14 @@ popen_exec(void *pp, char *errmsg, size_ https://github.com/ruby/ruby/blob/trunk/io.c#L5879
 }
 #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,

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]