summaryrefslogtreecommitdiff
path: root/lang/kaffe/patches
diff options
context:
space:
mode:
authortonio <tonio@pkgsrc.org>2005-12-07 16:25:51 +0000
committertonio <tonio@pkgsrc.org>2005-12-07 16:25:51 +0000
commitd2fae502d08a9cda8766bb99aa7cc3fb34aa53c5 (patch)
treec438b8cc13cfc7ba45f4d726b78783cbaecb64c1 /lang/kaffe/patches
parenteb1d35b2f06fc503a8da8b4f8240645b4b387958 (diff)
downloadpkgsrc-d2fae502d08a9cda8766bb99aa7cc3fb34aa53c5.tar.gz
Add patch-ah to fix build under netbsd alpha for PR 32113
Thanks riz@ for the testing machine Take maintainership
Diffstat (limited to 'lang/kaffe/patches')
-rw-r--r--lang/kaffe/patches/patch-ah58
1 files changed, 58 insertions, 0 deletions
diff --git a/lang/kaffe/patches/patch-ah b/lang/kaffe/patches/patch-ah
new file mode 100644
index 00000000000..dacf3d9ef20
--- /dev/null
+++ b/lang/kaffe/patches/patch-ah
@@ -0,0 +1,58 @@
+$NetBSD: patch-ah,v 1.5 2005/12/07 16:25:51 tonio Exp $
+
+--- config/alpha/netbsd1/md.h.orig 2005-07-04 00:02:55.000000000 +0200
++++ config/alpha/netbsd1/md.h
+@@ -15,6 +15,19 @@
+ #include "alpha/common.h"
+ #include "alpha/threads.h"
+
++#if defined(HAVE_SIGNAL_H)
++#include <signal.h>
++#endif
++#if defined(HAVE_SYS_RESOURCE_H)
++#include <sys/resource.h>
++#endif
++#if defined(HAVE_SYS_SIGNAL_H)
++#include <sys/signal.h>
++#endif
++#if defined(HAVE_UNISTD_H)
++#include <unistd.h>
++#endif
++
+ #if defined(TRANSLATOR)
+ #include "jit-md.h"
+ #endif
+@@ -29,4 +42,33 @@ extern void init_md(void);
+ #undef SP_OFFSET
+ #define SP_OFFSET 34
+
++#if defined(HAVE_SYS_UCONTEXT_H)
++#include <sys/ucontext.h>
++
++/* older netbsd's could have this macro missing, so we provide it */
++#ifndef _UC_MACHINE_SP
++#define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_UESP])
++#endif
++#ifndef _UC_MACHINE_PC
++#define _UC_MACHINE_PC(uc) ((uc)->uc_mcontext.__gregs[_REG_EIP])
++#endif
++
++#define SIGCONTEXT ucontext_t
++
++#define SIGNAL_ARGS(sig, sc) int sig, siginfo_t *__si, void *sc
++#define SIGNAL_CONTEXT_POINTER(scp) SIGCONTEXT *scp
++#define SIGNAL_PC(scp) _UC_MACHINE_PC(((SIGCONTEXT *)(scp)))
++#define STACK_POINTER(scp) _UC_MACHINE_SP(((SIGCONTEXT *)(scp)))
++#define GET_SIGNAL_CONTEXT_POINTER(sc) (sc)
++
++#else
++
++#define SIGNAL_ARGS(sig, sc) int sig, int __code, struct sigcontext *sc
++#define SIGNAL_CONTEXT_POINTER(scp) struct sigcontext *scp
++#define GET_SIGNAL_CONTEXT_POINTER(sc) (sc)
++#define SIGNAL_PC(scp) (scp)->sc_pc
++#define STACK_POINTER(scp) (scp)->sc_sp
++
++#endif
++
+ #endif