Staging: brcm80211: remove redefinition of size_t
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / brcm80211 / include / typedefs.h
blob92742d3e1fc1f0e9abad709272a8a8b565deffe2
1 /*
2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #ifndef _TYPEDEFS_H_
18 #define _TYPEDEFS_H_
21 * Infer the compile environment based on preprocessor symbols and pragmas.
22 * Override type definitions as needed, and include configuration-dependent
23 * header files to define types.
26 #if defined(__x86_64__)
27 #define TYPEDEF_UINTPTR
28 typedef unsigned long long int uintptr;
29 #endif
31 #define TYPEDEF_UINT
32 #define TYPEDEF_USHORT
33 #define TYPEDEF_ULONG
34 #include <linux/version.h>
35 #define TYPEDEF_BOOL
37 /* Do not support the (u)int64 types with strict ansi for GNU C */
38 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
39 #define TYPEDEF_INT64
40 #define TYPEDEF_UINT64
41 #endif
43 #include <linux/types.h>
46 * Default Typedefs
48 #ifndef TYPEDEF_BOOL
49 typedef /* @abstract@ */ unsigned char bool;
50 #endif
52 /* define uchar, ushort, uint, ulong */
54 #ifndef TYPEDEF_UCHAR
55 typedef unsigned char uchar;
56 #endif
58 #ifndef TYPEDEF_USHORT
59 typedef unsigned short ushort;
60 #endif
62 #ifndef TYPEDEF_UINT
63 typedef unsigned int uint;
64 #endif
66 #ifndef TYPEDEF_ULONG
67 typedef unsigned long ulong;
68 #endif
70 /* define [u]int8/16/32/64, uintptr */
72 #ifndef TYPEDEF_UINT8
73 typedef unsigned char uint8;
74 #endif
76 #ifndef TYPEDEF_UINT16
77 typedef unsigned short uint16;
78 #endif
80 #ifndef TYPEDEF_UINT32
81 typedef unsigned int uint32;
82 #endif
84 #ifndef TYPEDEF_UINT64
85 typedef unsigned long long uint64;
86 #endif
88 #ifndef TYPEDEF_UINTPTR
89 typedef unsigned int uintptr;
90 #endif
92 #ifndef TYPEDEF_INT8
93 typedef signed char int8;
94 #endif
96 #ifndef TYPEDEF_INT16
97 typedef signed short int16;
98 #endif
100 #ifndef TYPEDEF_INT32
101 typedef signed int int32;
102 #endif
104 #ifndef TYPEDEF_INT64
105 typedef signed long long int64;
106 #endif
109 /* define macro values */
111 #ifndef FALSE
112 #define FALSE 0
113 #endif
115 #ifndef TRUE
116 #define TRUE 1 /* TRUE */
117 #endif
119 #ifndef NULL
120 #define NULL 0
121 #endif
123 #ifndef OFF
124 #define OFF 0
125 #endif
127 #ifndef ON
128 #define ON 1 /* ON = 1 */
129 #endif
131 #define AUTO (-1) /* Auto = -1 */
133 #undef TYPEDEF_BOOL
134 #undef TYPEDEF_UCHAR
135 #undef TYPEDEF_USHORT
136 #undef TYPEDEF_UINT
137 #undef TYPEDEF_ULONG
138 #undef TYPEDEF_UINT8
139 #undef TYPEDEF_UINT16
140 #undef TYPEDEF_UINT32
141 #undef TYPEDEF_UINT64
142 #undef TYPEDEF_UINTPTR
143 #undef TYPEDEF_INT8
144 #undef TYPEDEF_INT16
145 #undef TYPEDEF_INT32
146 #undef TYPEDEF_INT64
147 #undef TYPEDEF_FLOAT32
148 #undef TYPEDEF_FLOAT64
149 #undef TYPEDEF_FLOAT_T
152 * Including the bcmdefs.h here, to make sure everyone including typedefs.h
153 * gets this automatically
155 #include <bcmdefs.h>
157 #endif /* _TYPEDEFS_H_ */