Last change
on this file since 12954 was
12954,
checked in by jordan, 9 years ago
|
(trunk) #4490 "Transmission 2.40b1 fails to build: undefined references" -- fixed.
|
File size:
812 bytes
|
Line | |
---|
1 | #ifndef __UTYPES_H__ |
---|
2 | #define __UTYPES_H__ |
---|
3 | |
---|
4 | // standard types |
---|
5 | typedef unsigned char byte; |
---|
6 | typedef unsigned char uint8; |
---|
7 | typedef signed char int8; |
---|
8 | typedef unsigned short uint16; |
---|
9 | typedef signed short int16; |
---|
10 | typedef unsigned int uint; |
---|
11 | typedef unsigned int uint32; |
---|
12 | typedef signed int int32; |
---|
13 | |
---|
14 | #ifdef _MSC_VER |
---|
15 | typedef unsigned __int64 uint64; |
---|
16 | typedef signed __int64 int64; |
---|
17 | #else |
---|
18 | typedef unsigned long long uint64; |
---|
19 | typedef long long int64; |
---|
20 | #endif |
---|
21 | |
---|
22 | /* compile-time assert */ |
---|
23 | #ifndef CASSERT |
---|
24 | #define CASSERT( exp, name ) typedef int is_not_##name [ (exp ) ? 1 : -1 ]; |
---|
25 | #endif |
---|
26 | |
---|
27 | CASSERT(8 == sizeof(uint64), sizeof_uint64_is_8) |
---|
28 | CASSERT(8 == sizeof(int64), sizeof_int64_is_8) |
---|
29 | |
---|
30 | #ifndef INT64_MAX |
---|
31 | #define INT64_MAX 0x7fffffffffffffffLL |
---|
32 | #endif |
---|
33 | |
---|
34 | // always ANSI |
---|
35 | typedef const char * cstr; |
---|
36 | typedef char * str; |
---|
37 | |
---|
38 | #endif //__UTYPES_H__ |
---|
Note: See
TracBrowser
for help on using the repository browser.