2 * Copyright (C) 1999-2010, Broadcom Corporation
4 * Unless you and Broadcom execute a separate written software license
5 * agreement governing use of this software, this software is licensed to you
6 * under the terms of the GNU General Public License version 2 (the "GPL"),
7 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
8 * following added to such license:
10 * As a special exception, the copyright holders of this software give you
11 * permission to link this software with independent modules, and to copy and
12 * distribute the resulting executable under terms of your choice, provided that
13 * you also meet, for each linked independent module, the terms and conditions of
14 * the license of that module. An independent module is a module which is not
15 * derived from this software. The special exception does not apply to any
16 * modifications of the software.
18 * Notwithstanding the above, under no circumstances may you combine this
19 * software in any way with any other Broadcom software provided under a license
20 * other than the GPL, without Broadcom's express prior written consent.
21 * $Id: typedefs.h,v 1.85.34.1.2.5 2009/01/27 04:09:40 Exp $
32 #include "site_typedefs.h"
53 #if defined(__x86_64__)
54 #define TYPEDEF_UINTPTR
55 typedef unsigned long long int uintptr;
61 #if defined(TARGETOS_nucleus)
66 #define TYPEDEF_FLOAT_T
69 #if defined(_NEED_SIZE_T_)
70 typedef long unsigned int size_t;
74 typedef long unsigned int size_t;
82 #ifndef TARGETENV_android
83 #define TYPEDEF_USHORT
87 #include <linux/version.h>
88 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19))
97 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
99 #define TYPEDEF_UINT64
105 #define TYPEDEF_INT64
107 #if defined(__STDC__)
108 #define TYPEDEF_UINT64
113 #if !defined(__DJGPP__) && !defined(TARGETOS_nucleus)
116 #if defined(__KERNEL__)
118 #include <linux/types.h>
123 #include <sys/types.h>
132 #define USE_TYPEDEF_DEFAULTS
139 #ifdef USE_TYPEDEF_DEFAULTS
140 #undef USE_TYPEDEF_DEFAULTS
143 typedef unsigned char bool;
148 #ifndef TYPEDEF_UCHAR
149 typedef unsigned char uchar;
152 #ifndef TYPEDEF_USHORT
153 typedef unsigned short ushort;
157 typedef unsigned int uint;
160 #ifndef TYPEDEF_ULONG
161 typedef unsigned long ulong;
166 #ifndef TYPEDEF_UINT8
167 typedef unsigned char uint8;
170 #ifndef TYPEDEF_UINT16
171 typedef unsigned short uint16;
174 #ifndef TYPEDEF_UINT32
175 typedef unsigned int uint32;
178 #ifndef TYPEDEF_UINT64
179 typedef unsigned long long uint64;
182 #ifndef TYPEDEF_UINTPTR
183 typedef unsigned int uintptr;
187 typedef signed char int8;
190 #ifndef TYPEDEF_INT16
191 typedef signed short int16;
194 #ifndef TYPEDEF_INT32
195 typedef signed int int32;
198 #ifndef TYPEDEF_INT64
199 typedef signed long long int64;
204 #ifndef TYPEDEF_FLOAT32
205 typedef float float32;
208 #ifndef TYPEDEF_FLOAT64
209 typedef double float64;
214 #ifndef TYPEDEF_FLOAT_T
217 typedef float32 float_t;
219 typedef float64 float_t;
251 #define PTRSZ sizeof(char*)
256 #if defined(__GNUC__)
257 #define BWL_COMPILER_GNU
258 #elif defined(__CC_ARM)
259 #define BWL_COMPILER_ARMCC
261 #error "Unknown compiler!"
266 #if defined(BWL_COMPILER_MICROSOFT)
267 #define INLINE __inline
268 #elif defined(BWL_COMPILER_GNU)
269 #define INLINE __inline__
270 #elif defined(BWL_COMPILER_ARMCC)
271 #define INLINE __inline
279 #undef TYPEDEF_USHORT
283 #undef TYPEDEF_UINT16
284 #undef TYPEDEF_UINT32
285 #undef TYPEDEF_UINT64
286 #undef TYPEDEF_UINTPTR
291 #undef TYPEDEF_FLOAT32
292 #undef TYPEDEF_FLOAT64
293 #undef TYPEDEF_FLOAT_T
298 #define UNUSED_PARAMETER(x) (void)(x)