ruby-changes:3986
From: ko1@a...
Date: Fri, 15 Feb 2008 02:41:26 +0900 (JST)
Subject: [ruby-changes:3986] nobu - Ruby:r15476 (trunk, ruby_1_8): * configure.in (sigsetmask): check when signal semantics is not POSIX.
nobu 2008-02-15 02:40:56 +0900 (Fri, 15 Feb 2008) New Revision: 15476 Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/configure.in branches/ruby_1_8/signal.c branches/ruby_1_8/version.h trunk/ChangeLog trunk/configure.in trunk/signal.c trunk/version.h Log: * 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/trunk/version.h?r1=15476&r2=15475&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/configure.in?r1=15476&r2=15475&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=15476&r2=15475&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15476&r2=15475&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/signal.c?r1=15476&r2=15475&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/version.h?r1=15476&r2=15475&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/configure.in?r1=15476&r2=15475&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/signal.c?r1=15476&r2=15475&diff_format=u Index: configure.in =================================================================== --- configure.in (revision 15475) +++ configure.in (revision 15476) @@ -770,6 +770,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> @@ -792,7 +793,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: ChangeLog =================================================================== --- ChangeLog (revision 15475) +++ ChangeLog (revision 15476) @@ -1,3 +1,10 @@ +Fri Feb 15 02:40:54 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. + Thu Feb 14 23:56:38 2008 Nobuyoshi Nakada <nobu@r...> * eval_error.c (error_print): append a newline to rest lines. Index: version.h =================================================================== --- version.h (revision 15475) +++ version.h (revision 15476) @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2008-02-14" +#define RUBY_RELEASE_DATE "2008-02-15" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20080214 +#define RUBY_RELEASE_CODE 20080215 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 14 +#define RUBY_RELEASE_DAY 15 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; Index: signal.c =================================================================== --- signal.c (revision 15475) +++ signal.c (revision 15476) @@ -22,6 +22,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 @@ -629,7 +635,7 @@ } struct trap_arg { -#ifndef _WIN32 +#if USE_TRAP_MASK # ifdef HAVE_SIGPROCMASK sigset_t mask; # else @@ -813,7 +819,7 @@ trap_list[sig].cmd = command; /* enable at least specified signal. */ -#ifndef _WIN32 +#if USE_TRAP_MASK #ifdef HAVE_SIGPROCMASK sigdelset(&arg->mask, sig); #else @@ -823,7 +829,7 @@ return oldcmd; } -#ifndef _WIN32 +#if USE_TRAP_MASK static VALUE trap_ensure(struct trap_arg *arg) { @@ -841,7 +847,7 @@ void rb_trap_restore_mask(void) { -#ifndef _WIN32 +#if USE_TRAP_MASK # ifdef HAVE_SIGPROCMASK sigprocmask(SIG_SETMASK, &trap_last_mask, NULL); # else @@ -904,7 +910,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); @@ -955,7 +961,7 @@ init_sigchld(int sig) { sighandler_t oldfunc; -#ifndef _WIN32 +#if USE_TRAP_MASK # ifdef HAVE_SIGPROCMASK sigset_t mask; # else @@ -963,7 +969,7 @@ # endif #endif -#ifndef _WIN32 +#if USE_TRAP_MASK /* disable interrupt */ # ifdef HAVE_SIGPROCMASK sigfillset(&mask); @@ -980,7 +986,7 @@ trap_list[sig].cmd = 0; } -#ifndef _WIN32 +#if USE_TRAP_MASK #ifdef HAVE_SIGPROCMASK sigdelset(&mask, sig); sigprocmask(SIG_SETMASK, &mask, NULL); Index: ruby_1_8/configure.in =================================================================== --- ruby_1_8/configure.in (revision 15475) +++ ruby_1_8/configure.in (revision 15476) @@ -670,6 +670,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> @@ -692,7 +693,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/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 15475) +++ ruby_1_8/ChangeLog (revision 15476) @@ -1,3 +1,10 @@ +Fri Feb 15 02:40:54 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. + Thu Feb 14 17:44:32 2008 Yukihiro Matsumoto <matz@r...> * ext/dl/ptr.c (dlmem_each_i): typo fixed. a patch from IKOMA Index: ruby_1_8/version.h =================================================================== --- ruby_1_8/version.h (revision 15475) +++ ruby_1_8/version.h (revision 15476) @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.8.6" -#define RUBY_RELEASE_DATE "2008-02-14" +#define RUBY_RELEASE_DATE "2008-02-15" #define RUBY_VERSION_CODE 186 -#define RUBY_RELEASE_CODE 20080214 +#define RUBY_RELEASE_CODE 20080215 #define RUBY_PATCHLEVEL 5000 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 14 +#define RUBY_RELEASE_DAY 15 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; Index: ruby_1_8/signal.c =================================================================== --- ruby_1_8/signal.c (revision 15475) +++ ruby_1_8/signal.c (revision 15476) @@ -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 @@ -666,7 +672,7 @@ } struct trap_arg { -#ifndef _WIN32 +#if USE_TRAP_MASK # ifdef HAVE_SIGPROCMASK sigset_t mask; # else @@ -815,7 +821,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 @@ -825,7 +831,7 @@ return oldcmd; } -#ifndef _WIN32 +#if USE_TRAP_MASK static VALUE trap_ensure(arg) struct trap_arg *arg; @@ -844,7 +850,7 @@ void rb_trap_restore_mask() { -#ifndef _WIN32 +#if USE_TRAP_MASK # ifdef HAVE_SIGPROCMASK sigprocmask(SIG_SETMASK, &trap_last_mask, NULL); # else @@ -904,7 +910,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); @@ -987,7 +993,7 @@ int sig; { sighandler_t oldfunc; -#ifndef _WIN32 +#if USE_TRAP_MASK # ifdef HAVE_SIGPROCMASK sigset_t mask; # else @@ -995,7 +1001,7 @@ # endif #endif -#ifndef _WIN32 +#if USE_TRAP_MASK /* disable interrupt */ # ifdef HAVE_SIGPROCMASK sigfillset(&mask); @@ -1012,7 +1018,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/