staging: crystalhd: add missing fixes for userspace lib build
[pandora-kernel.git] / drivers / staging / crystalhd / bc_dts_types.h
1 /********************************************************************
2  * Copyright(c) 2006-2009 Broadcom Corporation.
3  *
4  *  Name: bc_dts_types.h
5  *
6  *  Description: Data types
7  *
8  *  AU
9  *
10  *  HISTORY:
11  *
12  ********************************************************************
13  * This header is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published
15  * by the Free Software Foundation, either version 2.1 of the License.
16  *
17  * This header is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU Lesser General Public License for more details.
21  * You should have received a copy of the GNU Lesser General Public License
22  * along with this header.  If not, see <http://www.gnu.org/licenses/>.
23  *******************************************************************/
24
25 #ifndef _BC_DTS_TYPES_H_
26 #define _BC_DTS_TYPES_H_
27
28 #ifdef __LINUX_USER__  // Don't include these for KERNEL..
29 #include <stdint.h>
30 #endif
31
32 #if defined(_WIN64) || defined(_WIN32)
33 typedef uint32_t                U32;
34 typedef int32_t                 S32;
35 typedef uint16_t                U16;
36 typedef int16_t                 S16;
37 typedef unsigned char           U8;
38 typedef char                    S8;
39 #endif
40
41 #ifndef PVOID
42 typedef void    *PVOID;
43 #endif
44
45 #ifndef BOOL
46 typedef int     BOOL;
47 #endif
48
49 #ifdef WIN32
50     typedef unsigned __int64    U64;
51 #elif defined(_WIN64)
52     typedef uint64_t U64;
53 #endif
54
55 #ifdef _WIN64
56 #if !(defined(POINTER_32))
57 #define POINTER_32      __ptr32
58 #endif
59 #else   /* _WIN32 */
60 #define POINTER_32
61 #endif
62
63 #if defined(__KERNEL__) || defined(__LINUX_USER__)
64
65 #ifdef __LINUX_USER__   /* Don't include these for KERNEL */
66 typedef uint32_t        ULONG;
67 typedef int32_t         LONG;
68 typedef void            *HANDLE;
69 #ifndef VOID
70 typedef void            VOID;
71 #endif
72 typedef void            *LPVOID;
73 typedef uint32_t        DWORD;
74 typedef uint32_t        UINT32;
75 typedef uint32_t        *LPDWORD;
76 typedef unsigned char   *PUCHAR;
77
78 #ifndef TRUE
79         #define TRUE            1
80 #endif
81
82 #ifndef FALSE
83         #define FALSE           0
84 #endif
85
86 #define TEXT
87
88 #else
89
90 /* For Kernel usage.. */
91 typedef bool    bc_bool_t;
92 #endif
93
94 #else
95
96 #ifndef uint64_t
97 typedef struct _uint64_t {
98         uint32_t low_dw;
99         uint32_t hi_dw;
100 } uint64_t;
101 #endif
102
103 #ifndef int32_t
104 typedef signed long             int32_t;
105 #endif
106
107 #ifndef uint32_t
108 typedef unsigned long   uint32_t;
109 #endif
110
111 #ifndef uint16_t
112 typedef unsigned short  uint16_t;
113 #endif
114
115 #ifndef uint8_t
116 typedef unsigned char   uint8_t;
117 #endif
118 #endif
119
120 #endif
121