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




CommitLineData
cfca19c6 1#ifndef SFTYPES_INCLUDED
2#define SFTYPES_INCLUDED
3
4#if defined(_WIN32) || defined(_WIN64)
5
6typedef signed char Int8;
7typedef signed short Int16;
8typedef signed long Int32;
9typedef signed __int64 Int64;
10
11#ifdef _WIN64
12typedef signed __int64 IntPtr;
13#else
14typedef signed int IntPtr;
15#endif
16
17typedef unsigned char UInt8;
18typedef unsigned short UInt16;
19typedef unsigned long UInt32;
20typedef unsigned __int64 UInt64;
21
22#ifdef _WIN64
23typedef unsigned __int64 UIntPtr;
24#else
25typedef unsigned int UIntPtr;
26#endif
27
28#else
29
30#include <stdint.h>
31
32typedef int8_t Int8;
33typedef int16_t Int16;
34typedef int32_t Int32;
35typedef int64_t Int64;
36typedef intptr_t IntPtr;
37
38typedef uint8_t UInt8;
39typedef uint16_t UInt16;
40typedef uint32_t UInt32;
41typedef uint64_t UInt64;
42typedef uintptr_t UIntPtr;
43
44#endif
45
46union 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};
56
57#endif // #ifndef SFTYPES_INCLUDED