2 * $Copyright Open Broadcom Corporation$
3 * $Id: typedefs.h 397286 2013-04-18 01:42:19Z $
13 #include "site_typedefs.h"
34 #if defined(__x86_64__)
35 #define TYPEDEF_UINTPTR
36 typedef unsigned long long int uintptr;
43 #if defined(_NEED_SIZE_T_)
44 typedef long unsigned int size_t;
51 #if defined(__sparc__)
57 #if !defined(LINUX_HYBRID) || defined(LINUX_PORT)
59 #ifndef TARGETENV_android
60 #define TYPEDEF_USHORT
64 #include <linux/version.h>
65 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19))
69 #if (LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 18))
70 #include <linux/compiler.h>
71 #ifdef noinline_for_stack
82 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
84 #define TYPEDEF_UINT64
93 #define TYPEDEF_UINT64
98 #if !defined(__DJGPP__)
101 #if defined(__KERNEL__)
104 #if !defined(LINUX_HYBRID) || defined(LINUX_PORT)
105 #include <linux/types.h>
111 #include <sys/types.h>
120 #define USE_TYPEDEF_DEFAULTS
127 #ifdef USE_TYPEDEF_DEFAULTS
128 #undef USE_TYPEDEF_DEFAULTS
131 typedef unsigned char bool;
136 #ifndef TYPEDEF_UCHAR
137 typedef unsigned char uchar;
140 #ifndef TYPEDEF_USHORT
141 typedef unsigned short ushort;
145 typedef unsigned int uint;
148 #ifndef TYPEDEF_ULONG
149 typedef unsigned long ulong;
154 #ifndef TYPEDEF_UINT8
155 typedef unsigned char uint8;
158 #ifndef TYPEDEF_UINT16
159 typedef unsigned short uint16;
162 #ifndef TYPEDEF_UINT32
163 typedef unsigned int uint32;
166 #ifndef TYPEDEF_UINT64
167 typedef unsigned long long uint64;
170 #ifndef TYPEDEF_UINTPTR
171 typedef unsigned int uintptr;
175 typedef signed char int8;
178 #ifndef TYPEDEF_INT16
179 typedef signed short int16;
182 #ifndef TYPEDEF_INT32
183 typedef signed int int32;
186 #ifndef TYPEDEF_INT64
187 typedef signed long long int64;
192 #ifndef TYPEDEF_FLOAT32
193 typedef float float32;
196 #ifndef TYPEDEF_FLOAT64
197 typedef double float64;
202 #ifndef TYPEDEF_FLOAT_T
205 typedef float32 float_t;
207 typedef float64 float_t;
239 #define PTRSZ sizeof(char*)
244 #if defined(__GNUC__) || defined(__lint)
245 #define BWL_COMPILER_GNU
246 #elif defined(__CC_ARM) && __CC_ARM
247 #define BWL_COMPILER_ARMCC
249 #error "Unknown compiler!"
254 #if defined(BWL_COMPILER_MICROSOFT)
255 #define INLINE __inline
256 #elif defined(BWL_COMPILER_GNU)
257 #define INLINE __inline__
258 #elif defined(BWL_COMPILER_ARMCC)
259 #define INLINE __inline
267 #undef TYPEDEF_USHORT
271 #undef TYPEDEF_UINT16
272 #undef TYPEDEF_UINT32
273 #undef TYPEDEF_UINT64
274 #undef TYPEDEF_UINTPTR
279 #undef TYPEDEF_FLOAT32
280 #undef TYPEDEF_FLOAT64
281 #undef TYPEDEF_FLOAT_T
286 #define UNUSED_PARAMETER(x) (void)(x)
289 #define DISCARD_QUAL(ptr, type) ((type *)(uintptr)(ptr))