fix compilation warnings.
This commit is contained in:
parent
d12762ffa2
commit
58943e4c26
36
C/sysbits.c
36
C/sysbits.c
@ -1263,8 +1263,10 @@ my_signal(int sig, void (*handler)(int, siginfo_t *, ucontext_t *))
|
|||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
|
|
||||||
STATIC_PROTO (RETSIGTYPE HandleMatherr, (int));
|
STATIC_PROTO (RETSIGTYPE HandleMatherr, (int));
|
||||||
|
#if HAVE_SIGSEGV && !defined(THREADS)
|
||||||
STATIC_PROTO (RETSIGTYPE HandleSIGSEGV, (int,siginfo_t *,void *));
|
STATIC_PROTO (RETSIGTYPE HandleSIGSEGV, (int,siginfo_t *,void *));
|
||||||
STATIC_PROTO (void my_signal_info, (int, void (*)(int,siginfo_t *,void *)));
|
STATIC_PROTO (void my_signal_info, (int, void (*)(int,siginfo_t *,void *)));
|
||||||
|
#endif
|
||||||
STATIC_PROTO (void my_signal, (int, void (*)(int)));
|
STATIC_PROTO (void my_signal, (int, void (*)(int)));
|
||||||
|
|
||||||
/******** Handling floating point errors *******************/
|
/******** Handling floating point errors *******************/
|
||||||
@ -1321,6 +1323,23 @@ HandleMatherr(int sig)
|
|||||||
Yap_Error(Yap_matherror, TermNil, "");
|
Yap_Error(Yap_matherror, TermNil, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_SIGSEGV && !defined(THREADS)
|
||||||
|
static void
|
||||||
|
my_signal_info(int sig, void (*handler)(int,siginfo_t *,void *))
|
||||||
|
{
|
||||||
|
struct sigaction sigact;
|
||||||
|
|
||||||
|
sigact.sa_sigaction = handler;
|
||||||
|
sigemptyset(&sigact.sa_mask);
|
||||||
|
#if HAVE_SIGINFO
|
||||||
|
sigact.sa_flags = SA_SIGINFO;
|
||||||
|
#else
|
||||||
|
sigact.sa_flags = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
sigaction(sig,&sigact,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SearchForTrailFault(siginfo_t *siginfo)
|
SearchForTrailFault(siginfo_t *siginfo)
|
||||||
{
|
{
|
||||||
@ -1347,7 +1366,6 @@ SearchForTrailFault(siginfo_t *siginfo)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_SIGSEGV && !defined(THREADS)
|
|
||||||
static RETSIGTYPE
|
static RETSIGTYPE
|
||||||
HandleSIGSEGV(int sig, siginfo_t *siginfo, void *context)
|
HandleSIGSEGV(int sig, siginfo_t *siginfo, void *context)
|
||||||
{
|
{
|
||||||
@ -1358,22 +1376,6 @@ HandleSIGSEGV(int sig, siginfo_t *siginfo, void *context)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
|
||||||
my_signal_info(int sig, void (*handler)(int,siginfo_t *,void *))
|
|
||||||
{
|
|
||||||
struct sigaction sigact;
|
|
||||||
|
|
||||||
sigact.sa_sigaction = handler;
|
|
||||||
sigemptyset(&sigact.sa_mask);
|
|
||||||
#if HAVE_SIGINFO
|
|
||||||
sigact.sa_flags = SA_SIGINFO;
|
|
||||||
#else
|
|
||||||
sigact.sa_flags = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sigaction(sig,&sigact,NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
my_signal(int sig, void (*handler)(int))
|
my_signal(int sig, void (*handler)(int))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user