summaryrefslogtreecommitdiff
path: root/libjava/include
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/include')
-rw-r--r--libjava/include/powerpc-signal.h30
-rw-r--r--libjava/include/x86_64-signal.h17
2 files changed, 27 insertions, 20 deletions
diff --git a/libjava/include/powerpc-signal.h b/libjava/include/powerpc-signal.h
index 39cdf893710..386fb18291a 100644
--- a/libjava/include/powerpc-signal.h
+++ b/libjava/include/powerpc-signal.h
@@ -13,13 +13,15 @@ details. */
#ifndef JAVA_SIGNAL_H
# define JAVA_SIGNAL_H 1
-# include <signal.h>
-# include <sys/syscall.h>
+# ifndef __powerpc64__
-# define HANDLE_SEGV 1
-# undef HANDLE_FPE
+# include <signal.h>
+# include <sys/syscall.h>
-# define SIGNAL_HANDLER(_name) \
+# define HANDLE_SEGV 1
+# undef HANDLE_FPE
+
+# define SIGNAL_HANDLER(_name) \
static void _name (int /* _signal */, struct sigcontext *_sc)
/* PPC either leaves PC pointing at a faulting instruction or the
@@ -27,7 +29,7 @@ details. */
the former, so we adjust the saved PC to point to the following
instruction. This is what the handler in libgcc expects. */
-# define MAKE_THROW_FRAME(_exception) \
+# define MAKE_THROW_FRAME(_exception) \
do \
{ \
_sc->regs->nip += 4; \
@@ -58,7 +60,7 @@ struct kernel_old_sigaction {
void (*k_sa_restorer) (void);
};
-# define INIT_SEGV \
+# define INIT_SEGV \
do \
{ \
struct kernel_old_sigaction kact; \
@@ -69,7 +71,7 @@ do \
} \
while (0)
-# define INIT_FPE \
+# define INIT_FPE \
do \
{ \
struct kernel_old_sigaction kact; \
@@ -78,7 +80,15 @@ do \
kact.k_sa_flags = 0; \
syscall (SYS_sigaction, SIGFPE, &kact, NULL); \
} \
-while (0)
+while (0)
-#endif /* JAVA_SIGNAL_H */
+# else
+# undef HANDLE_SEGV
+# undef HANDLE_FPE
+
+# define INIT_SEGV do {} while (0)
+# define INIT_FPE do {} while (0)
+# endif
+
+#endif /* JAVA_SIGNAL_H */
diff --git a/libjava/include/x86_64-signal.h b/libjava/include/x86_64-signal.h
index eb034473f9e..ab59e5e69bc 100644
--- a/libjava/include/x86_64-signal.h
+++ b/libjava/include/x86_64-signal.h
@@ -10,14 +10,14 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
+#ifdef __x86_64__
+
#ifndef JAVA_SIGNAL_H
#define JAVA_SIGNAL_H 1
#include <signal.h>
#include <sys/syscall.h>
-#ifdef __x86_64__
-
#define HANDLE_SEGV 1
#define SIGNAL_HANDLER(_name) \
@@ -80,16 +80,13 @@ while (0)
* go away if all systems ever have pthreads libraries that are
* compiled with unwind info. */
-#else /* __x86_64__ */
+#endif /* JAVA_SIGNAL_H */
-/* This is for the 32-bit subsystem on on x86-64. Catching signals
- doesn't yet work on that target. */
+#else /* __x86_64__ */
-#undef HANDLE_SEGV
-#undef HANDLE_FPE
+/* This is for the 32-bit subsystem on on x86-64. */
-#define INIT_SEGV do {} while (0)
-#define INIT_FPE do {} while (0)
+#define sigcontext_struct sigcontext
+#include <java-signal-aux.h>
#endif /* __x86_64__ */
-#endif /* JAVA_SIGNAL_H */