add frameburst closes #1759
[openwrt.git] / package / broadcom-wl / src / include / typedefs.h
1 /*
2 * Copyright 2006, Broadcom Corporation
3 * All Rights Reserved.
4 *
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 $
10 */
11
12 #ifndef _TYPEDEFS_H_
13 #define _TYPEDEFS_H_
14
15 /*
16 * Inferred Typedefs
17 *
18 */
19
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.
23 */
24
25 #ifdef __cplusplus
26
27 #define TYPEDEF_BOOL
28 #ifndef FALSE
29 #define FALSE false
30 #endif
31 #ifndef TRUE
32 #define TRUE true
33 #endif
34
35 #endif /* __cplusplus */
36
37 #if defined(_NEED_SIZE_T_)
38 typedef long unsigned int size_t;
39 #endif
40
41 #define TYPEDEF_UINT
42 #define TYPEDEF_USHORT
43 #define TYPEDEF_ULONG
44
45
46 /* Do not support the (u)int64 types with strict ansi for GNU C */
47 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
48 #define TYPEDEF_INT64
49 #define TYPEDEF_UINT64
50 #endif
51
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 */
55 #else
56 #include <sys/types.h>
57 #endif
58
59 /* use the default typedefs in the next section of this file */
60 #define USE_TYPEDEF_DEFAULTS
61
62 /*
63 * Default Typedefs
64 *
65 */
66
67 #ifdef USE_TYPEDEF_DEFAULTS
68 #undef USE_TYPEDEF_DEFAULTS
69
70 #ifndef TYPEDEF_BOOL
71 typedef /* @abstract@ */ unsigned char bool;
72 #endif
73
74 /* define uchar, ushort, uint, ulong */
75
76 #ifndef TYPEDEF_UCHAR
77 typedef unsigned char uchar;
78 #endif
79
80 #ifndef TYPEDEF_USHORT
81 typedef unsigned short ushort;
82 #endif
83
84 #ifndef TYPEDEF_UINT
85 typedef unsigned int uint;
86 #endif
87
88 #ifndef TYPEDEF_ULONG
89 typedef unsigned long ulong;
90 #endif
91
92 /* define [u]int8/16/32/64, uintptr */
93
94 #ifndef TYPEDEF_UINT8
95 typedef unsigned char uint8;
96 #endif
97
98 #ifndef TYPEDEF_UINT16
99 typedef unsigned short uint16;
100 #endif
101
102 #ifndef TYPEDEF_UINT32
103 typedef unsigned int uint32;
104 #endif
105
106 #ifndef TYPEDEF_UINT64
107 typedef unsigned long long uint64;
108 #endif
109
110 #ifndef TYPEDEF_UINTPTR
111 typedef unsigned int uintptr;
112 #endif
113
114 #ifndef TYPEDEF_INT8
115 typedef signed char int8;
116 #endif
117
118 #ifndef TYPEDEF_INT16
119 typedef signed short int16;
120 #endif
121
122 #ifndef TYPEDEF_INT32
123 typedef signed int int32;
124 #endif
125
126 #ifndef TYPEDEF_INT64
127 typedef signed long long int64;
128 #endif
129
130 /* define float32/64, float_t */
131
132 #ifndef TYPEDEF_FLOAT32
133 typedef float float32;
134 #endif
135
136 #ifndef TYPEDEF_FLOAT64
137 typedef double float64;
138 #endif
139
140 /*
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.
144 */
145
146 #ifndef TYPEDEF_FLOAT_T
147
148 #if defined(FLOAT32)
149 typedef float32 float_t;
150 #else /* default to double precision floating point */
151 typedef float64 float_t;
152 #endif
153
154 #endif /* TYPEDEF_FLOAT_T */
155
156 /* define macro values */
157
158 #ifndef FALSE
159 #define FALSE 0
160 #endif
161
162 #ifndef TRUE
163 #define TRUE 1 /* TRUE */
164 #endif
165
166 #ifndef NULL
167 #define NULL 0
168 #endif
169
170 #ifndef OFF
171 #define OFF 0
172 #endif
173
174 #ifndef ON
175 #define ON 1 /* ON = 1 */
176 #endif
177
178 #define AUTO (-1) /* Auto = -1 */
179
180 /* define PTRSZ, INLINE */
181
182 #ifndef PTRSZ
183 #define PTRSZ sizeof(char*)
184 #endif
185
186 #ifndef INLINE
187
188 #ifdef _MSC_VER
189
190 #define INLINE __inline
191
192 #elif __GNUC__
193
194 #define INLINE __inline__
195
196 #else
197
198 #define INLINE
199
200 #endif /* _MSC_VER */
201
202 #endif /* INLINE */
203
204 #undef TYPEDEF_BOOL
205 #undef TYPEDEF_UCHAR
206 #undef TYPEDEF_USHORT
207 #undef TYPEDEF_UINT
208 #undef TYPEDEF_ULONG
209 #undef TYPEDEF_UINT8
210 #undef TYPEDEF_UINT16
211 #undef TYPEDEF_UINT32
212 #undef TYPEDEF_UINT64
213 #undef TYPEDEF_UINTPTR
214 #undef TYPEDEF_INT8
215 #undef TYPEDEF_INT16
216 #undef TYPEDEF_INT32
217 #undef TYPEDEF_INT64
218 #undef TYPEDEF_FLOAT32
219 #undef TYPEDEF_FLOAT64
220 #undef TYPEDEF_FLOAT_T
221
222 #endif /* USE_TYPEDEF_DEFAULTS */
223
224 /*
225 * Including the bcmdefs.h here, to make sure everyone including typedefs.h
226 * gets this automatically
227 */
228 #include <bcmdefs.h>
229
230 #endif /* _TYPEDEFS_H_ */
This page took 0.054682 seconds and 5 git commands to generate.