Staging: brcm80211: s/int8/s8/
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / brcm80211 / include / typedefs.h
blob2734c34f888f12f25d48b8e2881db0f6e8bb63a1
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_
20 #include <linux/types.h>
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.
28 #if defined(__x86_64__)
29 #define TYPEDEF_UINTPTR
30 typedef unsigned long long int uintptr;
31 #endif
33 #define TYPEDEF_UINT
34 #define TYPEDEF_USHORT
35 #define TYPEDEF_ULONG
38 * Default Typedefs
41 /* define uchar, ushort, uint, ulong */
43 #ifndef TYPEDEF_UCHAR
44 typedef unsigned char uchar;
45 #endif
47 #ifndef TYPEDEF_USHORT
48 typedef unsigned short ushort;
49 #endif
51 #ifndef TYPEDEF_UINT
52 typedef unsigned int uint;
53 #endif
55 #ifndef TYPEDEF_ULONG
56 typedef unsigned long ulong;
57 #endif
59 /* define [u]int16/32/64, uintptr */
61 #ifndef TYPEDEF_UINT16
62 typedef unsigned short uint16;
63 #endif
65 #ifndef TYPEDEF_UINT32
66 typedef unsigned int uint32;
67 #endif
69 #ifndef TYPEDEF_UINTPTR
70 typedef unsigned int uintptr;
71 #endif
73 #ifndef TYPEDEF_INT16
74 typedef signed short int16;
75 #endif
77 #ifndef TYPEDEF_INT32
78 typedef signed int int32;
79 #endif
81 /* define macro values */
83 #ifndef FALSE
84 #define FALSE 0
85 #endif
87 #ifndef TRUE
88 #define TRUE 1 /* TRUE */
89 #endif
91 #ifndef OFF
92 #define OFF 0
93 #endif
95 #ifndef ON
96 #define ON 1 /* ON = 1 */
97 #endif
99 #define AUTO (-1) /* Auto = -1 */
101 #undef TYPEDEF_UCHAR
102 #undef TYPEDEF_USHORT
103 #undef TYPEDEF_UINT
104 #undef TYPEDEF_ULONG
105 #undef TYPEDEF_UINT16
106 #undef TYPEDEF_UINT32
107 #undef TYPEDEF_UINTPTR
108 #undef TYPEDEF_INT16
109 #undef TYPEDEF_INT32
110 #undef TYPEDEF_FLOAT32
111 #undef TYPEDEF_FLOAT64
112 #undef TYPEDEF_FLOAT_T
115 * Including the bcmdefs.h here, to make sure everyone including typedefs.h
116 * gets this automatically
118 #include <bcmdefs.h>
120 #endif /* _TYPEDEFS_H_ */