Daily bump.
[official-gcc.git] / libjava / include / default-signal.h
blob6aea73468f52dc7ab3e3980e35e9f97ae8a79315
1 // default-signal.h - Catch runtime signals and turn them into exceptions.
3 /* Copyright (C) 1998, 1999, 2000 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
11 #ifndef JAVA_SIGNAL_H
12 #define JAVA_SIGNAL_H 1
14 #ifdef SJLJ_EXCEPTIONS
16 #define HANDLE_SEGV 1
17 #define HANDLE_FPE 1
19 #include <signal.h>
21 #define SIGNAL_HANDLER(_name) \
22 static void _name (int _dummy __attribute__ ((__unused__)))
24 #define INIT_SEGV \
25 do \
26 { \
27 signal (SIGSEGV, catch_segv); \
28 } \
29 while (0)
31 #define INIT_FPE \
32 do \
33 { \
34 signal (SIGFPE, catch_fpe); \
35 } \
36 while (0)
38 #define MAKE_THROW_FRAME(_exception) do {} while (0)
40 #else /* SJLJ_EXCEPTIONS */
42 #undef HANDLE_SEGV
43 #undef HANDLE_FPE
45 #define INIT_SEGV do {} while (0)
46 #define INIT_FPE do {} while (0)
48 #endif /* SJLJ_EXCEPTIONS */
50 #endif /* JAVA_SIGNAL_H */