Commit | Line | Data |
---|---|---|
a34816ef AE |
1 | Taken from Debian, necessary for compilation on mips. |
2 | ||
3 | Patch to fix integer types problem by Goswin von Brederlow | |
4 | <brederlo@informatik.uni-tuebingen.de> (#258444) | |
5 | --- chmlib-0.39.orig/src/chm_lib.c | |
6 | +++ chmlib-0.39/src/chm_lib.c | |
7 | @@ -56,6 +56,7 @@ | |
8 | ||
9 | #include "lzx.h" | |
10 | ||
11 | +#include <stdint.h> | |
12 | #include <stdlib.h> | |
13 | #include <string.h> | |
14 | #ifdef CHM_DEBUG | |
15 | @@ -149,22 +150,9 @@ | |
16 | typedef __int64 Int64; | |
17 | typedef unsigned __int64 UInt64; | |
18 | ||
19 | -/* I386, 32-bit, non-Windows */ | |
20 | -/* Sparc */ | |
21 | -/* MIPS */ | |
22 | -/* PPC */ | |
23 | -#elif __i386__ || __sun || __sgi || __ppc__ | |
24 | -typedef unsigned char UChar; | |
25 | -typedef short Int16; | |
26 | -typedef unsigned short UInt16; | |
27 | -typedef long Int32; | |
28 | -typedef unsigned long UInt32; | |
29 | -typedef long long Int64; | |
30 | -typedef unsigned long long UInt64; | |
31 | - | |
32 | /* x86-64 */ | |
33 | /* Note that these may be appropriate for other 64-bit machines. */ | |
34 | -#elif __x86_64__ || __ia64__ | |
35 | +#elif defined(__LP64__) | |
36 | typedef unsigned char UChar; | |
37 | typedef short Int16; | |
38 | typedef unsigned short UInt16; | |
39 | @@ -173,10 +161,18 @@ | |
40 | typedef long Int64; | |
41 | typedef unsigned long UInt64; | |
42 | ||
43 | +/* I386, 32-bit, non-Windows */ | |
44 | +/* Sparc */ | |
45 | +/* MIPS */ | |
46 | +/* PPC */ | |
47 | #else | |
48 | - | |
49 | -/* yielding an error is preferable to yielding incorrect behavior */ | |
50 | -#error "Please define the sized types for your platform in chm_lib.c" | |
51 | +typedef unsigned char UChar; | |
52 | +typedef short Int16; | |
53 | +typedef unsigned short UInt16; | |
54 | +typedef long Int32; | |
55 | +typedef unsigned long UInt32; | |
56 | +typedef long long Int64; | |
57 | +typedef unsigned long long UInt64; | |
58 | #endif | |
59 | ||
60 | /* GCC */ |