00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CS_CSTYPES_H__
00020 #define __CS_CSTYPES_H__
00021
00027 #ifndef __CS_CSSYSDEFS_H__
00028 #error "cssysdef.h must be included in EVERY source file!"
00029 #endif
00030
00031 #include "platform.h"
00032 #include <float.h>
00033
00034
00035
00036
00037
00038
00039
00040 #ifdef CS_USE_FAKE_BOOL_TYPE
00041 typedef int bool;
00042 #undef true
00043 #define true 1
00044 #undef false
00045 #define false 0
00046 #endif
00047
00054 #if !defined(CS_BUILTIN_SIZED_TYPES)
00055
00056
00057 #ifndef CS_HAS_STDINT_H
00058
00059 typedef unsigned char uint8;
00061 typedef char int8;
00063 typedef unsigned short uint16;
00065 typedef short int16;
00067 typedef unsigned int uint32;
00069 typedef int int32;
00070 #ifdef COMP_GCC
00071
00072 typedef unsigned long long uint64;
00074 typedef long long int64;
00076 #define CONST_INT64(x) x ## LL
00077
00078 #define CONST_UINT64(x) x ## ULL
00079 #else
00080 # ifdef COMP_VC
00081
00082 typedef unsigned __int64 uint64;
00084 typedef __int64 int64;
00086 #define CONST_INT64(x) x##i64
00087
00088 #define CONST_UINT64(x) x##ui64
00089 # else
00090 # warning NO definition for 64 bit integers defined for your compiler
00091 # endif
00092 #endif // end of #ifdef COMP_GCC
00093
00094 #else
00095
00096 #define __STDC_CONSTANT_MACROS
00097 #define __STDC_LIMIT_MACROS
00098 #include <stdint.h>
00099 typedef uint8_t uint8;
00100 typedef int8_t int8;
00101 typedef uint16_t uint16;
00102 typedef int16_t int16;
00103 typedef uint32_t uint32;
00104 typedef int32_t int32;
00105 typedef uint64_t uint64;
00106 typedef int64_t int64;
00107 #define CONST_INT64(x) INT64_C(x)
00108 #define CONST_UINT64(x) UINT64_C(x)
00109 #endif
00110
00111 #endif // end of #if !defined(CS_BUILTIN_SIZED_TYPES)
00112
00114
00115 typedef uint32 CS_ID;
00116
00118 typedef unsigned int csTicks;
00119
00122
00123 typedef unsigned int uint;
00128 #endif // __CS_CSTYPES_H__