2 * Copyright 2006, 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.
19 /* Infer the compile environment based on preprocessor symbols and pramas.
20 * Override type definitions as needed, and include configuration dependent
21 * header files to define types.
34 #endif /* __cplusplus */
36 #if defined(_NEED_SIZE_T_)
37 typedef long unsigned int size_t;
41 #define TYPEDEF_USHORT
45 /* Do not support the (u)int64 types with strict ansi for GNU C */
46 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
48 #define TYPEDEF_UINT64
51 /* pick up ushort & uint from standard types.h */
52 #if defined(linux) && defined(__KERNEL__)
53 #include <linux/types.h> /* sys/types.h and linux/types.h are oil and water */
55 #include <sys/types.h>
58 /* use the default typedefs in the next section of this file */
59 #define USE_TYPEDEF_DEFAULTS
66 #ifdef USE_TYPEDEF_DEFAULTS
67 #undef USE_TYPEDEF_DEFAULTS
70 typedef /* @abstract@ */ unsigned char bool;
73 /* define uchar, ushort, uint, ulong */
76 typedef unsigned char uchar
;
79 #ifndef TYPEDEF_USHORT
80 typedef unsigned short ushort
;
84 typedef unsigned int uint
;
88 typedef unsigned long ulong
;
91 /* define [u]int8/16/32/64, uintptr */
94 typedef unsigned char uint8
;
97 #ifndef TYPEDEF_UINT16
98 typedef unsigned short uint16
;
101 #ifndef TYPEDEF_UINT32
102 typedef unsigned int uint32
;
105 #ifndef TYPEDEF_UINT64
106 typedef unsigned long long uint64
;
109 #ifndef TYPEDEF_UINTPTR
110 typedef unsigned int uintptr
;
114 typedef signed char int8
;
117 #ifndef TYPEDEF_INT16
118 typedef signed short int16
;
121 #ifndef TYPEDEF_INT32
122 typedef signed int int32
;
125 #ifndef TYPEDEF_INT64
126 typedef signed long long int64
;
129 /* define float32/64, float_t */
131 #ifndef TYPEDEF_FLOAT32
132 typedef float float32
;
135 #ifndef TYPEDEF_FLOAT64
136 typedef double float64
;
140 * abstracted floating point type allows for compile time selection of
141 * single or double precision arithmetic. Compiling with -DFLOAT32
142 * selects single precision; the default is double precision.
145 #ifndef TYPEDEF_FLOAT_T
148 typedef float32 float_t
;
149 #else /* default to double precision floating point */
150 typedef float64 float_t
;
153 #endif /* TYPEDEF_FLOAT_T */
155 /* define macro values */
162 #define TRUE 1 /* TRUE */
174 #define ON 1 /* ON = 1 */
177 #define AUTO (-1) /* Auto = -1 */
179 /* define PTRSZ, INLINE */
182 #define PTRSZ sizeof(char*)
189 #define INLINE __inline
193 #define INLINE __inline__
199 #endif /* _MSC_VER */
205 #undef TYPEDEF_USHORT
209 #undef TYPEDEF_UINT16
210 #undef TYPEDEF_UINT32
211 #undef TYPEDEF_UINT64
212 #undef TYPEDEF_UINTPTR
217 #undef TYPEDEF_FLOAT32
218 #undef TYPEDEF_FLOAT64
219 #undef TYPEDEF_FLOAT_T
221 #endif /* USE_TYPEDEF_DEFAULTS */
224 * Including the bcmdefs.h here, to make sure everyone including typedefs.h
225 * gets this automatically
229 #endif /* _TYPEDEFS_H_ */
This page took 0.052834 seconds and 5 git commands to generate.