[kaffe] CVS kaffe (guilhem): Fixes for Darwin.

Kaffe CVS cvs-commits at kaffe.org
Thu Sep 9 11:49:54 PDT 2004


PatchSet 5148 
Date: 2004/09/09 18:46:09
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixes for Darwin.

        * config/i386/darwin/md.h, config/powerpc/darwin/md.h
        (SIGNAL_ARGS, SIGNAL_CONTEXT_POINTER, GET_SIGNAL_CONTEXT_POINTER,
        SIGNAL_PC, STACK_POINTER): Updated to avoid siginfo_t.

        Original patch from Michael Franz <mvfranz at gmail.com>.

Members: 
	ChangeLog:1.2704->1.2705 
	config/i386/darwin/md.h:1.1->1.2 
	config/powerpc/darwin/md.h:1.8->1.9 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2704 kaffe/ChangeLog:1.2705
--- kaffe/ChangeLog:1.2704	Mon Sep  6 19:07:09 2004
+++ kaffe/ChangeLog	Thu Sep  9 18:46:09 2004
@@ -1,3 +1,11 @@
+2004-09-09  Guilhem Lavaux <guilhem at kaffe.org>
+
+	* config/i386/darwin/md.h, config/powerpc/darwin/md.h
+	(SIGNAL_ARGS, SIGNAL_CONTEXT_POINTER, GET_SIGNAL_CONTEXT_POINTER,
+	SIGNAL_PC, STACK_POINTER): Updated to avoid siginfo_t.
+
+	Original patch from Michael Franz <mvfranz at gmail.com>.
+	
 2004-09-06  Dalibor Topic  <robilad at kaffe.org>
 
         * m4/gwqt.m4:
Index: kaffe/config/i386/darwin/md.h
diff -u kaffe/config/i386/darwin/md.h:1.1 kaffe/config/i386/darwin/md.h:1.2
--- kaffe/config/i386/darwin/md.h:1.1	Wed Aug  4 20:23:59 2004
+++ kaffe/config/i386/darwin/md.h	Thu Sep  9 18:46:12 2004
@@ -27,31 +27,21 @@
 #if defined(HAVE_SYS_RESOURCE_H)
 #include <sys/resource.h>
 #endif
+#if defined(HAVE_SYS_SIGNAL_H)
+#include <sys/signal.h>
+#endif
 
 #undef SP_OFFSET
 #define SP_OFFSET	9
 
-#if defined(SA_SIGINFO)
-#define SIGNAL_ARGS(sig, sc) int sig, siginfo_t *sc
-#define SIGNAL_CONTEXT_POINTER(scp) siginfo_t *scp
-#define GET_SIGNAL_CONTEXT_POINTER(sc) (sc)
-#define SIGNAL_PC(scp) 0
-#define STACK_POINTER(scp) ((scp)->si_addr)
-#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(scp) (scp)
+#define SIGNAL_PC(scp) ((scp)->sc_eip)
+#define STACK_POINTER(scp) ((scp)->sc_esp)
 
 #undef HAVE_SIGALTSTACK
-#if defined(HAVE_SYS_SIGNAL_H)
-#include <sys/signal.h>
-typedef struct sigcontext sigcontext_t;
-#endif
-
-typedef struct  sigaltstack stack_t;
-#define SIGNAL_ARGS(sig, sc) int sig, sigcontext_t *sc
-#define SIGNAL_CONTEXT_POINTER(scp) sigcontext_t *scp
-#define GET_SIGNAL_CONTEXT_POINTER(sc) (sc)
-#define SIGNAL_PC(scp) ((scp)->sc_ir)
-#define STACK_POINTER(scp) ((scp)->sc_sp)
-#endif
+#define STACK_T struct sigaltstack
 
 #define DARWIN
 
Index: kaffe/config/powerpc/darwin/md.h
diff -u kaffe/config/powerpc/darwin/md.h:1.8 kaffe/config/powerpc/darwin/md.h:1.9
--- kaffe/config/powerpc/darwin/md.h:1.8	Fri Jul 23 17:02:54 2004
+++ kaffe/config/powerpc/darwin/md.h	Thu Sep  9 18:46:13 2004
@@ -27,33 +27,23 @@
 #if defined(HAVE_SYS_RESOURCE_H)
 #include <sys/resource.h>
 #endif
-
-#undef SP_OFFSET
-#define SP_OFFSET	0
-
-#if defined(SA_SIGINFO)
-#define SIGNAL_ARGS(sig, sc) int sig, siginfo_t *sc
-#define SIGNAL_CONTEXT_POINTER(scp) siginfo_t *scp
-#define GET_SIGNAL_CONTEXT_POINTER(sc) (sc)
-#define SIGNAL_PC(scp) 0
-#define STACK_POINTER(scp) ((scp)->si_addr)
-#else
-
-#undef HAVE_SIGALTSTACK
 #if defined(HAVE_SYS_SIGNAL_H)
 #include <sys/signal.h>
-typedef struct sigcontext sigcontext_t;
 #endif
 
-typedef struct  sigaltstack stack_t;
-#define SIGNAL_ARGS(sig, sc) int sig, sigcontext_t *sc
-#define SIGNAL_CONTEXT_POINTER(scp) sigcontext_t *scp
-#define GET_SIGNAL_CONTEXT_POINTER(sc) (sc)
-#define SIGNAL_PC(scp) ((scp)->sc_ir)
-#define STACK_POINTER(scp) ((scp)->sc_sp)
-#endif
+#undef SP_OFFSET
+#define SP_OFFSET	0
+
+#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(scp) (scp)
+#define SIGNAL_PC(scp) (scp)->sc_pc
+#define STACK_POINTER(scp) (scp)->sc_sp
 
 #define DARWIN
+
+#undef HAVE_SIGALTSTACK
+#define STACK_T struct sigaltstack
 
 #include "kaffe-unix-stack.h"
 




More information about the kaffe mailing list