00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __SYS_Types__
00019 #define __SYS_Types__
00020
00021
00022 #include <sys/types.h>
00023
00024
00025
00026
00027 typedef signed char int8;
00028 typedef unsigned char uint8;
00029 typedef short int16;
00030 typedef unsigned short uint16;
00031 typedef int int32;
00032 typedef unsigned int uint32;
00033
00034 typedef unsigned char uchar;
00035 typedef unsigned int uint;
00036
00037
00038
00039
00040
00041
00042 #if defined(WIN32)
00043 typedef __int64 int64;
00044 typedef unsigned __int64 uint64;
00045 #elif defined(MBSD)
00046 #include <stdint.h>
00047 typedef int64_t int64;
00048 typedef uint64_t uint64;
00049 #elif defined(SOLARIS) || defined(PPC64) || defined(AMD64)
00050 typedef long int64;
00051 typedef unsigned long uint64;
00052 #else
00053 typedef long long int64;
00054 typedef unsigned long long uint64;
00055 #endif
00056
00057
00058
00059
00060
00061
00062
00063
00064 typedef float fpreal32;
00065 typedef double fpreal64;
00066 typedef float fpreal;
00067
00068 #define SYS_FPREAL_SIZE 32
00069
00070 #ifdef __cplusplus
00071
00072 #include "fpreal16.h"
00073 #else
00074 typedef unsigned short fpreal16;
00075 #endif
00076
00077 typedef union {
00078 int32 ival;
00079 uint32 uval;
00080 fpreal32 fval;
00081 } SYS_FPReal32Union;
00082
00083 typedef union {
00084 int64 ival;
00085 uint64 uval;
00086 fpreal64 fval;
00087 } SYS_FPReal64Union;
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097 #define CONST_INT8(x) ((int8)x)
00098 #define CONST_UINT8(x) ((uint8)x)
00099 #define CONST_INT16(x) ((int16)x)
00100 #define CONST_UINT16(x) ((uint16)x)
00101 #define CONST_INT32(x) ((int32)x)
00102 #define CONST_UINT32(x) ((uint32)x)
00103
00104 #if defined(WIN32)
00105 #define CONST_INT64(x) ((int64)x)
00106 #define CONST_UINT64(x) ((uint64)x)
00107 #else
00108 #define CONST_INT64(x) (x##LL)
00109 #define CONST_UINT64(x) (x##LL)
00110 #endif
00111
00112 #define CONST_FPREAL16(c) ((fpreal16)c)
00113 #define CONST_FPREAL32(c) ((fpreal32)c)
00114 #define CONST_FPREAL64(c) ((fpreal64)c)
00115 #define CONST_FPREAL(c) ((fpreal)c)
00116
00117
00118
00119
00120
00121
00122
00123
00124 #if defined(GCC3)
00125 #define SYS_DEPRECATED __attribute__ ((deprecated))
00126 #elif defined(_MSC_VER)
00127 #define SYS_DEPRECATED __declspec(deprecated)
00128 #else
00129 #define SYS_DEPRECATED
00130 #endif
00131
00132
00133
00134 #if defined(GCC3)
00135 #define SYS_FORCE_INLINE __attribute__ ((always_inline))
00136 #elif defined(_MSC_VER)
00137 #define SYS_FORCE_INLINE __forceinline
00138 #else
00139 #define SYS_FORCE_INLINE inline
00140 #endif
00141
00142
00143 #if defined(GCC3)
00144 #define SYS_NO_INLINE __attribute__ ((noinline))
00145 #elif defined(_MSC_VER)
00146 #define SYS_FO_INLINE __declspec(noinline)
00147 #else
00148 #define SYS_NO_INLINE
00149 #endif
00150
00151
00152
00153
00154
00155
00156 #if defined(GCC3)
00157 #define SYS_PRINTF_CHECK_ATTRIBUTE(string_index, first_to_check) \
00158 __attribute__ ((format (printf, string_index, first_to_check)))
00159 #else
00160 #define SYS_PRINTF_CHECK_ATTRIBUTE(string_index, first_to_check)
00161 #endif
00162
00163
00164 #endif