From 412b49f9e6773b3404e64b3ffebb05fdcfad2b61 Mon Sep 17 00:00:00 2001 From: Richard Brooksby Date: Thu, 2 Aug 2012 13:04:46 +0100 Subject: [PATCH] Removed unused typedef. added some clarifications. Copied from Perforce Change: 178815 ServerID: perforce.ravenbrook.com --- mps/code/prmci3li.c | 2 ++ mps/code/protlii3.c | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mps/code/prmci3li.c b/mps/code/prmci3li.c index 27d3ea9c565..3bae764c203 100644 --- a/mps/code/prmci3li.c +++ b/mps/code/prmci3li.c @@ -40,6 +40,8 @@ MRef Prmci3AddressHoldingReg(MutatorFaultContext mfc, unsigned int regnum) /* .source.i486 */ /* .assume.regref */ + /* The REG_EAX etc. symbols are only present if _GNU_SOURCE is defined. + Currently this is in lii4gc.gmk in PFMDEFS. */ switch (regnum) { case 0: return (MRef)&gregs[REG_EAX]; case 1: return (MRef)&gregs[REG_ECX]; diff --git a/mps/code/protlii3.c b/mps/code/protlii3.c index b6067a19114..3c857c53aa4 100644 --- a/mps/code/protlii3.c +++ b/mps/code/protlii3.c @@ -39,9 +39,6 @@ SRCID(protlii3, "$Id$"); static struct sigaction sigNext; -typedef void (*__real_lii3_sighandler_t)(int, struct sigcontext); - - /* sigHandle -- protection signal handler * * This is the signal handler installed by ProtSetup to deal with @@ -100,7 +97,9 @@ static void sigHandle(int sig, siginfo_t *info, void *context) /* .sigh.args */ } /* The exception was not handled by any known protection structure, */ - /* so throw it to the previously installed handler. */ + /* so throw it to the previously installed handler. That handler won't */ + /* get an accurate context (the MPS would fail if it were the second in */ + /* line) but it's the best we can do. */ e = sigaction(PROT_SIGNAL, &sigNext, &sa); AVER(e == 0);