summaryrefslogtreecommitdiff
path: root/emulators/hercules/patches/patch-aj
diff options
context:
space:
mode:
authordholland <dholland>2010-01-17 08:00:47 +0000
committerdholland <dholland>2010-01-17 08:00:47 +0000
commitf951f56275208b4f4c2530538f31892c429272b2 (patch)
tree3bc9edb497e8304f4871e518d0969e7dd7ed1bf8 /emulators/hercules/patches/patch-aj
parentbe045658e9c7c1d64c68ce91ba6dda8bd0c1a72a (diff)
downloadpkgsrc-f951f56275208b4f4c2530538f31892c429272b2.tar.gz
Patch out no-longer-supported gcc language extensions, mostly lvalue
casts and lvalue ternary operators. Also make static/non-static decls consistent. Fixes broken build. While here, add DESTDIR support.
Diffstat (limited to 'emulators/hercules/patches/patch-aj')
-rw-r--r--emulators/hercules/patches/patch-aj30
1 files changed, 25 insertions, 5 deletions
diff --git a/emulators/hercules/patches/patch-aj b/emulators/hercules/patches/patch-aj
index 2d4c961a452..c9545cb36eb 100644
--- a/emulators/hercules/patches/patch-aj
+++ b/emulators/hercules/patches/patch-aj
@@ -1,4 +1,4 @@
-$NetBSD: patch-aj,v 1.1 2001/03/23 16:20:56 agc Exp $
+$NetBSD: patch-aj,v 1.2 2010/01/17 08:00:47 dholland Exp $
Patch from Wofgang Solfrank:
@@ -7,9 +7,29 @@ At least with unproven-pthreads, the comment above that is wrong
when stating that a 1 usec timeout would be stretched to the next
system clock tick."
---- timer.c.orig Thu Feb 8 20:02:41 2001
-+++ timer.c Fri Mar 23 16:01:53 2001
-@@ -319,7 +319,7 @@
+Also, patch out no-longer-supported gcc language extensions.
+
+--- timer.c.orig 2001-02-08 20:02:41.000000000 +0000
++++ timer.c
+@@ -190,7 +190,7 @@ struct timeval tv;
+
+ /* Decrement the CPU timer if the CPU is running */
+ if(regs->cpustate == CPUSTATE_STARTED && (S64)diff > 0)
+- (S64)regs->ptimer -= (S64)diff;
++ regs->ptimer = (S64)regs->ptimer - (S64)diff;
+
+ /* Set interrupt flag if the CPU timer is negative */
+ if ((S64)regs->ptimer < 0)
+@@ -207,7 +207,7 @@ struct timeval tv;
+ {
+ /* Decrement the CPU timer if the CPU is running */
+ if( (S64)diff > 0)
+- (S64)regs->guestregs->ptimer -= (S64)diff;
++ regs->guestregs->ptimer = (S64)regs->guestregs->ptimer - (S64)diff;
+
+ /* Set interrupt flag if the CPU timer is negative */
+ if ((S64)regs->guestregs->ptimer < 0)
+@@ -319,7 +319,7 @@ struct timeval tv;
/* Calculate instructions/millisecond for this CPU */
regs->mipsrate =
(regs->instcount - regs->prevcount) / msecctr;
@@ -18,7 +38,7 @@ system clock tick."
/* Save the instruction counter */
regs->prevcount = regs->instcount;
-@@ -336,7 +336,7 @@
+@@ -336,7 +336,7 @@ struct timeval tv;
/* Sleep for one system clock tick by specifying a one-microsecond
delay, which will get stretched out to the next clock tick */
tv.tv_sec = 0;