From bbea1f4ae3a6be304e2f5293cebf35d872092289 Mon Sep 17 00:00:00 2001 From: George Koehler Date: Wed, 19 Sep 2012 23:39:51 -0400 Subject: [PATCH] Fix fit16i() for systems with 64-bit long. (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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/src/em_code/em.c b/modules/src/em_code/em.c index a97216c59..fdf4d9fb0 100644 --- 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)0x00007FFF) +#define fit16i(x) ((x) >= (long)(-0x8000) && (x) <= (long)0x7FFF) #define fit8u(x) ((x) <= 0xFF) /* x is already unsigned */ void -- 2.34.1