Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




1 // License information for this code is in license.txt
3 #ifndef SFTYPES_INCLUDED
4 #define SFTYPES_INCLUDED
6 #if defined(_WIN32) || defined(_WIN64)
8 typedef signed char    Int8;
9 typedef signed short   Int16;
10 typedef signed long    Int32;
11 typedef signed __int64 Int64;
13 #ifdef _WIN64
14 typedef signed __int64 IntPtr;
15 #else
16 typedef signed int     IntPtr;
17 #endif
19 typedef unsigned char    UInt8;
20 typedef unsigned short   UInt16;
21 typedef unsigned long    UInt32;
22 typedef unsigned __int64 UInt64;
24 #ifdef _WIN64
25 typedef unsigned __int64 UIntPtr;
26 #else
27 typedef unsigned int     UIntPtr;
28 #endif
30 #else
32 #include <stdint.h>
34 typedef int8_t   Int8;
35 typedef int16_t  Int16;
36 typedef int32_t  Int32;
37 typedef int64_t  Int64;
38 typedef intptr_t IntPtr;
40 typedef uint8_t   UInt8;
41 typedef uint16_t  UInt16;
42 typedef uint32_t  UInt32;
43 typedef uint64_t  UInt64;
44 typedef uintptr_t UIntPtr;
46 #endif
48 union IntConv {
49         Int8 i8[8];
50         UInt8 ui8[8];
51         Int16 i16[4];
52         UInt16 ui16[4];
53         Int32 i32[2];
54         UInt32 ui32[2];
55         Int64 i64;
56         UInt64 ui64;
57 };
59 #endif // #ifndef SFTYPES_INCLUDED