SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
53
math/hexcalc/patches/patch-hexcalc_c
Normal file
53
math/hexcalc/patches/patch-hexcalc_c
Normal file
|
@ -0,0 +1,53 @@
|
|||
Fix with GCC4. From http://bugs.gentoo.org/show_bug.cgi?id=140987
|
||||
|
||||
--- hexcalc.c.orig Sun May 15 11:30:39 2011
|
||||
+++ hexcalc.c Sun May 15 11:34:23 2011
|
||||
@@ -37,6 +37,7 @@ static char *sccsid = "@(#)hexcalc.c 1.11 11/21/89";
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <X11/IntrinsicP.h>
|
||||
#include <X11/StringDefs.h>
|
||||
@@ -509,14 +510,16 @@ caddr_t data;
|
||||
|
||||
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 @@ caddr_t data;
|
||||
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 '<' :
|
Loading…
Add table
Add a link
Reference in a new issue