public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62985a0
)
Fix fit16i() for systems with 64-bit long.
author
George Koehler
<xkernigh@netscape.net>
Thu, 20 Sep 2012 03:39:51 +0000
(23:39 -0400)
committer
Nick Downing
<nick@ndcode.org>
Wed, 17 Apr 2019 14:20:38 +0000
(
00:20
+1000)
(long)0xFFFF8000 had expanded to 0x00000000FFFF8000.
With (long)(-0x8000), the compiler now extends the negative sign.
By fixing fit16i(), I can now compile ACK for OpenBSD/amd64.
modules/src/em_code/em.c
patch
|
blob
|
history
diff --git
a/modules/src/em_code/em.c
b/modules/src/em_code/em.c
index
a97216c
..
fdf4d9f
100644
(file)
--- a/
modules/src/em_code/em.c
+++ b/
modules/src/em_code/em.c
@@
-349,7
+349,7
@@
C_magic()
}
/*** the compact code generating routines ***/
-#define fit16i(x) ((x) >= (long)
0xFFFF8000 && (x) <= (long)0x0000
7FFF)
+#define fit16i(x) ((x) >= (long)
(-0x8000) && (x) <= (long)0x
7FFF)
#define fit8u(x) ((x) <= 0xFF) /* x is already unsigned */
void