Hi ports@,

Fix compilation errors with Clang. Patches from Pkgsrc.

Binary differs so bump REVISION as well.

Comments? OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/gxemul/Makefile,v
retrieving revision 1.35
diff -u -p -r1.35 Makefile
--- Makefile    10 Apr 2017 11:45:28 -0000      1.35
+++ Makefile    24 Apr 2017 13:50:04 -0000
@@ -4,7 +4,7 @@ COMMENT=                ARM/M88k/MIPS/PowerPC/SuperH m
 
 DISTNAME =             gxemul-0.6.0.1
 CATEGORIES=            emulators
-REVISION =             0
+REVISION =             1
 
 HOMEPAGE=              http://gxemul.sourceforge.net/
 
Index: patches/patch-src_components_cpu_CPUDyntransComponent_cc
===================================================================
RCS file: patches/patch-src_components_cpu_CPUDyntransComponent_cc
diff -N patches/patch-src_components_cpu_CPUDyntransComponent_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_components_cpu_CPUDyntransComponent_cc    24 Apr 2017 
13:50:04 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/components/cpu/CPUDyntransComponent.cc.orig    Sun Aug 17 10:45:14 2014
++++ src/components/cpu/CPUDyntransComponent.cc Mon Apr 24 15:28:54 2017
+@@ -194,7 +194,7 @@ void CPUDyntransComponent::DyntransClearICPage(struct 
+       // Fill the page with "to be translated" entries, which when executed
+       // will read the instruction from memory, attempt to translate it, and
+       // then execute it.
+-      void (*f)(CPUDyntransComponent*, DyntransIC*) = 
GetDyntransToBeTranslated();
++      DyntransIC_t f = GetDyntransToBeTranslated();
+ 
+       for (int i=0; i<m_dyntransICentriesPerPage; ++i)
+               icpage[i].f = f;
Index: patches/patch-src_components_cpu_M88K_CPUComponent_cc
===================================================================
RCS file: patches/patch-src_components_cpu_M88K_CPUComponent_cc
diff -N patches/patch-src_components_cpu_M88K_CPUComponent_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_components_cpu_M88K_CPUComponent_cc       24 Apr 2017 
13:50:04 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/components/cpu/M88K_CPUComponent.cc.orig       Sun Aug 17 10:45:14 2014
++++ src/components/cpu/M88K_CPUComponent.cc    Mon Apr 24 15:28:54 2017
+@@ -337,7 +337,7 @@ int M88K_CPUComponent::GetDyntransICshift() const
+ }
+ 
+ 
+-void (*M88K_CPUComponent::GetDyntransToBeTranslated())(CPUDyntransComponent*, 
DyntransIC*) const
++DyntransIC_t M88K_CPUComponent::GetDyntransToBeTranslated() const
+ {
+       return instr_ToBeTranslated;
+ }
Index: patches/patch-src_components_cpu_MIPS_CPUComponent_cc
===================================================================
RCS file: patches/patch-src_components_cpu_MIPS_CPUComponent_cc
diff -N patches/patch-src_components_cpu_MIPS_CPUComponent_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_components_cpu_MIPS_CPUComponent_cc       24 Apr 2017 
13:50:04 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/components/cpu/MIPS_CPUComponent.cc.orig       Sun Aug 17 10:45:14 2014
++++ src/components/cpu/MIPS_CPUComponent.cc    Mon Apr 24 15:28:54 2017
+@@ -327,7 +327,7 @@ int MIPS_CPUComponent::GetDyntransICshift() const
+ }
+ 
+ 
+-void (*MIPS_CPUComponent::GetDyntransToBeTranslated())(CPUDyntransComponent*, 
DyntransIC*) const
++DyntransIC_t MIPS_CPUComponent::GetDyntransToBeTranslated() const
+ {
+       bool mips16 = m_pc & 1? true : false;
+       return mips16? instr_ToBeTranslated_MIPS16 : instr_ToBeTranslated;
Index: patches/patch-src_include_components_CPUDyntransComponent_h
===================================================================
RCS file: patches/patch-src_include_components_CPUDyntransComponent_h
diff -N patches/patch-src_include_components_CPUDyntransComponent_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_include_components_CPUDyntransComponent_h 24 Apr 2017 
13:50:04 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+--- src/include/components/CPUDyntransComponent.h.orig Sun Aug 17 10:45:13 2014
++++ src/include/components/CPUDyntransComponent.h      Mon Apr 24 15:28:54 2017
+@@ -47,9 +47,13 @@ class CPUDyntransComponent;
+  * f points to a function to be executed.
+  * arg[] contains arguments, such as pointers to registers, or immediate 
values.
+  */
++class CPUDyntransComponent;
++struct DyntransIC;
++typedef void (*DyntransIC_t)(class CPUDyntransComponent*, struct DyntransIC*);
++
+ struct DyntransIC
+ {
+-      void (*f)(CPUDyntransComponent*, DyntransIC*);
++      DyntransIC_t f;
+ 
+       union {
+               void* p;
+@@ -105,7 +109,7 @@ class CPUDyntransComponent (public)
+ protected:
+       // Implemented by specific CPU families:
+       virtual int GetDyntransICshift() const = 0;
+-      virtual void (*GetDyntransToBeTranslated())(CPUDyntransComponent* cpu, 
DyntransIC* ic) const = 0;
++      virtual DyntransIC_t GetDyntransToBeTranslated() const = 0;
+ 
+       void DyntransToBeTranslatedBegin(struct DyntransIC*);
+       bool DyntransReadInstruction(uint16_t& iword);
Index: patches/patch-src_include_components_M88K_CPUComponent_h
===================================================================
RCS file: patches/patch-src_include_components_M88K_CPUComponent_h
diff -N patches/patch-src_include_components_M88K_CPUComponent_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_include_components_M88K_CPUComponent_h    24 Apr 2017 
13:50:04 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/include/components/M88K_CPUComponent.h.orig    Sun Aug 17 10:45:13 2014
++++ src/include/components/M88K_CPUComponent.h Mon Apr 24 15:28:54 2017
+@@ -377,7 +377,7 @@ class M88K_CPUComponent (protected)
+       virtual bool FunctionTraceReturnImpl(int64_t& retval) { retval = 
m_r[M88K_RETURN_VALUE_REG]; return true; }
+ 
+       virtual int GetDyntransICshift() const;
+-      virtual void (*GetDyntransToBeTranslated())(CPUDyntransComponent*, 
DyntransIC*) const;
++      virtual DyntransIC_t GetDyntransToBeTranslated() const ;
+ 
+       virtual void ShowRegisters(GXemul* gxemul, const vector<string>& 
arguments) const;
+ 
Index: patches/patch-src_include_components_MIPS_CPUComponent_h
===================================================================
RCS file: patches/patch-src_include_components_MIPS_CPUComponent_h
diff -N patches/patch-src_include_components_MIPS_CPUComponent_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_include_components_MIPS_CPUComponent_h    24 Apr 2017 
13:50:04 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/include/components/MIPS_CPUComponent.h.orig    Sun Aug 17 10:45:13 2014
++++ src/include/components/MIPS_CPUComponent.h Mon Apr 24 15:28:54 2017
+@@ -196,7 +196,7 @@ class MIPS_CPUComponent (protected)
+       virtual bool FunctionTraceReturnImpl(int64_t& retval);
+ 
+       virtual int GetDyntransICshift() const;
+-      virtual void (*GetDyntransToBeTranslated())(CPUDyntransComponent*, 
DyntransIC*) const;
++      virtual DyntransIC_t GetDyntransToBeTranslated() const;
+ 
+       virtual void ShowRegisters(GXemul* gxemul, const vector<string>& 
arguments) const;
+ 

Reply via email to