From 39cc7f692367aa30b58d1bbe0b2742b92a9fd935 Mon Sep 17 00:00:00 2001 From: sof Date: Sun, 18 May 1997 03:58:13 +0000 Subject: [PATCH] [project @ 1997-05-18 03:58:13 by sof] 2.03 update (AIX mods) --- ghc/runtime/main/Signals.lc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ghc/runtime/main/Signals.lc b/ghc/runtime/main/Signals.lc index 1b1af46..fea62a7 100644 --- a/ghc/runtime/main/Signals.lc +++ b/ghc/runtime/main/Signals.lc @@ -31,7 +31,7 @@ much pain. # define NON_POSIX_SOURCE #endif -#if defined(freebsd_TARGET_OS) +#if defined(freebsd_TARGET_OS) || defined(aix_TARGET_OS) # define NON_POSIX_SOURCE #endif @@ -121,16 +121,21 @@ Fun, eh? \begin{code} # if defined(sunos4_TARGET_OS) || defined(freebsd_TARGET_OS) \ - || defined(linux_TARGET_OS) || defined(linuxaout_TARGET_OS) + || defined(linux_TARGET_OS) || defined(linuxaout_TARGET_OS) \ + || defined(aix_TARGET_OS) static void segv_handler(int sig, /* NB: all except first argument are "implementation defined" */ # if defined(sunos4_TARGET_OS) || defined(freebsd_TARGET_OS) int code, struct sigcontext *scp, caddr_t addr) -# else /* linux */ +# else /* linux || aix */ +# if defined(aix_TARGET_OS) + int code, struct sigcontext *scp) +# else /* linux */ struct sigcontext_struct scp) -# endif /* linux */ +# endif +# endif { extern void StackOverflow(STG_NO_ARGS) STG_NORETURN; @@ -138,7 +143,10 @@ segv_handler(int sig, caddr_t addr = scp.cr2; /* Magic info from Tommy Thorn! */ # endif - +# if defined(aix_TARGET_OS) + caddr_t addr = scp->sc_jmpbuf.jmp_context.o_vaddr; + /* Magic guess by andre */ +# endif if (addr >= (caddr_t) stks_space && addr < (caddr_t) (stks_space + RTSflags.GcFlags.stksSize)) StackOverflow(); -- 1.7.10.4