[MLton-commit] r4615

Matthew Fluet MLton@mlton.org
Sat, 27 May 2006 09:16:23 -0700


'struct sigcontext' no longer available in NetBSD 3.0.


----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.c

----------------------------------------------------------------------

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.c	2006-05-27 14:56:16 UTC (rev 4614)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.c	2006-05-27 16:16:19 UTC (rev 4615)
@@ -9,12 +9,12 @@
 #include "use-mmap.c"
 
 static void catcher (__attribute__ ((unused)) int sig,
-                     __attribute__ ((unused)) int code, 
-                     struct sigcontext *ucp) {
-        GC_handleSigProf ((code_pointer) ucp->sc_eip);
+                     __attribute__ ((unused)) siginfo_t *sip, 
+                     ucontext_t *ucp) {
+        GC_handleSigProf ((code_pointer) ucp->uc_mcontext.__gregs[_REG_EIP]);
 }
 
 void GC_setSigProfHandler (struct sigaction *sa) {
         sa->sa_flags = SA_ONSTACK | SA_RESTART;
-        sa->sa_handler = (void (*)(int))catcher;
+        sa->sa_sigaction = (void (*)(int, siginfo_t*, void*))catcher;
 }