summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-05-17 13:20:12 +0200
committer couriersud <couriersud@arcor.de>2015-05-17 13:21:32 +0200
commitebc96303eeaab614577cb5ee05e03200a8c47e74 (patch)
tree7802d5b23b04ca8af403336dd736289f382c9d0d
parent9aaa9fbebcad4e2a010ea3452e555a373ba05553 (diff)
Removed all uses of setjmp.h in MAME. The only place where
it is still referenced is cpu/powerpc/ppc.c. I couldn't find any case in which this file would be compiled using the current build system. Nonetheless documented use using PPC_H_INCLUDED_FROM_PPC_C define. [Couriersud]
-rw-r--r--src/emu/cpu/powerpc/ppc.c3
-rw-r--r--src/emu/cpu/powerpc/ppc.h4
-rw-r--r--src/emu/cpu/uml.c1
3 files changed, 7 insertions, 1 deletions
diff --git a/src/emu/cpu/powerpc/ppc.c b/src/emu/cpu/powerpc/ppc.c
index 3e2c1858ee6..cb85522177d 100644
--- a/src/emu/cpu/powerpc/ppc.c
+++ b/src/emu/cpu/powerpc/ppc.c
@@ -5,6 +5,9 @@
#include <setjmp.h>
#include "emu.h"
#include "debugger.h"
+
+/* avoid including setjmp.h and defining jump buffer if not included from here */
+#define PPC_H_INCLUDED_FROM_PPC_C
#include "ppc.h"
// PLL Configuration based on the table in MPC603EUM page 7-31
diff --git a/src/emu/cpu/powerpc/ppc.h b/src/emu/cpu/powerpc/ppc.h
index 9fe6bcb6fe1..3b0129627c7 100644
--- a/src/emu/cpu/powerpc/ppc.h
+++ b/src/emu/cpu/powerpc/ppc.h
@@ -14,7 +14,9 @@
#ifndef __PPC_H__
#define __PPC_H__
+#ifdef PPC_H_INCLUDED_FROM_PPC_C
#include <setjmp.h>
+#endif
#include "cpu/vtlb.h"
#include "cpu/drcfe.h"
#include "cpu/drcuml.h"
@@ -512,7 +514,9 @@ protected:
write32_delegate m_ext_dma_write_cb[4];
/* PowerPC function pointers for memory accesses/exceptions */
+#ifdef PPC_H_INCLUDED_FROM_PPC_C
jmp_buf m_exception_jmpbuf;
+#endif
UINT8 (*m_ppcread8)(address_space &space, offs_t address);
UINT16 (*m_ppcread16)(address_space &space, offs_t address);
UINT32 (*m_ppcread32)(address_space &space, offs_t address);
diff --git a/src/emu/cpu/uml.c b/src/emu/cpu/uml.c
index eef08cc7d47..f7b0584431f 100644
--- a/src/emu/cpu/uml.c
+++ b/src/emu/cpu/uml.c
@@ -37,7 +37,6 @@
#include "emu.h"
#include "drcuml.h"
#include "drcumlsh.h"
-#include <setjmp.h>
using namespace uml;