PearPC port & FreeBSD 6.0

Alexandre "Sunny" Kovalenko Alex.Kovalenko at verizon.net
Sun Oct 17 11:08:47 PDT 2004


I have sent this to you since you are listed as the maintainer of
FreeBSD port of PearPC emulator. If you are not the proper person to
contact with this information, please, accept my apology. In this case,
I would appreciate if you can point me to the proper maintainer.

I have CC'd 'freebsd-ports' mailing list, but I do not subscribe to it,
so please, keep my address in the distribution list if you want your
reply to reach me.

Attached patch allows PearPC 0.3.1 to compile on FreeBSD 6.0 with JITC
support, and configure line like one below:

./configure --enable-fpo --disable-debug --enable-cpu=jitc_x86
--enable-ui=x11

Credit for the solution to 'offsetof' problem goes to Patrick Hartling.
Solution was published in 'http://news.gw.com/freebsd.bugs/33067'.

---
Alexandre "Sunny" Kovalenko.

-------------- next part --------------
--- src/cpu/cpu_jitc_x86/ppc_cpu.h.ORIG	Sat Aug 21 20:11:56 2004
+++ src/cpu/cpu_jitc_x86/ppc_cpu.h	Sun Oct 17 13:54:39 2004
@@ -24,6 +24,14 @@
 #include <stddef.h>
 #include "system/types.h"
 
+#undef offsetof
+/* The cast to "char &" below avoids problems with user-defined
+   "operator &", which can appear in a POD type.  */
+#define offsetof(TYPE, MEMBER)                                  \
+  (__offsetof__ (reinterpret_cast <size_t>                      \
+                 (&reinterpret_cast <const volatile char &>     \
+                  (static_cast<TYPE *> (0)->MEMBER))))
+
 #define PPC_MHz(v) ((v)*1000*1000)
 
 #define PPC_MODEL		"ppc_model"


More information about the freebsd-ports mailing list