match.pd: Relax some tree_nop_conversion_p
[official-gcc.git] / libjava / include / hppa-signal.h
blob116a62ee852eba02954bcb6cd021be40f16cb6cc
1 /* hppa-signal.h - Catch runtime signals and turn them into exceptions,
2 on a HP-UX 11 PA system. */
4 /* Copyright (C) 2006, 2009 Free Software Foundation
6 This file is part of libgcj.
8 This software is copyrighted work licensed under the terms of the
9 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
10 details. */
12 #ifndef JAVA_SIGNAL_H
13 #define JAVA_SIGNAL_H 1
15 #include <signal.h>
17 #define HANDLE_SEGV 1
18 #define HANDLE_FPE 1
20 #define SIGNAL_HANDLER(_name) \
21 static void _name (int _dummy __attribute__ ((unused)), \
22 siginfo_t *_info __attribute__ ((__unused__)), \
23 void *arg __attribute__ ((__unused__)))
25 #define MAKE_THROW_FRAME(_exception)
27 #define INIT_SEGV \
28 do \
29 { \
30 struct sigaction sa; \
31 sa.sa_sigaction = catch_segv; \
32 sigemptyset (&sa.sa_mask); \
33 sa.sa_flags = SA_SIGINFO | SA_NODEFER; \
34 sigaction (SIGSEGV, &sa, NULL); \
35 } \
36 while (0)
38 #define INIT_FPE \
39 do \
40 { \
41 struct sigaction sa; \
42 sa.sa_sigaction = catch_fpe; \
43 sigemptyset (&sa.sa_mask); \
44 sa.sa_flags = SA_SIGINFO | SA_NODEFER; \
45 sigaction (SIGFPE, &sa, NULL); \
46 } \
47 while (0)
49 #endif /* JAVA_SIGNAL_H */