mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-14 23:46:14 +00:00
Use sig_atomic_t for FP_error when using FP exceptions. (#220)
`sig_atomic_t` is usually `int`, but is the typedef that one should use for flags written to from a signal handler.
This commit is contained in:
parent
d3efbc3441
commit
62a8d400ce
@ -27,7 +27,8 @@
|
||||
-------------------------------------------------- */
|
||||
|
||||
#ifdef FLTINT
|
||||
volatile extern int FP_error;
|
||||
#include <signal.h>
|
||||
extern volatile sig_atomic_t FP_error;
|
||||
|
||||
/* Note that a compiler may very likely move code around the arithmetic
|
||||
operation, causing this test (set by an interrupt handler) to be
|
||||
|
||||
@ -644,7 +644,7 @@ void int_unblock() {
|
||||
/************************************************************************/
|
||||
|
||||
/* The global used to signal floating-point errors */
|
||||
volatile int FP_error = 0;
|
||||
volatile sig_atomic_t FP_error = 0;
|
||||
|
||||
void int_fp_service(int sig, siginfo_t *info, void *context)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user