make the Linux sig handler the generic Unix handler
svn: r3955
This commit is contained in:
parent
6dc42e3a8d
commit
4a4ece4e00
|
@ -11,17 +11,6 @@
|
||||||
/* platform-specific handlers */
|
/* platform-specific handlers */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
/* ========== Linux signal handler ========== */
|
|
||||||
#if defined(linux)
|
|
||||||
# include <signal.h>
|
|
||||||
void fault_handler(int sn, struct siginfo *si, void *ctx)
|
|
||||||
{
|
|
||||||
designate_modified(si->si_addr);
|
|
||||||
# define NEED_SIGACTION
|
|
||||||
# define USE_SIGACTON_SIGNAL_KIND SIGSEGV
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ========== FreeBSD signal handler ========== */
|
/* ========== FreeBSD signal handler ========== */
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
|
@ -66,6 +55,17 @@ typedef LONG (WINAPI*gcPVECTORED_EXCEPTION_HANDLER)(LPEXCEPTION_POINTERS e);
|
||||||
# define NEED_OSX_MACH_HANDLER
|
# define NEED_OSX_MACH_HANDLER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* ========== Generic Unix handler ========== */
|
||||||
|
#if !defined(NEED_SIGACTION) && !defined(NEED_SIGWIN) && !defined(NEED_OSX_MACH_HANDLER)
|
||||||
|
# include <signal.h>
|
||||||
|
void fault_handler(int sn, struct siginfo *si, void *ctx)
|
||||||
|
{
|
||||||
|
designate_modified(si->si_addr);
|
||||||
|
# define NEED_SIGACTION
|
||||||
|
# define USE_SIGACTON_SIGNAL_KIND SIGSEGV
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* init function */
|
/* init function */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user