[kaffe] CVS kaffe (tonio): config/i386/netbsd1/md.h: Fixed typo, caused problem for old netbsd

Kaffe CVS cvs-commits at kaffe.org
Thu Dec 8 08:29:38 PST 2005


PatchSet 6990 
Date: 2005/12/08 16:17:39
Author: tonio
Branch: HEAD
Tag: (none) 
Log:
* config/i386/netbsd1/md.h: Fixed typo, caused problem for old netbsd
* config/alpha/netbsd1/md.h: Fix build for recent netbsd, by adapting
  the i386 code

Members: 
	ChangeLog:1.4511->1.4512 
	config/alpha/netbsd1/md.h:1.3->1.4 
	config/i386/netbsd1/md.h:1.13->1.14 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4511 kaffe/ChangeLog:1.4512
--- kaffe/ChangeLog:1.4511	Thu Dec  8 01:50:17 2005
+++ kaffe/ChangeLog	Thu Dec  8 16:17:39 2005
@@ -1,3 +1,8 @@
+2005-12-08  Antoine Reilles  <tonio at kaffe.org>
+	* config/i386/netbsd1/md.h: Fixed typo, caused problem for old netbsd
+	* config/alpha/netbsd1/md.h: Fix build for recent netbsd, by adapting
+	the i386 code
+
 2005-12-08  Dalibor Topic  <robilad at kaffe.org>
 
         * libraries/javalib/external/classpath: Resynched GNU Classpath.
Index: kaffe/config/alpha/netbsd1/md.h
diff -u kaffe/config/alpha/netbsd1/md.h:1.3 kaffe/config/alpha/netbsd1/md.h:1.4
--- kaffe/config/alpha/netbsd1/md.h:1.3	Wed May 21 08:40:41 2003
+++ kaffe/config/alpha/netbsd1/md.h	Thu Dec  8 16:17:40 2005
@@ -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
@@ -28,5 +41,34 @@
  */
 #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_SP])
+#endif
+#ifndef _UC_MACHINE_PC
+#define _UC_MACHINE_PC(uc)      ((uc)->uc_mcontext.__gregs[_REG_PC])
+#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
Index: kaffe/config/i386/netbsd1/md.h
diff -u kaffe/config/i386/netbsd1/md.h:1.13 kaffe/config/i386/netbsd1/md.h:1.14
--- kaffe/config/i386/netbsd1/md.h:1.13	Mon Jul 11 14:23:53 2005
+++ kaffe/config/i386/netbsd1/md.h	Thu Dec  8 16:17:40 2005
@@ -42,10 +42,10 @@
 #include <sys/ucontext.h>
 
 /* older netbsd's could have this macro missing, so we provide it */
-#ifdef _UC_MACHINE_SP
+#ifndef _UC_MACHINE_SP
 #define _UC_MACHINE_SP(uc)      ((uc)->uc_mcontext.__gregs[_REG_UESP])
 #endif
-#ifdef _UC_MACHINE_PC
+#ifndef _UC_MACHINE_PC
 #define _UC_MACHINE_PC(uc)      ((uc)->uc_mcontext.__gregs[_REG_EIP])
 #endif
 




More information about the kaffe mailing list