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.
9 * $Id: typedefs.h,v 1.1.1.12 2006/04/08 06:13:40 honor Exp $
20 /* Infer the compile environment based on preprocessor symbols and pramas.
21 * Override type definitions as needed, and include configuration dependent
22 * header files to define types.
35 #endif /* __cplusplus */
37 #if defined(_NEED_SIZE_T_)
38 typedef long unsigned int size_t;
42 #define TYPEDEF_USHORT
46 /* Do not support the (u)int64 types with strict ansi for GNU C */
47 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
49 #define TYPEDEF_UINT64
52 /* pick up ushort & uint from standard types.h */
53 #if defined(linux) && defined(__KERNEL__)
54 #include <linux/types.h> /* sys/types.h and linux/types.h are oil and water */
56 #include <sys/types.h>
59 /* use the default typedefs in the next section of this file */
60 #define USE_TYPEDEF_DEFAULTS
67 #ifdef USE_TYPEDEF_DEFAULTS
68 #undef USE_TYPEDEF_DEFAULTS
71 typedef /* @abstract@ */ unsigned char bool;
74 /* define uchar, ushort, uint, ulong */
77 typedef unsigned char uchar
;
80 #ifndef TYPEDEF_USHORT
81 typedef unsigned short ushort
;
85 typedef unsigned int uint
;
89 typedef unsigned long ulong
;
92 /* define [u]int8/16/32/64, uintptr */
95 typedef unsigned char uint8
;
98 #ifndef TYPEDEF_UINT16
99 typedef unsigned short uint16
;
102 #ifndef TYPEDEF_UINT32
103 typedef unsigned int uint32
;
106 #ifndef TYPEDEF_UINT64
107 typedef unsigned long long uint64
;
110 #ifndef TYPEDEF_UINTPTR
111 typedef unsigned int uintptr
;
115 typedef signed char int8
;
118 #ifndef TYPEDEF_INT16
119 typedef signed short int16
;
122 #ifndef TYPEDEF_INT32
123 typedef signed int int32
;
126 #ifndef TYPEDEF_INT64
127 typedef signed long long int64
;
130 /* define float32/64, float_t */
132 #ifndef TYPEDEF_FLOAT32
133 typedef float float32
;
136 #ifndef TYPEDEF_FLOAT64
137 typedef double float64
;
141 * abstracted floating point type allows for compile time selection of
142 * single or double precision arithmetic. Compiling with -DFLOAT32
143 * selects single precision; the default is double precision.
146 #ifndef TYPEDEF_FLOAT_T
149 typedef float32 float_t
;
150 #else /* default to double precision floating point */
151 typedef float64 float_t
;
154 #endif /* TYPEDEF_FLOAT_T */
156 /* define macro values */
163 #define TRUE 1 /* TRUE */
175 #define ON 1 /* ON = 1 */
178 #define AUTO (-1) /* Auto = -1 */
180 /* define PTRSZ, INLINE */
183 #define PTRSZ sizeof(char*)
190 #define INLINE __inline
194 #define INLINE __inline__
200 #endif /* _MSC_VER */
206 #undef TYPEDEF_USHORT
210 #undef TYPEDEF_UINT16
211 #undef TYPEDEF_UINT32
212 #undef TYPEDEF_UINT64
213 #undef TYPEDEF_UINTPTR
218 #undef TYPEDEF_FLOAT32
219 #undef TYPEDEF_FLOAT64
220 #undef TYPEDEF_FLOAT_T
222 #endif /* USE_TYPEDEF_DEFAULTS */
225 * Including the bcmdefs.h here, to make sure everyone including typedefs.h
226 * gets this automatically
230 #endif /* _TYPEDEFS_H_ */
This page took 0.054682 seconds and 5 git commands to generate.