92742d3e1fc1f0e9abad709272a8a8b565deffe2
[deliverable/linux.git] / drivers / staging / brcm80211 / include / typedefs.h
1 /*
2 * Copyright (c) 2010 Broadcom Corporation
3 *
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.
7 *
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.
15 */
16
17 #ifndef _TYPEDEFS_H_
18 #define _TYPEDEFS_H_
19
20 /*
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.
24 */
25
26 #if defined(__x86_64__)
27 #define TYPEDEF_UINTPTR
28 typedef unsigned long long int uintptr;
29 #endif
30
31 #define TYPEDEF_UINT
32 #define TYPEDEF_USHORT
33 #define TYPEDEF_ULONG
34 #include <linux/version.h>
35 #define TYPEDEF_BOOL
36
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
42
43 #include <linux/types.h>
44
45 /*
46 * Default Typedefs
47 */
48 #ifndef TYPEDEF_BOOL
49 typedef /* @abstract@ */ unsigned char bool;
50 #endif
51
52 /* define uchar, ushort, uint, ulong */
53
54 #ifndef TYPEDEF_UCHAR
55 typedef unsigned char uchar;
56 #endif
57
58 #ifndef TYPEDEF_USHORT
59 typedef unsigned short ushort;
60 #endif
61
62 #ifndef TYPEDEF_UINT
63 typedef unsigned int uint;
64 #endif
65
66 #ifndef TYPEDEF_ULONG
67 typedef unsigned long ulong;
68 #endif
69
70 /* define [u]int8/16/32/64, uintptr */
71
72 #ifndef TYPEDEF_UINT8
73 typedef unsigned char uint8;
74 #endif
75
76 #ifndef TYPEDEF_UINT16
77 typedef unsigned short uint16;
78 #endif
79
80 #ifndef TYPEDEF_UINT32
81 typedef unsigned int uint32;
82 #endif
83
84 #ifndef TYPEDEF_UINT64
85 typedef unsigned long long uint64;
86 #endif
87
88 #ifndef TYPEDEF_UINTPTR
89 typedef unsigned int uintptr;
90 #endif
91
92 #ifndef TYPEDEF_INT8
93 typedef signed char int8;
94 #endif
95
96 #ifndef TYPEDEF_INT16
97 typedef signed short int16;
98 #endif
99
100 #ifndef TYPEDEF_INT32
101 typedef signed int int32;
102 #endif
103
104 #ifndef TYPEDEF_INT64
105 typedef signed long long int64;
106 #endif
107
108
109 /* define macro values */
110
111 #ifndef FALSE
112 #define FALSE 0
113 #endif
114
115 #ifndef TRUE
116 #define TRUE 1 /* TRUE */
117 #endif
118
119 #ifndef NULL
120 #define NULL 0
121 #endif
122
123 #ifndef OFF
124 #define OFF 0
125 #endif
126
127 #ifndef ON
128 #define ON 1 /* ON = 1 */
129 #endif
130
131 #define AUTO (-1) /* Auto = -1 */
132
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
150
151 /*
152 * Including the bcmdefs.h here, to make sure everyone including typedefs.h
153 * gets this automatically
154 */
155 #include <bcmdefs.h>
156
157 #endif /* _TYPEDEFS_H_ */
This page took 0.053098 seconds and 4 git commands to generate.