libfaad2: Restore trailing whitespace in local diff file
[mplayer/glamo.git] / loader / wine / basetsd.h
blob0ec90a9aeb44ed07f7efd1d9d396a0c0f47dbcc8
1 /*
2 * Compilers that uses ILP32, LP64 or P64 type models
3 * for both Win32 and Win64 are supported by this file.
4 */
6 /*
7 * Modified for use with MPlayer, detailed changelog at
8 * http://svn.mplayerhq.hu/mplayer/trunk/
9 */
11 #ifndef MPLAYER_BASETSD_H
12 #define MPLAYER_BASETSD_H
14 #include "config.h"
17 * Win32 was easy to implement under Unix since most (all?) 32-bit
18 * Unices uses the same type model (ILP32) as Win32, where int, long
19 * and pointer are 32-bit.
21 * Win64, however, will cause some problems when implemented under Unix.
22 * Linux/{Alpha, Sparc64} and most (all?) other 64-bit Unices uses
23 * the LP64 type model where int is 32-bit and long and pointer are
24 * 64-bit. Win64 on the other hand uses the P64 (sometimes called LLP64)
25 * type model where int and long are 32 bit and pointer is 64-bit.
28 /* Type model indepent typedefs */
30 #ifndef __INTEL_COMPILER
32 #ifndef __int8
33 typedef char __int8;
34 #endif
35 #ifndef __uint8
36 typedef unsigned char __uint8;
37 #endif
39 #ifndef __int16
40 typedef short __int16;
41 #endif
42 #ifndef __uint16
43 typedef unsigned short __uint16;
44 #endif
46 #ifndef __int32
47 typedef int __int32;
48 #endif
49 #ifndef __uint32
50 typedef unsigned int __uint32;
51 #endif
53 #ifndef __int64
54 typedef long long __int64;
55 #endif
56 #ifndef __uint64
57 typedef unsigned long long __uint64;
58 #endif
60 #else
62 typedef unsigned __int8 __uint8;
63 typedef unsigned __int16 __uint16;
64 typedef unsigned __int32 __uint32;
65 typedef unsigned __int64 __uint64;
67 #endif /* __INTEL_COMPILER */
69 #if defined(_WIN64)
71 //typedef __uint32 __ptr32;
72 //typedef void *__ptr64;
74 #else /* FIXME: defined(_WIN32) */
76 typedef void *__ptr32;
77 typedef __uint64 __ptr64;
79 #endif
81 /* Always signed and 32 bit wide */
83 typedef __int32 LONG32;
84 //typedef __int32 INT32;
86 typedef LONG32 *PLONG32;
87 //typedef INT32 *PINT32;
89 /* Always unsigned and 32 bit wide */
91 typedef __uint32 ULONG32;
92 typedef __uint32 DWORD32;
93 typedef __uint32 UINT32;
95 typedef ULONG32 *PULONG32;
96 typedef DWORD32 *PDWORD32;
97 typedef UINT32 *PUINT32;
99 /* Always signed and 64 bit wide */
101 typedef __int64 LONG64;
102 typedef __int64 INT64;
104 typedef LONG64 *PLONG64;
105 typedef INT64 *PINT64;
107 /* Always unsigned and 64 bit wide */
109 typedef __uint64 ULONG64;
110 typedef __uint64 DWORD64;
111 typedef __uint64 UINT64;
113 typedef ULONG64 *PULONG64;
114 typedef DWORD64 *PDWORD64;
115 typedef UINT64 *PUINT64;
117 /* Win32 or Win64 dependent typedef/defines. */
119 #ifdef _WIN64
121 typedef __int64 INT_PTR, *PINT_PTR;
122 typedef __uint64 UINT_PTR, *PUINT_PTR;
124 #define MAXINT_PTR 0x7fffffffffffffff
125 #define MININT_PTR 0x8000000000000000
126 #define MAXUINT_PTR 0xffffffffffffffff
128 typedef __int32 HALF_PTR, *PHALF_PTR;
129 typedef __int32 UHALF_PTR, *PUHALF_PTR;
131 #define MAXHALF_PTR 0x7fffffff
132 #define MINHALF_PTR 0x80000000
133 #define MAXUHALF_PTR 0xffffffff
135 typedef __int64 LONG_PTR, *PLONG_PTR;
136 typedef __uint64 ULONG_PTR, *PULONG_PTR;
137 typedef __uint64 DWORD_PTR, *PDWORD_PTR;
139 #else /* FIXME: defined(_WIN32) */
141 typedef __int32 INT_PTR, *PINT_PTR;
142 typedef __uint32 UINT_PTR, *PUINT_PTR;
144 #define MAXINT_PTR 0x7fffffff
145 #define MININT_PTR 0x80000000
146 #define MAXUINT_PTR 0xffffffff
148 typedef __int16 HALF_PTR, *PHALF_PTR;
149 typedef __uint16 UHALF_PTR, *PUHALF_PTR;
151 #define MAXUHALF_PTR 0xffff
152 #define MAXHALF_PTR 0x7fff
153 #define MINHALF_PTR 0x8000
155 typedef __int32 LONG_PTR, *PLONG_PTR;
156 typedef __uint32 ULONG_PTR, *PULONG_PTR;
157 typedef __uint32 DWORD_PTR, *PDWORD_PTR;
159 #endif /* defined(_WIN64) || defined(_WIN32) */
161 typedef INT_PTR SSIZE_T, *PSSIZE_T;
162 typedef UINT_PTR SIZE_T, *PSIZE_T;
164 #endif /* MPLAYER_BASETSD_H */