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 Small banner for links to this site: |
1 #ifndef SFTYPES_INCLUDED
2 #define SFTYPES_INCLUDED
4 #if defined(_WIN32) || defined(_WIN64)
6 typedef signed char Int8;
7 typedef signed short Int16;
8 typedef signed long Int32;
9 typedef signed __int64 Int64;
11 #ifdef _WIN64
12 typedef signed __int64 IntPtr;
13 #else
14 typedef signed int IntPtr;
15 #endif
17 typedef unsigned char UInt8;
18 typedef unsigned short UInt16;
19 typedef unsigned long UInt32;
20 typedef unsigned __int64 UInt64;
22 #ifdef _WIN64
23 typedef unsigned __int64 UIntPtr;
24 #else
25 typedef unsigned int UIntPtr;
26 #endif
28 #else
30 #include <stdint.h>
32 typedef int8_t Int8;
33 typedef int16_t Int16;
34 typedef int32_t Int32;
35 typedef int64_t Int64;
36 typedef intptr_t IntPtr;
38 typedef uint8_t UInt8;
39 typedef uint16_t UInt16;
40 typedef uint32_t UInt32;
41 typedef uint64_t UInt64;
42 typedef uintptr_t UIntPtr;
44 #endif
46 union IntConv {
47 Int8 i8[8];
48 UInt8 ui8[8];
49 Int16 i16[4];
50 UInt16 ui16[4];
51 Int32 i32[2];
52 UInt32 ui32[2];
53 Int64 i64;
54 UInt64 ui64;
55 };
57 #endif // #ifndef SFTYPES_INCLUDED
|