Mercurial > mplayer.hg
comparison loader/wine/basetsd.h @ 1:3b5f5d1c5041
Initial revision
author | arpi_esp |
---|---|
date | Sat, 24 Feb 2001 20:28:24 +0000 |
parents | |
children | 34aed601f044 |
comparison
equal
deleted
inserted
replaced
0:c1bb2c071d63 | 1:3b5f5d1c5041 |
---|---|
1 /* | |
2 * Compilers that uses ILP32, LP64 or P64 type models | |
3 * for both Win32 and Win64 are supported by this file. | |
4 */ | |
5 | |
6 #ifndef __WINE_BASETSD_H | |
7 #define __WINE_BASETSD_H | |
8 | |
9 #ifdef __WINE__ | |
10 #include "config.h" | |
11 #endif /* defined(__WINE__) */ | |
12 | |
13 #ifdef __cplusplus | |
14 extern "C" { | |
15 #endif /* defined(__cplusplus) */ | |
16 | |
17 /* | |
18 * Win32 was easy to implement under Unix since most (all?) 32-bit | |
19 * Unices uses the same type model (ILP32) as Win32, where int, long | |
20 * and pointer are 32-bit. | |
21 * | |
22 * Win64, however, will cause some problems when implemented under Unix. | |
23 * Linux/{Alpha, Sparc64} and most (all?) other 64-bit Unices uses | |
24 * the LP64 type model where int is 32-bit and long and pointer are | |
25 * 64-bit. Win64 on the other hand uses the P64 (sometimes called LLP64) | |
26 * type model where int and long are 32 bit and pointer is 64-bit. | |
27 */ | |
28 | |
29 /* Type model indepent typedefs */ | |
30 | |
31 typedef char __int8; | |
32 typedef unsigned char __uint8; | |
33 | |
34 typedef short __int16; | |
35 typedef unsigned short __uint16; | |
36 | |
37 typedef int __int32; | |
38 typedef unsigned int __uint32; | |
39 | |
40 typedef long long __int64; | |
41 typedef unsigned long long __uint64; | |
42 | |
43 #if defined(_WIN64) | |
44 | |
45 typedef __uint32 __ptr32; | |
46 typedef void *__ptr64; | |
47 | |
48 #else /* FIXME: defined(_WIN32) */ | |
49 | |
50 typedef void *__ptr32; | |
51 typedef __uint64 __ptr64; | |
52 | |
53 #endif | |
54 | |
55 /* Always signed and 32 bit wide */ | |
56 | |
57 typedef __int32 LONG32; | |
58 //typedef __int32 INT32; | |
59 | |
60 typedef LONG32 *PLONG32; | |
61 //typedef INT32 *PINT32; | |
62 | |
63 /* Always unsigned and 32 bit wide */ | |
64 | |
65 typedef __uint32 ULONG32; | |
66 typedef __uint32 DWORD32; | |
67 typedef __uint32 UINT32; | |
68 | |
69 typedef ULONG32 *PULONG32; | |
70 typedef DWORD32 *PDWORD32; | |
71 typedef UINT32 *PUINT32; | |
72 | |
73 /* Always signed and 64 bit wide */ | |
74 | |
75 typedef __int64 LONG64; | |
76 typedef __int64 INT64; | |
77 | |
78 typedef LONG64 *PLONG64; | |
79 typedef INT64 *PINT64; | |
80 | |
81 /* Always unsigned and 64 bit wide */ | |
82 | |
83 typedef __uint64 ULONG64; | |
84 typedef __uint64 DWORD64; | |
85 typedef __uint64 UINT64; | |
86 | |
87 typedef ULONG64 *PULONG64; | |
88 typedef DWORD64 *PDWORD64; | |
89 typedef UINT64 *PUINT64; | |
90 | |
91 /* Win32 or Win64 dependent typedef/defines. */ | |
92 | |
93 #ifdef _WIN64 | |
94 | |
95 typedef __int64 INT_PTR, *PINT_PTR; | |
96 typedef __uint64 UINT_PTR, *PUINT_PTR; | |
97 | |
98 #define MAXINT_PTR 0x7fffffffffffffff | |
99 #define MININT_PTR 0x8000000000000000 | |
100 #define MAXUINT_PTR 0xffffffffffffffff | |
101 | |
102 typedef __int32 HALF_PTR, *PHALF_PTR; | |
103 typedef __int32 UHALF_PTR, *PUHALF_PTR; | |
104 | |
105 #define MAXHALF_PTR 0x7fffffff | |
106 #define MINHALF_PTR 0x80000000 | |
107 #define MAXUHALF_PTR 0xffffffff | |
108 | |
109 typedef __int64 LONG_PTR, *PLONG_PTR; | |
110 typedef __uint64 ULONG_PTR, *PULONG_PTR; | |
111 typedef __uint64 DWORD_PTR, *PDWORD_PTR; | |
112 | |
113 #else /* FIXME: defined(_WIN32) */ | |
114 | |
115 typedef __int32 INT_PTR, *PINT_PTR; | |
116 typedef __uint32 UINT_PTR, *PUINT_PTR; | |
117 | |
118 #define MAXINT_PTR 0x7fffffff | |
119 #define MININT_PTR 0x80000000 | |
120 #define MAXUINT_PTR 0xffffffff | |
121 | |
122 typedef __int16 HALF_PTR, *PHALF_PTR; | |
123 typedef __uint16 UHALF_PTR, *PUHALF_PTR; | |
124 | |
125 #define MAXUHALF_PTR 0xffff | |
126 #define MAXHALF_PTR 0x7fff | |
127 #define MINHALF_PTR 0x8000 | |
128 | |
129 typedef __int32 LONG_PTR, *PLONG_PTR; | |
130 typedef __uint32 ULONG_PTR, *PULONG_PTR; | |
131 typedef __uint32 DWORD_PTR, *PDWORD_PTR; | |
132 | |
133 #endif /* defined(_WIN64) || defined(_WIN32) */ | |
134 | |
135 typedef INT_PTR SSIZE_T, *PSSIZE_T; | |
136 typedef UINT_PTR SIZE_T, *PSIZE_T; | |
137 | |
138 #ifdef __cplusplus | |
139 } /* extern "C" */ | |
140 #endif /* defined(__cplusplus) */ | |
141 | |
142 #endif /* !defined(__WINE_BASETSD_H) */ | |
143 | |
144 | |
145 |