From f7dbb25491e6081010ef7a36cfccb8fb00a9dbd7 Mon Sep 17 00:00:00 2001 From: Wen Heping Date: Fri, 13 May 2011 08:23:23 +0000 Subject: - Apply a patch from Gentoo to fix run error: http://bugs.gentoo.org/show_bug.cgi?id=140987 PR: ports/156985 Submitted by: Tim Zingelman --- math/hexcalc/Makefile | 2 +- math/hexcalc/files/patch-hexcalc.c | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 math/hexcalc/files/patch-hexcalc.c (limited to 'math') diff --git a/math/hexcalc/Makefile b/math/hexcalc/Makefile index 57b31e8c078a..8eb729d7e8a7 100644 --- a/math/hexcalc/Makefile +++ b/math/hexcalc/Makefile @@ -7,7 +7,7 @@ PORTNAME= hexcalc PORTVERSION= 1.11 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= math MASTER_SITES= ftp://aixpdslib.seas.ucla.edu/pub/hexcalc/RISC/3.2/src/ DISTNAME= ${PORTNAME} diff --git a/math/hexcalc/files/patch-hexcalc.c b/math/hexcalc/files/patch-hexcalc.c new file mode 100644 index 000000000000..c071859b659f --- /dev/null +++ b/math/hexcalc/files/patch-hexcalc.c @@ -0,0 +1,51 @@ +--- hexcalc.c.orig 2011-05-13 08:28:24.000000000 +0800 ++++ hexcalc.c 2011-05-13 08:32:09.000000000 +0800 +@@ -37,6 +37,7 @@ + #endif + + #include ++#include + #include + #include + #include +@@ -509,14 +510,16 @@ + + switch(topOp) { + case '+' : +- ac = PopArg() + PopArg(); ++ temp = PopArg(); ++ ac = PopArg() + temp; + break; + case '-' : + temp = PopArg(); + ac = PopArg() - temp; + break; + case '*' : +- ac = PopArg() * PopArg(); ++ temp = PopArg(); ++ ac = temp * PopArg(); + break; + case '/' : + temp = PopArg(); +@@ -528,15 +531,18 @@ + break; + + case '|' : +- ac = PopArg() | PopArg(); ++ temp = PopArg(); ++ ac = temp | PopArg(); + break; + + case '&' : +- ac = PopArg() & PopArg(); ++ temp = PopArg(); ++ ac = temp & PopArg(); + break; + + case '^' : +- ac = PopArg() ^ PopArg(); ++ temp = PopArg(); ++ ac = temp ^ PopArg(); + break; + + case '<' : -- cgit v1.2.3