summaryrefslogtreecommitdiff
path: root/graphics/lcms/patches/patch-ab
blob: 4de93f1a4f91840ae8229e9aa1c0fbbd3230318e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- source/cmsmtrx.c.orig	Thu May 18 23:08:13 2000
+++ source/cmsmtrx.c	Tue May 14 22:38:58 2002
@@ -31,6 +31,7 @@
 // Vector & Matrix stuff
 
 #include "lcms.h"
+#include <sys/types.h>
 
 
 void cdecl VEC3init(LPVEC3 r, double x, double y, double z);
@@ -242,13 +243,18 @@
 // support asm at all. Use with care, since this will slow down
 // all operations
 
+#include <sys/param.h>
 Fixed32 FixedMul(Fixed32 a, Fixed32 b)
 {
 
 // If newest __int64 defined, then use it
 
 #ifdef USE_INT64
-       __int64 l = (__int64) a * b + 0x8000i64;
+#if (defined(BSD) && BSD >= 199506)
+       u_int64_t l = (u_int64_t) a * b + (u_int64_t)0x8000;
+#else
+       uint64_t l = (uint64_t) a * b + (uint64_t)0x8000;
+#endif
        return (Fixed32) (l >> 16);
 #else
        return DOUBLE_TO_FIXED(FIXED_TO_DOUBLE(a) * FIXED_TO_DOUBLE(b));