-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathSFTypes.h
60 lines (46 loc) · 1.02 KB
/
SFTypes.h
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
50
51
52
53
54
55
56
57
58
59
// License information for this code is in license.txt
#ifndef SFTYPES_INCLUDED
#define SFTYPES_INCLUDED
#if defined(_WIN32) || defined(_WIN64)
typedef signed char Int8;
typedef signed short Int16;
typedef signed long Int32;
typedef signed __int64 Int64;
#ifdef _WIN64
typedef signed __int64 IntPtr;
#else
typedef signed int IntPtr;
#endif
typedef unsigned char UInt8;
typedef unsigned short UInt16;
typedef unsigned long UInt32;
typedef unsigned __int64 UInt64;
#ifdef _WIN64
typedef unsigned __int64 UIntPtr;
#else
typedef unsigned int UIntPtr;
#endif
#else
#include <stdint.h>
typedef int8_t Int8;
typedef int16_t Int16;
typedef int32_t Int32;
typedef int64_t Int64;
typedef intptr_t IntPtr;
typedef uint8_t UInt8;
typedef uint16_t UInt16;
typedef uint32_t UInt32;
typedef uint64_t UInt64;
typedef uintptr_t UIntPtr;
#endif
union IntConv {
Int8 i8[8];
UInt8 ui8[8];
Int16 i16[4];
UInt16 ui16[4];
Int32 i32[2];
UInt32 ui32[2];
Int64 i64;
UInt64 ui64;
};
#endif // #ifndef SFTYPES_INCLUDED