Alex Lin b9b9a46e37 Support RHEL8 on PowerPC architecture #1700
Did a global replace of __linux with __linux__
2024-04-26 13:07:29 -05:00

43 lines
905 B
C++

/*
PURPOSE: (Floating point exception handler)
PROGRAMMERS: (((Robert W. Bailey) (LinCom) (April 1992) (--) (Realtime)))
*/
#include <string.h>
#include <stdio.h>
#include <signal.h>
/*
* FPE specific headers
*/
#ifdef __linux__
#include <fenv.h>
#endif
#include "trick/Executive.hh"
#include "trick/exec_proto.hh"
/**
* @relates Trick::Executive
* C binded function to handle the SIGFPE signal. The handler prints which type of
* floating point error has occured and calls exec_terminate()
* @return void
*/
#if (__APPLE__ | __CYGWIN__ | __INTERIX )
void fpe_sig_handler(int sig __attribute__ ((unused)) )
#else
void fpe_sig_handler(int sig __attribute__ ((unused)), siginfo_t * sip __attribute__ ((unused)), void *uap __attribute__ ((unused)))
#endif
{
Trick::Executive * E = exec_get_exec_cpp();
#if __APPLE__
siginfo_t * sip = NULL ;
#endif
E->fpe_handler(sip) ;
}