ruby-changes:8971
From: yugui <ko1@a...>
Date: Thu, 4 Dec 2008 17:57:26 +0900 (JST)
Subject: [ruby-changes:8971] Ruby:r20506 (ruby_1_9_1): merges r20482 from trunk into ruby_1_9_1.
yugui 2008-12-04 17:55:54 +0900 (Thu, 04 Dec 2008) New Revision: 20506 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20506 Log: merges r20482 from trunk into ruby_1_9_1. * ext/curses/curses.c (window_getch): avoid ISPRINT() macro which has an issue with OpenSolaris. [ruby-core:20189] * signal.c (ruby_signal): EINVAL from sigaction(2) is not a bug. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/ext/curses/curses.c branches/ruby_1_9_1/signal.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20505) +++ ruby_1_9_1/ChangeLog (revision 20506) @@ -1,3 +1,10 @@ +Thu Dec 4 13:56:31 2008 Yukihiro Matsumoto <matz@r...> + + * ext/curses/curses.c (window_getch): avoid ISPRINT() macro which + has an issue with OpenSolaris. [ruby-core:20189] + + * signal.c (ruby_signal): EINVAL from sigaction(2) is not a bug. + Thu Dec 4 11:38:40 2008 Akinori MUSHA <knu@i...> * vm_method.c (rb_obj_respond_to): Remove a duplicated rdoc Index: ruby_1_9_1/ext/curses/curses.c =================================================================== --- ruby_1_9_1/ext/curses/curses.c (revision 20505) +++ ruby_1_9_1/ext/curses/curses.c (revision 20506) @@ -416,7 +416,7 @@ curses_stdscr(); c = getch(); if (c == EOF) return Qnil; - if (ISPRINT(c)) { + if (rb_isprint(c)) { char ch = (char)c; return rb_locale_str_new(&ch, 1); Index: ruby_1_9_1/signal.c =================================================================== --- ruby_1_9_1/signal.c (revision 20505) +++ ruby_1_9_1/signal.c (revision 20506) @@ -15,6 +15,7 @@ #include "vm_core.h" #include <signal.h> #include <stdio.h> +#include <errno.h> #ifdef _WIN32 typedef LONG rb_atomic_t; @@ -474,8 +475,11 @@ if (signum == SIGSEGV) sigact.sa_flags |= SA_ONSTACK; #endif - if (sigaction(signum, &sigact, &old) < 0) - rb_bug("sigaction error.\n"); + if (sigaction(signum, &sigact, &old) < 0) { + if (errno != 0 && errno != EINVAL) { + rb_bug("sigaction error.\n"); + } + } return old.sa_handler; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/