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

ruby-changes:35791

From: yugui <ko1@a...>
Date: Sat, 11 Oct 2014 11:12:08 +0900 (JST)
Subject: [ruby-changes:35791] yugui:r47873 (trunk): Allow failure of sighandler installation on NativeClient.

yugui	2014-10-11 11:12:00 +0900 (Sat, 11 Oct 2014)

  New Revision: 47873

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

  Log:
    Allow failure of sighandler installation on NativeClient.
    
    * signal.c (install_signalhandler, init_sigchld): allow failure because it
      always fails with ENOSYS on NaCl.

  Modified files:
    trunk/io.c
    trunk/signal.c
Index: io.c
===================================================================
--- io.c	(revision 47872)
+++ io.c	(revision 47873)
@@ -204,6 +204,9 @@ rb_update_max_fd(int fd) https://github.com/ruby/ruby/blob/trunk/io.c#L204
     }
 }
 
+#undef HAVE_FCNTL
+#undef O_CLOEXEC
+
 void
 rb_maygvl_fd_fix_cloexec(int fd)
 {
Index: signal.c
===================================================================
--- signal.c	(revision 47872)
+++ signal.c	(revision 47873)
@@ -1261,7 +1261,9 @@ install_sighandler(int signum, sighandle https://github.com/ruby/ruby/blob/trunk/signal.c#L1261
     rb_enable_interrupt();
     return 0;
 }
-#define install_sighandler(signum, handler) (install_sighandler(signum, handler) ? rb_bug(#signum) : (void)0)
+#ifndef __native_client__
+#  define install_sighandler(signum, handler) (install_sighandler(signum, handler) ? rb_bug(#signum) : (void)0)
+#endif
 
 #if defined(SIGCLD) || defined(SIGCHLD)
 static int
@@ -1281,7 +1283,9 @@ init_sigchld(int sig) https://github.com/ruby/ruby/blob/trunk/signal.c#L1283
     rb_enable_interrupt();
     return 0;
 }
-#define init_sigchld(signum) (init_sigchld(signum) ? rb_bug(#signum) : (void)0)
+#  ifndef __native_client__
+#    define init_sigchld(signum) (init_sigchld(signum) ? rb_bug(#signum) : (void)0)
+#  endif
 #endif
 
 void

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

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