1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Signal handler type should be void

This commit is contained in:
Nobuyoshi Nakada 2020-12-12 16:06:19 +09:00
parent 21c5726418
commit 0df67a4695
Notes: git 2020-12-12 17:03:08 +09:00
5 changed files with 9 additions and 12 deletions

View file

@ -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)

View file

@ -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);

View file

@ -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)
{
}

View file

@ -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 */

View file

@ -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