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.
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.
26 #if defined(__x86_64__)
27 #define TYPEDEF_UINTPTR
28 typedef unsigned long long int uintptr
;
32 #define TYPEDEF_USHORT
34 #include <linux/version.h>
36 /* Do not support the (u)int64 types with strict ansi for GNU C */
37 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
39 #define TYPEDEF_UINT64
42 #include <linux/types.h>
48 /* define uchar, ushort, uint, ulong */
51 typedef unsigned char uchar
;
54 #ifndef TYPEDEF_USHORT
55 typedef unsigned short ushort
;
59 typedef unsigned int uint
;
63 typedef unsigned long ulong
;
66 /* define [u]int8/16/32/64, uintptr */
69 typedef unsigned char uint8
;
72 #ifndef TYPEDEF_UINT16
73 typedef unsigned short uint16
;
76 #ifndef TYPEDEF_UINT32
77 typedef unsigned int uint32
;
80 #ifndef TYPEDEF_UINT64
81 typedef unsigned long long uint64
;
84 #ifndef TYPEDEF_UINTPTR
85 typedef unsigned int uintptr
;
89 typedef signed char int8
;
93 typedef signed short int16
;
97 typedef signed int int32
;
100 #ifndef TYPEDEF_INT64
101 typedef signed long long int64
;
105 /* define macro values */
112 #define TRUE 1 /* TRUE */
124 #define ON 1 /* ON = 1 */
127 #define AUTO (-1) /* Auto = -1 */
130 #undef TYPEDEF_USHORT
134 #undef TYPEDEF_UINT16
135 #undef TYPEDEF_UINT32
136 #undef TYPEDEF_UINT64
137 #undef TYPEDEF_UINTPTR
142 #undef TYPEDEF_FLOAT32
143 #undef TYPEDEF_FLOAT64
144 #undef TYPEDEF_FLOAT_T
147 * Including the bcmdefs.h here, to make sure everyone including typedefs.h
148 * gets this automatically
152 #endif /* _TYPEDEFS_H_ */
This page took 0.033628 seconds and 5 git commands to generate.