blob: d26e6f2d9fa5ad0c8b4c29baf6bfa2c1a8508177 (
plain) (
blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
--- CommonUtilitiesLib/OSHeaders.h.orig Wed May 18 17:01:14 2005
+++ CommonUtilitiesLib/OSHeaders.h Sun Aug 13 00:34:52 2006
@@ -27,11 +27,20 @@
#define OSHeaders_H
#include <limits.h>
+#ifdef __amd64__
+#define CPU_64BIT
+#endif
+
#define kSInt16_Max USHRT_MAX
#define kUInt16_Max USHRT_MAX
+#ifdef CPU_64BIT
+#define kSInt32_Max INT_MAX
+#define kUInt32_Max UINT_MAX
+#else
#define kSInt32_Max LONG_MAX
#define kUInt32_Max ULONG_MAX
+#endif
#define kSInt64_Max LONG_LONG_MAX
#define kUInt64_Max ULONG_LONG_MAX
@@ -72,8 +81,13 @@
typedef signed char SInt8;
typedef unsigned short UInt16;
typedef signed short SInt16;
+#ifdef CPU_64BIT
+ typedef unsigned int UInt32;
+ typedef signed int SInt32;
+#else
typedef unsigned long UInt32;
typedef signed long SInt32;
+#endif
typedef signed long long SInt64;
typedef unsigned long long UInt64;
typedef float Float32;
@@ -81,7 +95,11 @@
typedef UInt16 Bool16;
typedef UInt8 Bool8;
+#ifdef CPU_64BIT
+ typedef unsigned int FourCharCode;
+#else
typedef unsigned long FourCharCode;
+#endif
typedef FourCharCode OSType;
#ifdef FOUR_CHARS_TO_INT
|