* config/m32r/m32r.h (BIG_ENDIAN_BIT): Deleted to fix endian bug.
[official-gcc.git] / libf2c / libF77 / setsig.c
blob96826be94fd1b58ee5f69c75c6ea38d120d69355
1 /* Set up the signal behavior. */
3 #include <stdio.h>
4 #include "signal1.h"
6 #ifndef SIGIOT
7 #ifdef SIGABRT
8 #define SIGIOT SIGABRT
9 #endif
10 #endif
12 #include <stdlib.h>
14 extern void sig_die (char *, int);
16 static void
17 sigfdie (Sigarg)
19 Use_Sigarg;
20 sig_die ("Floating Exception", 1);
24 static void
25 sigidie (Sigarg)
27 Use_Sigarg;
28 sig_die ("IOT Trap", 1);
31 #ifdef SIGQUIT
32 static void
33 sigqdie (Sigarg)
35 Use_Sigarg;
36 sig_die ("Quit signal", 1);
38 #endif
41 static void
42 sigindie (Sigarg)
44 Use_Sigarg;
45 sig_die ("Interrupt", 0);
48 static void
49 sigtdie (Sigarg)
51 Use_Sigarg;
52 sig_die ("Killed", 0);
55 #ifdef SIGTRAP
56 static void
57 sigtrdie (Sigarg)
59 Use_Sigarg;
60 sig_die ("Trace trap", 1);
62 #endif
65 void
66 f_setsig ()
68 signal1 (SIGFPE, sigfdie); /* ignore underflow, enable overflow */
69 #ifdef SIGIOT
70 signal1 (SIGIOT, sigidie);
71 #endif
72 #ifdef SIGTRAP
73 signal1 (SIGTRAP, sigtrdie);
74 #endif
75 #ifdef SIGQUIT
76 if (signal1 (SIGQUIT, sigqdie) == SIG_IGN)
77 signal1 (SIGQUIT, SIG_IGN);
78 #endif
79 if (signal1 (SIGINT, sigindie) == SIG_IGN)
80 signal1 (SIGINT, SIG_IGN);
81 signal1 (SIGTERM, sigtdie);
83 #ifdef pdp11
84 ldfps (01200); /* detect overflow as an exception */
85 #endif