pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/emulators/palmosemulator/patches Building POSE under g...
details: https://anonhg.NetBSD.org/pkgsrc/rev/fefcd095ff84
branches: trunk
changeset: 479528:fefcd095ff84
user: dsainty <dsainty%pkgsrc.org@localhost>
date: Mon Aug 16 12:36:38 2004 +0000
description:
Building POSE under gcc 3.3.3 with optimisation as default (g++ -O2) leads to
a malfunction where POSE will go into an apparent infinite loop after the
first pen operation. This patch codes around the problem.
diffstat:
emulators/palmosemulator/patches/patch-an | 35 +++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
diffs (39 lines):
diff -r fb06ff6201af -r fefcd095ff84 emulators/palmosemulator/patches/patch-an
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/palmosemulator/patches/patch-an Mon Aug 16 12:36:38 2004 +0000
@@ -0,0 +1,35 @@
+$NetBSD: patch-an,v 1.1 2004/08/16 12:36:38 dsainty Exp $
+
+Building POSE under gcc 3.3.3 with optimisation as default (g++ -O2) leads to
+a malfunction where POSE will go into an apparent infinite loop after the
+first pen operation.
+
+This appears to be due to pointer coordinate corruption, fixed by the patch
+below.
+
+The only user of the patched type coercion is
+SrcShared/Patches/EmPatchMgr.cpp, which says:
+
+PointType palmPen = pen;
+
+I haven't entirely traced this through, but I suspect that the palmPen
+coordinates are corrupted on the "pen up" event, leading the hosted Palm OS to
+believe the stylus is being perpetually dragged around the screen.
+
+The issue appears to be resolved by the below patch, which is a somewhat less
+dodgy (but only just!) implementation, and appears to be enough to convince
+the compiler to keep the target class uncorrupted.
+
+Another option is: EmPatchMgr.cpp: PointType palmPen = { pen.fX, pen.fY };
+
+--- SrcShared/EmPoint.cpp.orig 2002-03-30 01:11:14.000000000 +1200
++++ SrcShared/EmPoint.cpp 2004-08-16 00:11:31.000000000 +1200
+@@ -233,7 +233,7 @@
+ #undef FOR_POINT
+ #define FOR_POINT(cls, size, x, y) \
+ EmPoint::operator cls() const \
+- { size pt[2]; pt[x] = fX; pt[y] = fY; return *(cls*) pt; }
++ { union { size pt[2]; cls bar; } foo; foo.pt[x] = fX; foo.pt[y] = fY; return foo.bar; }
+
+ POINT_LIST_XY_LONG
+ POINT_LIST_YX_LONG
Home |
Main Index |
Thread Index |
Old Index