* signal.c (ruby_signal, ruby_nativethread_signal): must be valid as

expressions, not only statements.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-02-22 14:50:33 +00:00
Родитель 6b80542ead
Коммит 6f6b9a9b54
2 изменённых файлов: 17 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Tue Feb 22 23:50:26 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* signal.c (ruby_signal, ruby_nativethread_signal): must be valid as
expressions, not only statements.
Tue Feb 22 07:24:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (parser_yylex): identifier after dot must not be a variable.

Просмотреть файл

@ -386,9 +386,19 @@ posix_nativethread_signal(signum, handler)
}
#endif
#else /* !POSIX_SIGNAL */
#define ruby_signal(sig,handler) {rb_trap_accept_nativethreads[sig] = 0; signal((sig),(handler));}
#define ruby_signal(sig,handler) (rb_trap_accept_nativethreads[sig] = 0, signal((sig),(handler)))
#ifdef HAVE_NATIVETHREAD
#define ruby_nativethread_signal(sig,handler) {signal((sig),(handler));rb_trap_accept_nativethreads[sig] = 1;}
static sighandler_t
ruby_nativethread_signal(signum, handler)
int signum;
sighandler_t handler;
{
sighandler_t old;
old = signal(signum, handler);
rb_trap_accept_nativethreads[signum] = 1;
return old;
}
#endif
#endif