freebsd-ports/graphics/lcms/files/patch-src::cmscgats.c
Marcel Moolenaar 64cef1cadf Fix 64-bit platforms: the ALIGNLONG macro aligned on an 32-bit word
boundary, which on 64-bit platforms is not the proper alignment for
longs. The patch replaces the hardcoding of 3 with sizeof(long)-1.

Tested on: ia64
2004-06-26 19:41:09 +00:00

11 lines
404 B
C

--- src/cmscgats.c.orig Sat Jun 26 12:31:08 2004
+++ src/cmscgats.c Sat Jun 26 12:33:13 2004
@@ -89,7 +89,7 @@
// ------------------------------------------------------------- Implementation
-#define ALIGNLONG(x) (((x)+3) & ~(3)) // Aligns to DWORD boundary
+#define ALIGNLONG(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) // Aligns to DWORD boundary
// #define STRICT_CGATS 1