adb6b1589d20b604a31dd8817a706510e60be0a8
2 * Copyright 2007, Broadcom Corporation
5 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
6 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
7 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
8 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
16 /* Define 'SITE_TYPEDEFS' in the compile to include a site specific
17 * typedef file "site_typedefs.h".
19 * If 'SITE_TYPEDEFS' is not defined, then the "Inferred Typedefs"
20 * section of this file makes inferences about the compile environment
21 * based on defined symbols and possibly compiler pragmas.
23 * Following these two sections is the "Default Typedefs"
24 * section. This section is only prcessed if 'USE_TYPEDEF_DEFAULTS' is
25 * defined. This section has a default set of typedefs and a few
26 * proprocessor symbols (TRUE, FALSE, NULL, ...).
32 * Site Specific Typedefs
36 #include "site_typedefs.h"
45 /* Infer the compile environment based on preprocessor symbols and pramas.
46 * Override type definitions as needed, and include configuration dependent
47 * header files to define types.
60 #else /* ! __cplusplus */
65 typedef unsigned char bool; /* consistent w/BOOL */
69 #endif /* ! __cplusplus */
71 /* use the Windows ULONG_PTR type when compiling for 64 bit */
72 #if defined(_WIN64) && !defined(EFI)
74 #define TYPEDEF_UINTPTR
75 typedef ULONG_PTR uintptr
;
76 #elif defined(__x86_64__)
77 #define TYPEDEF_UINTPTR
78 typedef unsigned long long int uintptr
;
86 #if defined(EFI) && !defined(_WIN64)
90 #if defined(_NEED_SIZE_T_)
91 typedef long unsigned int size_t;
95 typedef long unsigned int size_t;
96 #endif /* __DJGPP__ */
98 #ifdef _MSC_VER /* Microsoft C */
100 #define TYPEDEF_UINT64
101 typedef signed __int64 int64
;
102 typedef unsigned __int64 uint64
;
109 #if defined(__NetBSD__)
110 #define TYPEDEF_ULONG
116 #define TYPEDEF_USHORT
117 #define TYPEDEF_ULONG
119 #include <linux/version.h>
120 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19))
122 #endif /* >= 2.6.19 */
123 #endif /* __KERNEL__ */
126 #if !defined(linux) && !defined(_WIN32) && !defined(_CFE_) && \
127 !defined(_HNDRTE_) && !defined(_MINOSL_) && !defined(__DJGPP__) && !defined(__IOPOS__)
129 #define TYPEDEF_USHORT
133 /* Do not support the (u)int64 types with strict ansi for GNU C */
134 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
135 #define TYPEDEF_INT64
136 #define TYPEDEF_UINT64
139 /* ICL accepts unsigned 64 bit type only, and complains in ANSI mode
140 * for singned or unsigned
144 #define TYPEDEF_INT64
146 #if defined(__STDC__)
147 #define TYPEDEF_UINT64
152 #if !defined(_WIN32) && !defined(_CFE_) && !defined(_MINOSL_) && \
153 !defined(__DJGPP__) && !defined(__IOPOS__)
155 /* pick up ushort & uint from standard types.h */
156 #if defined(linux) && defined(__KERNEL__)
158 #include <linux/types.h> /* sys/types.h and linux/types.h are oil and water */
162 #include <sys/types.h>
170 #ifdef __BIG_ENDIAN__
174 #error "IL_BIGENDIAN was defined for a little-endian compile"
176 #endif /* __BIG_ENDIAN__ */
178 #if !defined(__cplusplus)
180 #if defined(__i386__)
181 typedef unsigned char bool;
183 typedef unsigned int bool;
192 #include <IOKit/IOTypes.h>
195 #endif /* __cplusplus */
200 /* use the default typedefs in the next section of this file */
201 #define USE_TYPEDEF_DEFAULTS
203 #endif /* SITE_TYPEDEFS */
211 #ifdef USE_TYPEDEF_DEFAULTS
212 #undef USE_TYPEDEF_DEFAULTS
215 typedef /* @abstract@ */ unsigned char bool;
218 /* define uchar, ushort, uint, ulong */
220 #ifndef TYPEDEF_UCHAR
221 typedef unsigned char uchar
;
224 #ifndef TYPEDEF_USHORT
225 typedef unsigned short ushort
;
229 typedef unsigned int uint
;
232 #ifndef TYPEDEF_ULONG
233 typedef unsigned long ulong
;
236 /* define [u]int8/16/32/64, uintptr */
238 #ifndef TYPEDEF_UINT8
239 typedef unsigned char uint8
;
242 #ifndef TYPEDEF_UINT16
243 typedef unsigned short uint16
;
246 #ifndef TYPEDEF_UINT32
247 typedef unsigned int uint32
;
250 #ifndef TYPEDEF_UINT64
251 typedef unsigned long long uint64
;
254 #ifndef TYPEDEF_UINTPTR
255 typedef unsigned int uintptr
;
259 typedef signed char int8
;
262 #ifndef TYPEDEF_INT16
263 typedef signed short int16
;
266 #ifndef TYPEDEF_INT32
267 typedef signed int int32
;
270 #ifndef TYPEDEF_INT64
271 typedef signed long long int64
;
274 /* define float32/64, float_t */
276 #ifndef TYPEDEF_FLOAT32
277 typedef float float32
;
280 #ifndef TYPEDEF_FLOAT64
281 typedef double float64
;
285 * abstracted floating point type allows for compile time selection of
286 * single or double precision arithmetic. Compiling with -DFLOAT32
287 * selects single precision; the default is double precision.
290 #ifndef TYPEDEF_FLOAT_T
293 typedef float32 float_t
;
294 #else /* default to double precision floating point */
295 typedef float64 float_t
;
298 #endif /* TYPEDEF_FLOAT_T */
300 /* define macro values */
307 #define TRUE 1 /* TRUE */
319 #define ON 1 /* ON = 1 */
322 #define AUTO (-1) /* Auto = -1 */
324 /* define PTRSZ, INLINE */
327 #define PTRSZ sizeof(char*)
334 #define INLINE __inline
336 #elif defined(__GNUC__)
338 #define INLINE __inline__
344 #endif /* _MSC_VER */
350 #undef TYPEDEF_USHORT
354 #undef TYPEDEF_UINT16
355 #undef TYPEDEF_UINT32
356 #undef TYPEDEF_UINT64
357 #undef TYPEDEF_UINTPTR
362 #undef TYPEDEF_FLOAT32
363 #undef TYPEDEF_FLOAT64
364 #undef TYPEDEF_FLOAT_T
366 #endif /* USE_TYPEDEF_DEFAULTS */
369 * Including the bcmdefs.h here, to make sure everyone including typedefs.h
370 * gets this automatically
374 #endif /* _TYPEDEFS_H_ */
This page took 0.059989 seconds and 3 git commands to generate.