NERtc Windows SDK
V5.6.30
载入中...
搜索中...
未找到
api-doc-to-git
lava
lava
nertcsdk
src
sdk
pc
include
nertc_base_types.h
1
6
#ifndef NERTC_BASE_TYPES_H
7
#define NERTC_BASE_TYPES_H
8
9
#include <sys/types.h>
10
11
#ifndef _MSC_VER
12
// stdint.h is part of C99 but MSVC doesn't have it.
13
#include <stdint.h>
// For intptr_t.
14
#endif
15
16
/* define int types*/
17
#if defined(__GNUC__)
18
19
#ifndef _STDINT_H
20
21
/* FreeBSD has these C99 int types defined in /sys/inttypes.h already */
22
#ifndef _SYS_TYPES_H
23
typedef
signed
char
int8_t;
24
typedef
signed
short
int16_t;
25
typedef
signed
int
int32_t;
26
typedef
signed
long
long
int64_t;
27
typedef
unsigned
char
uint8_t;
28
typedef
unsigned
short
uint16_t;
29
typedef
unsigned
int
uint32_t;
30
typedef
unsigned
long
long
uint64_t;
31
#else
32
typedef
u_int8_t uint8_t;
33
typedef
u_int16_t uint16_t;
34
typedef
u_int32_t uint32_t;
35
typedef
u_int64_t uint64_t;
36
#endif
// _SYS_TYPES_H
37
38
#endif
// _STDINT_H
39
40
#elif defined(_MSC_VER)
41
typedef
signed
char
int8_t;
42
typedef
signed
short
int16_t;
43
typedef
signed
int
int32_t;
44
typedef
signed
__int64 int64_t;
45
typedef
unsigned
char
uint8_t;
46
typedef
unsigned
short
uint16_t;
47
typedef
unsigned
int
uint32_t;
48
typedef
unsigned
__int64 uint64_t;
49
50
/* the following definitions are from VS2010's stdint.h */
51
// #ifndef _INTPTR_T_DEFINED
52
// #define _INTPTR_T_DEFINED
53
// #ifdef _WIN64
54
// typedef __int64 intptr_t;
55
// #else /* _WIN64 */
56
// typedef _W64 int intptr_t;
57
// #endif /* _WIN64 */
58
// #endif /* _INTPTR_T_DEFINED */
59
//
60
// #ifndef _UINTPTR_T_DEFINED
61
// #define _UINTPTR_T_DEFINED
62
// #ifdef _WIN64
63
// typedef unsigned __int64 uintptr_t;
64
// #else /* _WIN64 */
65
// typedef _W64 unsigned int uintptr_t;
66
// #endif /* _WIN64 */
67
// #endif /* _UINTPTR_T_DEFINED */
68
69
#endif
// COMPILER_GCC/COMPILER_MSVC
70
71
//const uint8_t kUint8Max = (( uint8_t) 0xFF);
72
//const uint16_t kUint16Max = ((uint16_t) 0xFFFF);
73
//const uint32_t kUint32Max = ((uint32_t) 0xFFFFFFFF);
74
//const uint64_t kUint64Max = ((uint64_t) GG_LONGLONG(0xFFFFFFFFFFFFFFFF));
75
//const int8_t kInt8Min = (( int8_t) 0x80);
76
//const int8_t kInt8Max = (( int8_t) 0x7F);
77
//const int16_t kInt16Min = (( int16_t) 0x8000);
78
//const int16_t kInt16Max = (( int16_t) 0x7FFF);
79
//const int32_t kInt32Min = (( int32_t) 0x80000000);
80
//const int32_t kInt32Max = (( int32_t) 0x7FFFFFFF);
81
//const int64_t kInt64Min = (( int64_t) GG_LONGLONG(0x8000000000000000));
82
//const int64_t kInt64Max = (( int64_t) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
83
84
#endif
// NERTC_BASE_TYPES_H
制作者
1.10.0