Staging: brcm80211: remove unit64 and int64 typedefs
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / brcm80211 / include / typedefs.h
blob10cb839083c7af432461db0c89226f49a48b18f6
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]int8/16/32/64, uintptr */
61 #ifndef TYPEDEF_UINT8
62 typedef unsigned char uint8;
63 #endif
65 #ifndef TYPEDEF_UINT16
66 typedef unsigned short uint16;
67 #endif
69 #ifndef TYPEDEF_UINT32
70 typedef unsigned int uint32;
71 #endif
73 #ifndef TYPEDEF_UINTPTR
74 typedef unsigned int uintptr;
75 #endif
77 #ifndef TYPEDEF_INT8
78 typedef signed char int8;
79 #endif
81 #ifndef TYPEDEF_INT16
82 typedef signed short int16;
83 #endif
85 #ifndef TYPEDEF_INT32
86 typedef signed int int32;
87 #endif
89 /* define macro values */
91 #ifndef FALSE
92 #define FALSE 0
93 #endif
95 #ifndef TRUE
96 #define TRUE 1 /* TRUE */
97 #endif
99 #ifndef NULL
100 #define NULL 0
101 #endif
103 #ifndef OFF
104 #define OFF 0
105 #endif
107 #ifndef ON
108 #define ON 1 /* ON = 1 */
109 #endif
111 #define AUTO (-1) /* Auto = -1 */
113 #undef TYPEDEF_UCHAR
114 #undef TYPEDEF_USHORT
115 #undef TYPEDEF_UINT
116 #undef TYPEDEF_ULONG
117 #undef TYPEDEF_UINT8
118 #undef TYPEDEF_UINT16
119 #undef TYPEDEF_UINT32
120 #undef TYPEDEF_UINTPTR
121 #undef TYPEDEF_INT8
122 #undef TYPEDEF_INT16
123 #undef TYPEDEF_INT32
124 #undef TYPEDEF_FLOAT32
125 #undef TYPEDEF_FLOAT64
126 #undef TYPEDEF_FLOAT_T
129 * Including the bcmdefs.h here, to make sure everyone including typedefs.h
130 * gets this automatically
132 #include <bcmdefs.h>
134 #endif /* _TYPEDEFS_H_ */