Staging: brcm80211: s/ulong/unsigned long/
[linux-block.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 #include <linux/types.h>
21
22 /*
23  * Infer the compile environment based on preprocessor symbols and pragmas.
24  * Override type definitions as needed, and include configuration-dependent
25  * header files to define types.
26  */
27
28 #if defined(__x86_64__)
29 #define TYPEDEF_UINTPTR
30 typedef unsigned long long int uintptr;
31 #endif
32
33 #define TYPEDEF_UINT
34
35 /*
36  * Default Typedefs
37  */
38
39 /* define uint */
40
41 #ifndef TYPEDEF_UINT
42 typedef unsigned int uint;
43 #endif
44
45 /* define [u]int16/32/64, uintptr */
46
47 #ifndef TYPEDEF_UINT16
48 typedef unsigned short uint16;
49 #endif
50
51 #ifndef TYPEDEF_UINT32
52 typedef unsigned int uint32;
53 #endif
54
55 #ifndef TYPEDEF_UINTPTR
56 typedef unsigned int uintptr;
57 #endif
58
59 #ifndef TYPEDEF_INT16
60 typedef signed short int16;
61 #endif
62
63 #ifndef TYPEDEF_INT32
64 typedef signed int int32;
65 #endif
66
67 /* define macro values */
68
69 #ifndef FALSE
70 #define FALSE   0
71 #endif
72
73 #ifndef TRUE
74 #define TRUE    1               /* TRUE */
75 #endif
76
77 #ifndef OFF
78 #define OFF     0
79 #endif
80
81 #ifndef ON
82 #define ON      1               /* ON = 1 */
83 #endif
84
85 #define AUTO    (-1)            /* Auto = -1 */
86
87 #undef TYPEDEF_UINT
88 #undef TYPEDEF_UINT16
89 #undef TYPEDEF_UINT32
90 #undef TYPEDEF_UINTPTR
91 #undef TYPEDEF_INT16
92 #undef TYPEDEF_INT32
93 #undef TYPEDEF_FLOAT32
94 #undef TYPEDEF_FLOAT64
95 #undef TYPEDEF_FLOAT_T
96
97 /*
98  * Including the bcmdefs.h here, to make sure everyone including typedefs.h
99  * gets this automatically
100 */
101 #include <bcmdefs.h>
102
103 #endif                          /* _TYPEDEFS_H_ */