summaryrefslogtreecommitdiff
path: root/emulators/tme
diff options
context:
space:
mode:
authorchristos <christos@pkgsrc.org>2011-10-07 01:12:51 +0000
committerchristos <christos@pkgsrc.org>2011-10-07 01:12:51 +0000
commit25312a6be1c978d1b4c81826e54583e02be845c1 (patch)
treeba9e2a66ae6b503d33a7c95a8c0e60cd18ed9f35 /emulators/tme
parent242ae28b674fc8cc3a814b33b9e0d0a538d6818e (diff)
downloadpkgsrc-25312a6be1c978d1b4c81826e54583e02be845c1.tar.gz
Avoid a compiler bug (phantom integer oveflow) in gcc 4.5.3
It appears that the conditional expression with the 0x0100 constant triggers it no matter what casts we put around the expression.
Diffstat (limited to 'emulators/tme')
-rw-r--r--emulators/tme/distinfo3
-rw-r--r--emulators/tme/patches/patch-af29
2 files changed, 31 insertions, 1 deletions
diff --git a/emulators/tme/distinfo b/emulators/tme/distinfo
index 97f70bac378..e40d0e47851 100644
--- a/emulators/tme/distinfo
+++ b/emulators/tme/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2010/08/14 06:32:34 tsutsui Exp $
+$NetBSD: distinfo,v 1.12 2011/10/07 01:12:51 christos Exp $
SHA1 (tme-0.8.tar.gz) = dd4f3421c20ceed548c5328a21dbb26e80f46b9c
RMD160 (tme-0.8.tar.gz) = 6bd505c5fa7810d37f436883383c4ba655df2ded
@@ -8,3 +8,4 @@ SHA1 (patch-ab) = 3825986759da24c628b870a1493e4d37ec37358f
SHA1 (patch-ac) = ba581f10ec54b056564a7a84a5833f2d854b55df
SHA1 (patch-ad) = e90986262fe9d883ae64fe01dfb4ae07bde6a916
SHA1 (patch-ae) = cfcea636744991c6eef84ea34ca78d40eb01c086
+SHA1 (patch-af) = cd3ffe52d4d75d05394ca74c3f69052bfdc41989
diff --git a/emulators/tme/patches/patch-af b/emulators/tme/patches/patch-af
new file mode 100644
index 00000000000..92cacd87196
--- /dev/null
+++ b/emulators/tme/patches/patch-af
@@ -0,0 +1,29 @@
+$NetBSD: patch-af,v 1.3 2011/10/07 01:12:51 christos Exp $
+
+--- machine/sun/sun-bwtwo.c.orig 2009-11-08 12:03:58.000000000 -0500
++++ machine/sun/sun-bwtwo.c 2011-10-06 20:52:30.000000000 -0400
+@@ -339,6 +339,7 @@
+ {
+ struct tme_sunbw2 *sunbw2;
+ int rc;
++ tme_uint16_t v;
+
+ /* start the sunbw2 structure: */
+ sunbw2 = tme_new0(struct tme_sunbw2, 1);
+@@ -365,12 +366,10 @@
+ case TME_SUNBW2_TYPE_OLD_ONBOARD:
+
+ /* set our initial CSR: */
+- sunbw2->tme_sunbw2_csr
+- = tme_htobe_u16(TME_SUNBW2_CSR_ENABLE_VIDEO
+- | (sunbw2->tme_sunbw2_sunfb.tme_sunfb_size == TME_SUNFB_SIZE_1024_1024
+- ? TME_SUNBW2_CSR_JUMPER_HIRES
+- : 0));
+-
++ v = TME_SUNBW2_CSR_ENABLE_VIDEO | (sunbw2->tme_sunbw2_sunfb.tme_sunfb_size
++ == TME_SUNFB_SIZE_1024_1024
++ ? TME_SUNBW2_CSR_JUMPER_HIRES : 0);
++ sunbw2->tme_sunbw2_csr = tme_htobe_u16(v);
+ break;
+ }
+