]> bbs.cooldavid.org Git - net-next-2.6.git/blob - drivers/staging/brcm80211/include/typedefs.h
Staging: brcm80211: s/uint16/u16/
[net-next-2.6.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_UINT32
48 typedef unsigned int uint32;
49 #endif
50
51 #ifndef TYPEDEF_UINTPTR
52 typedef unsigned int uintptr;
53 #endif
54
55 #ifndef TYPEDEF_INT16
56 typedef signed short int16;
57 #endif
58
59 #ifndef TYPEDEF_INT32
60 typedef signed int int32;
61 #endif
62
63 /* define macro values */
64
65 #ifndef FALSE
66 #define FALSE   0
67 #endif
68
69 #ifndef TRUE
70 #define TRUE    1               /* TRUE */
71 #endif
72
73 #ifndef OFF
74 #define OFF     0
75 #endif
76
77 #ifndef ON
78 #define ON      1               /* ON = 1 */
79 #endif
80
81 #define AUTO    (-1)            /* Auto = -1 */
82
83 #undef TYPEDEF_UINT
84 #undef TYPEDEF_UINT32
85 #undef TYPEDEF_UINTPTR
86 #undef TYPEDEF_INT16
87 #undef TYPEDEF_INT32
88
89 /*
90  * Including the bcmdefs.h here, to make sure everyone including typedefs.h
91  * gets this automatically
92 */
93 #include <bcmdefs.h>
94
95 #endif                          /* _TYPEDEFS_H_ */