diff options
author | marcel <marcel@FreeBSD.org> | 2004-06-26 19:41:09 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-06-26 19:41:09 +0000 |
commit | 7d786fd3d72d067107bd4286e2dcac5552a1073a (patch) | |
tree | 91ab625277247c385df118fc2166b74101a669c6 | |
parent | 1c0ba188259d95f6f5d59ffac0367dbbafe23d2b (diff) | |
download | FreeBSD-ports-7d786fd3d72d067107bd4286e2dcac5552a1073a.zip FreeBSD-ports-7d786fd3d72d067107bd4286e2dcac5552a1073a.tar.gz |
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
-rw-r--r-- | graphics/lcms/files/patch-src::cmscgats.c | 11 | ||||
-rw-r--r-- | graphics/lcms/files/patch-src::cmsio1.c | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/graphics/lcms/files/patch-src::cmscgats.c b/graphics/lcms/files/patch-src::cmscgats.c new file mode 100644 index 0000000..a5b955f --- /dev/null +++ b/graphics/lcms/files/patch-src::cmscgats.c @@ -0,0 +1,11 @@ +--- 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 + diff --git a/graphics/lcms/files/patch-src::cmsio1.c b/graphics/lcms/files/patch-src::cmsio1.c new file mode 100644 index 0000000..defb4f94 --- /dev/null +++ b/graphics/lcms/files/patch-src::cmsio1.c @@ -0,0 +1,11 @@ +--- src/cmsio1.c.orig Sat Jun 26 12:31:18 2004 ++++ src/cmsio1.c Sat Jun 26 12:33:04 2004 +@@ -72,7 +72,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 + + static size_t UsedSpace; // Using this makes writting of profiles non-reentrant! + static int GlobalLanguageCode; // Language & country descriptors, for ICC 4.0 support |