2013-09-26 17:14:40 +02:00

127 lines
2.7 KiB
Plaintext

$NetBSD: patch-aq,v 1.4 2011/08/30 10:43:11 christos Exp $
--- signal.c.orig 2007-01-12 00:08:38.000000000 +0200
+++ signal.c 2011-08-30 12:50:29.000000000 +0300
@@ -36,12 +36,27 @@
#include "defs.h"
#include <signal.h>
+#include <sys/param.h>
#include <sys/user.h>
#include <fcntl.h>
-#ifdef SVR4
+#if defined(SVR4) || defined(NETBSD)
#include <sys/ucontext.h>
#endif /* SVR4 */
+#ifdef NETBSD
+#if !defined(UC_CPU) && defined(_UC_CPU)
+#define UC_CPU _UC_CPU
+#endif
+#if !defined(UC_SIGMASK) && defined(_UC_SIGMASK)
+#define UC_SIGMASK _UC_SIGMASK
+#endif
+#if !defined(UC_STACK) && defined(_UC_STACK)
+#define UC_STACK _UC_STACK
+#endif
+#if !defined(UC_FPU) && defined(_UC_FPU)
+#define UC_FPU _UC_FPU
+#endif
+#endif
#ifdef HAVE_SYS_REG_H
# include <sys/reg.h>
@@ -1056,14 +1071,14 @@
return 0;
}
-#if defined(SUNOS4) || defined(FREEBSD)
+#if defined(SUNOS4) || defined(ALLBSD)
int
sys_sigblock(tcp)
struct tcb *tcp;
{
return sys_sigsetmask(tcp);
}
-#endif /* SUNOS4 || FREEBSD */
+#endif /* SUNOS4 || ALLBSD */
#endif /* !SVR4 */
@@ -1165,13 +1180,13 @@
printsignal(tcp->u_arg[0]);
tprintf(", ");
switch (tcp->u_arg[1]) {
- case (int) SIG_ERR:
+ case (long) SIG_ERR:
tprintf("SIG_ERR");
break;
- case (int) SIG_DFL:
+ case (long) SIG_DFL:
tprintf("SIG_DFL");
break;
- case (int) SIG_IGN:
+ case (long) SIG_IGN:
#ifndef USE_PROCFS
if (tcp->u_arg[0] == SIGTRAP) {
tcp->flags |= TCB_SIGTRAPPED;
@@ -1193,11 +1208,11 @@
}
else {
switch (tcp->u_rval) {
- case (int) SIG_ERR:
+ case (long) SIG_ERR:
tcp->auxstr = "SIG_ERR"; break;
- case (int) SIG_DFL:
+ case (long) SIG_DFL:
tcp->auxstr = "SIG_DFL"; break;
- case (int) SIG_IGN:
+ case (long) SIG_IGN:
tcp->auxstr = "SIG_IGN"; break;
default:
tcp->auxstr = NULL;
@@ -1489,7 +1504,7 @@
#endif /* LINUX */
-#if defined(SVR4) || defined(FREEBSD)
+#if defined(SVR4) || defined(ALLBSD)
int
sys_sigsuspend(tcp)
@@ -1521,7 +1536,7 @@
#endif /* !FREEBSD */
#endif /* SVR4 || FREEBSD */
-#if defined SVR4 || defined LINUX || defined FREEBSD
+#if defined SVR4 || defined LINUX || defined ALLBSD
#if defined LINUX && !defined SS_ONSTACK
#define SS_ONSTACK 1
#define SS_DISABLE 2
@@ -1613,7 +1628,7 @@
#endif /* SVR4 */
-#if defined(LINUX) || defined(FREEBSD)
+#if defined(LINUX) || defined(ALLBSD)
static int
print_stack_t(tcp, addr)
@@ -1702,14 +1717,14 @@
return 0;
}
-#if defined(FREEBSD) || defined(SUNOS4)
+#if defined(ALLBSD) || defined(SUNOS4)
int
sys_killpg(tcp)
struct tcb *tcp;
{
return sys_kill(tcp);
}
-#endif /* FREEBSD || SUNOS4 */
+#endif /* ALLBSD || SUNOS4 */
#ifdef LINUX
int