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

ruby-changes:5663

From: shyouhei <ko1@a...>
Date: Sun, 15 Jun 2008 19:08:53 +0900 (JST)
Subject: [ruby-changes:5663] Ruby:r17169 (ruby_1_8_6): merge revision(s) 15476:

shyouhei	2008-06-15 19:05:11 +0900 (Sun, 15 Jun 2008)

  New Revision: 17169

  Modified files:
    branches/ruby_1_8_6/ChangeLog
    branches/ruby_1_8_6/configure.in
    branches/ruby_1_8_6/signal.c
    branches/ruby_1_8_6/version.h

  Log:
    merge revision(s) 15476:
    * configure.in (sigsetmask): check when signal semantics is not POSIX.
    * signal.c (USE_TRAP_MASK): set true if sigprocmask or sigsetmask is
      available.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/ChangeLog?r1=17169&r2=17168&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/version.h?r1=17169&r2=17168&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/configure.in?r1=17169&r2=17168&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/signal.c?r1=17169&r2=17168&diff_format=u

Index: ruby_1_8_6/configure.in
===================================================================
--- ruby_1_8_6/configure.in	(revision 17168)
+++ ruby_1_8_6/configure.in	(revision 17169)
@@ -645,6 +645,7 @@
 if test "$ac_cv_func_sigprocmask" = yes && test "$ac_cv_func_sigaction" = yes; then
    AC_DEFINE(POSIX_SIGNAL)
 else
+  AC_CHECK_FUNCS(sigsetmask)
   AC_CACHE_CHECK(for BSD signal semantics, rb_cv_bsd_signal,
     [AC_TRY_RUN([
 #include <stdio.h>
@@ -667,7 +668,7 @@
 ],
 	rb_cv_bsd_signal=yes,
 	rb_cv_bsd_signal=no,
-	rb_cv_bsd_signal=no)])
+	rb_cv_bsd_signal=$ac_cv_func_sigsetmask)])
   if test "$rb_cv_bsd_signal" = yes; then
     AC_DEFINE(BSD_SIGNAL)
   fi
Index: ruby_1_8_6/ChangeLog
===================================================================
--- ruby_1_8_6/ChangeLog	(revision 17168)
+++ ruby_1_8_6/ChangeLog	(revision 17169)
@@ -1,3 +1,10 @@
+Sun Jun 15 19:02:46 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* configure.in (sigsetmask): check when signal semantics is not POSIX.
+
+	* signal.c (USE_TRAP_MASK): set true if sigprocmask or sigsetmask is
+	  available.
+
 Sat Jun 14 16:49:41 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/timeout.rb (Timeout::timeout): made sensitive to location on the
Index: ruby_1_8_6/version.h
===================================================================
--- ruby_1_8_6/version.h	(revision 17168)
+++ ruby_1_8_6/version.h	(revision 17169)
@@ -1,15 +1,15 @@
 #define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2008-06-14"
+#define RUBY_RELEASE_DATE "2008-06-15"
 #define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20080614
-#define RUBY_PATCHLEVEL 176
+#define RUBY_RELEASE_CODE 20080615
+#define RUBY_PATCHLEVEL 177
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8
 #define RUBY_VERSION_TEENY 6
 #define RUBY_RELEASE_YEAR 2008
 #define RUBY_RELEASE_MONTH 6
-#define RUBY_RELEASE_DAY 14
+#define RUBY_RELEASE_DAY 15
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];
Index: ruby_1_8_6/signal.c
===================================================================
--- ruby_1_8_6/signal.c	(revision 17168)
+++ ruby_1_8_6/signal.c	(revision 17169)
@@ -21,6 +21,12 @@
 #undef SIGBUS
 #endif
 
+#if defined HAVE_SIGPROCMASK || defined HAVE_SIGSETMASK
+#define USE_TRAP_MASK 1
+#else
+#define USE_TRAP_MASK 0
+#endif
+
 #ifndef NSIG
 # ifdef DJGPP
 #  define NSIG SIGMAX
@@ -663,7 +669,7 @@
 }
 
 struct trap_arg {
-#ifndef _WIN32
+#if USE_TRAP_MASK
 # ifdef HAVE_SIGPROCMASK
     sigset_t mask;
 # else
@@ -812,7 +818,7 @@
     trap_list[sig].cmd = command;
     trap_list[sig].safe = ruby_safe_level;
     /* enable at least specified signal. */
-#ifndef _WIN32
+#if USE_TRAP_MASK
 #ifdef HAVE_SIGPROCMASK
     sigdelset(&arg->mask, sig);
 #else
@@ -822,7 +828,7 @@
     return oldcmd;
 }
 
-#ifndef _WIN32
+#if USE_TRAP_MASK
 static VALUE
 trap_ensure(arg)
     struct trap_arg *arg;
@@ -841,7 +847,7 @@
 void
 rb_trap_restore_mask()
 {
-#ifndef _WIN32
+#if USE_TRAP_MASK
 # ifdef HAVE_SIGPROCMASK
     sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
 # else
@@ -901,7 +907,7 @@
     if (OBJ_TAINTED(arg.cmd)) {
 	rb_raise(rb_eSecurityError, "Insecure: tainted signal trap");
     }
-#ifndef _WIN32
+#if USE_TRAP_MASK
     /* disable interrupt */
 # ifdef HAVE_SIGPROCMASK
     sigfillset(&arg.mask);
@@ -984,7 +990,7 @@
     int sig;
 {
     sighandler_t oldfunc;
-#ifndef _WIN32
+#if USE_TRAP_MASK
 # ifdef HAVE_SIGPROCMASK
     sigset_t mask;
 # else
@@ -992,7 +998,7 @@
 # endif
 #endif
 
-#ifndef _WIN32
+#if USE_TRAP_MASK
     /* disable interrupt */
 # ifdef HAVE_SIGPROCMASK
     sigfillset(&mask);
@@ -1009,7 +1015,7 @@
 	trap_list[sig].cmd = 0;
     }
 
-#ifndef _WIN32
+#if USE_TRAP_MASK
 #ifdef HAVE_SIGPROCMASK
     sigdelset(&mask, sig);
     sigprocmask(SIG_SETMASK, &mask, NULL);

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

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