
/* Copyright (c) 1987 Edinburgh Portable Compilers Ltd. All Rights Reserved. */

/*
                                                                         signal6
  06/09/89  - Generic version for fortran
            - has conditional complation for core dump call using 
            - compilation constants with -D
*/
#include <signal.h>
#include "ftnht.h"
 
#if target==drs || target==pn
    extern abort();
#endif

extern onsignal(); 
 
setsigs ()
{
         /* Set traps to take interrupts to IMP diagnostics */
 
    if ((int)signal(SIGFPE,  SIG_IGN) != SIG_IGN) signal(SIGFPE,  onsignal);
    if ((int)signal(SIGILL,  SIG_IGN) != SIG_IGN) signal(SIGILL,  onsignal);
    if ((int)signal(SIGEMT,  SIG_IGN) != SIG_IGN) signal(SIGEMT,  onsignal);
    if ((int)signal(SIGSEGV, SIG_IGN) != SIG_IGN) signal(SIGSEGV, onsignal);
    if ((int)signal(SIGIOT,  SIG_IGN) != SIG_IGN) signal(SIGIOT,  onsignal);
    if ((int)signal(SIGQUIT, SIG_IGN) != SIG_IGN) signal(SIGQUIT, onsignal);
    if ((int)signal(SIGBUS,  SIG_IGN) != SIG_IGN) signal(SIGBUS,  onsignal);
}


#if target==unisys || target==pn
coredump()
{
    signal(SIGIOT, SIG_DFL); /* disable IOT trap to allow abort*/
    abort();
}

s_sizeof()
{
}
#endif

