From 0abd67ea190c4cb7deacc227c2c9e9e945ac9598 Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 23 Nov 2008 07:07:34 +0000 Subject: [PATCH] * signal.c (default_handler, Init_signal): compile error if USE_SIGALTSTACK is not defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ signal.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3723685849..e6b2b5ee32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Nov 23 16:04:05 2008 Yuki Sonoda (Yugui) + + * signal.c (default_handler, Init_signal): compile error if + USE_SIGALTSTACK is not defined. + Sun Nov 23 00:04:14 2008 Yuki Sonoda (Yugui) * signal.c (ALT_STACK_SIZE): 4KB is not enough on Mac OS X. diff --git a/signal.c b/signal.c index 0c98237f46..3ede0ec6db 100644 --- a/signal.c +++ b/signal.c @@ -699,7 +699,9 @@ default_handler(int sig) #ifdef SIGSEGV case SIGSEGV: func = sigsegv; +#ifdef USE_SIGALTSTACK register_sigaltstack(); +#endif break; #endif #ifdef SIGPIPE @@ -1107,7 +1109,9 @@ Init_signal(void) install_sighandler(SIGBUS, sigbus); #endif #ifdef SIGSEGV +#ifdef USE_SIGALTSTACK register_sigaltstack(); +#endif install_sighandler(SIGSEGV, sigsegv); #endif }