ruby-changes:58179
From: Nobuyoshi <ko1@a...>
Date: Wed, 9 Oct 2019 23:42:56 +0900 (JST)
Subject: [ruby-changes:58179] 29e6782f5d (master): Share ruby_sighandler_t definition
https://git.ruby-lang.org/ruby.git/commit/?id=29e6782f5d From 29e6782f5dbf127dc20156938af374eea9e2d74e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 9 Oct 2019 23:39:58 +0900 Subject: Share ruby_sighandler_t definition diff --git a/error.c b/error.c index f8d2545..e29910a 100644 --- a/error.c +++ b/error.c @@ -599,7 +599,7 @@ rb_bug(const char *fmt, ...) https://github.com/ruby/ruby/blob/trunk/error.c#L599 } void -rb_bug_for_fatal_signal(RETSIGTYPE (*default_sighandler)(int), int sig, const void *ctx, const char *fmt, ...) +rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *ctx, const char *fmt, ...) { const char *file = NULL; int line = 0; diff --git a/signal.c b/signal.c index 2876e87..8fb4306 100644 --- a/signal.c +++ b/signal.c @@ -507,13 +507,8 @@ static struct { https://github.com/ruby/ruby/blob/trunk/signal.c#L507 volatile unsigned int ruby_nocldwait; #endif -#ifdef __dietlibc__ -#define sighandler_t sh_t -#else #define sighandler_t ruby_sighandler_t -#endif -typedef RETSIGTYPE (*sighandler_t)(int); #ifdef USE_SIGALTSTACK typedef void ruby_sigaction_t(int, siginfo_t*, void*); #define SIGINFO_ARG , siginfo_t *info, void *ctx diff --git a/vm_core.h b/vm_core.h index 30559b0..6850053 100644 --- a/vm_core.h +++ b/vm_core.h @@ -1624,7 +1624,8 @@ extern void rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const https://github.com/ruby/ruby/blob/trunk/vm_core.h#L1624 #define SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp) #define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp)) void rb_vm_bugreport(const void *); -NORETURN(void rb_bug_for_fatal_signal(RETSIGTYPE (*default_sighandler)(int), int sig, const void *, const char *fmt, ...)); +typedef RETSIGTYPE (*ruby_sighandler_t)(int); +NORETURN(void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt, ...)); /* functions about thread/vm execution */ RUBY_SYMBOL_EXPORT_BEGIN -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/