Projects

Ticket #16: patch-CommonUtilitiesLib_OSHeaders_h

File patch-CommonUtilitiesLib_OSHeaders_h, 1.6 KB (added by jason@…, 4 years ago)
Line 
1$OpenBSD$
2--- CommonUtilitiesLib/OSHeaders.h.orig Tue May  6 01:28:59 2008
3+++ CommonUtilitiesLib/OSHeaders.h      Sat Jun  7 22:33:25 2008
4@@ -119,7 +119,7 @@
5     #define TW0_CHARS_TO_INT( c1, c2 )  ( c1 << 8 | c2 )
6 
7     
8-#elif __linux__ || __linuxppc__ || __FreeBSD__
9+#elif __linux__ || __linuxppc__ || __FreeBSD__ || __OpenBSD__
10     
11     /* Defines */
12     #define _64BITARG_ "q"
13@@ -146,17 +146,27 @@
14     #define QT_TIME_TO_LOCAL_TIME   (-2082844800)
15     #define QT_PATH_SEPARATOR       '/'
16 
17+    #define kSInt16_Max (SInt16) SHRT_MAX
18+    #define kUInt16_Max (UInt16) USHRT_MAX
19+
20+    #define kSInt32_Max (SInt32) LONG_MAX
21+    #define kUInt32_Max (UInt32) ULONG_MAX
22+
23+    #define kSInt64_Max (SInt64) LONG_LONG_MAX
24+    #define kUInt64_Max (UInt64) ULONG_LONG_MAX
25+
26+
27     /* Typedefs */
28     typedef signed long         PointerSizedInt;
29     typedef unsigned long       PointerSizedUInt;
30-    typedef unsigned char       UInt8;
31-    typedef signed char         SInt8;
32-    typedef unsigned short      UInt16;
33-    typedef signed short        SInt16;
34-    typedef unsigned int       UInt32;
35-    typedef signed int         SInt32;
36-    typedef signed int int     SInt64;
37-    typedef unsigned int int   UInt64;
38+    typedef uint8_t             UInt8;
39+    typedef int8_t              SInt8;
40+    typedef uint16_t            UInt16;
41+    typedef int16_t             SInt16;
42+    typedef uint32_t            UInt32;
43+    typedef int32_t            SInt32;
44+    typedef int64_t             SInt64;
45+    typedef uint64_t            UInt64;
46     typedef float               Float32;
47     typedef double              Float64;
48     typedef UInt16              Bool16;