diff --git a/error.c b/error.c index f8d2545fa6..e29910ae92 100644 --- a/error.c +++ b/error.c @@ -599,7 +599,7 @@ rb_bug(const char *fmt, ...) } 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 2876e8706e..8fb43067cb 100644 --- a/signal.c +++ b/signal.c @@ -507,13 +507,8 @@ static struct { 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 30559b0255..685005336b 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 #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