diff --git a/configure.ac b/configure.ac index 65494b4917..1e0310465d 100644 --- a/configure.ac +++ b/configure.ac @@ -1743,7 +1743,6 @@ AS_IF([test $rb_cv_stack_end_address != no], [ dnl Checks for library functions. AC_TYPE_GETGROUPS -AC_TYPE_SIGNAL AS_CASE(["${target_cpu}-${target_os}:${target_archs}"], [powerpc-darwin*], [ AC_LIBSOURCES(alloca.c) diff --git a/include/ruby/internal/intern/signal.h b/include/ruby/internal/intern/signal.h index b6171d1bf4..8739c51f53 100644 --- a/include/ruby/internal/intern/signal.h +++ b/include/ruby/internal/intern/signal.h @@ -20,7 +20,6 @@ * extension libraries. They could be written in C++98. * @brief Signal handling APIs. */ -#include "ruby/internal/config.h" /* POSIX_SIGNAL / RETSIGTYPE */ #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" @@ -30,7 +29,7 @@ RBIMPL_SYMBOL_EXPORT_BEGIN() VALUE rb_f_kill(int, const VALUE*); #ifdef POSIX_SIGNAL #define posix_signal ruby_posix_signal -RETSIGTYPE (*posix_signal(int, RETSIGTYPE (*)(int)))(int); +void (*posix_signal(int, void (*)(int)))(int); #endif const char *ruby_signal_name(int); void ruby_default_signal(int); diff --git a/signal.c b/signal.c index 91521fe807..6eea6aabe2 100644 --- a/signal.c +++ b/signal.c @@ -415,7 +415,7 @@ ruby_default_signal(int sig) raise(sig); } -static RETSIGTYPE sighandler(int sig); +static void sighandler(int sig); static int signal_ignored(int sig); static void signal_enque(int sig); @@ -519,7 +519,7 @@ typedef void ruby_sigaction_t(int, siginfo_t*, void*); #define SIGINFO_ARG , siginfo_t *info, void *ctx #define SIGINFO_CTX ctx #else -typedef RETSIGTYPE ruby_sigaction_t(int); +typedef void ruby_sigaction_t(int); #define SIGINFO_ARG #define SIGINFO_CTX 0 #endif @@ -712,7 +712,7 @@ static rb_atomic_t sigchld_hit; # define GET_SIGCHLD_HIT() 0 #endif -static RETSIGTYPE +static void sighandler(int sig) { int old_errnum = errno; @@ -930,7 +930,7 @@ NOINLINE(static void check_reserved_signal_(const char *name, size_t name_len)); static sighandler_t default_sigbus_handler; NORETURN(static ruby_sigaction_t sigbus); -static RETSIGTYPE +static void sigbus(int sig SIGINFO_ARG) { check_reserved_signal("BUS"); @@ -952,7 +952,7 @@ sigbus(int sig SIGINFO_ARG) static sighandler_t default_sigsegv_handler; NORETURN(static ruby_sigaction_t sigsegv); -static RETSIGTYPE +static void sigsegv(int sig SIGINFO_ARG) { check_reserved_signal("SEGV"); @@ -966,7 +966,7 @@ sigsegv(int sig SIGINFO_ARG) static sighandler_t default_sigill_handler; NORETURN(static ruby_sigaction_t sigill); -static RETSIGTYPE +static void sigill(int sig SIGINFO_ARG) { check_reserved_signal("ILL"); @@ -1031,7 +1031,7 @@ check_reserved_signal_(const char *name, size_t name_len) #endif #if defined SIGPIPE || defined SIGSYS -static RETSIGTYPE +static void sig_do_nothing(int sig) { } diff --git a/vm_core.h b/vm_core.h index f4517233ec..a4c0e874ec 100644 --- a/vm_core.h +++ b/vm_core.h @@ -1631,7 +1631,7 @@ 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 *); -typedef RETSIGTYPE (*ruby_sighandler_t)(int); +typedef void (*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 */ diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 71565f0b71..85c6e9a0ef 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -783,7 +783,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub #define PRI_LL_PREFIX "I64" #define PRI_PIDT_PREFIX PRI_INT_PREFIX #define GETGROUPS_T int -#define RETSIGTYPE void #define TYPEOF_TIMEVAL_TV_SEC long !if $(RT_VER) >= 120 #define HAVE_ACOSH 1