Mercurial > mplayer.hg
annotate loader/wine/basetsd.h @ 14723:04081c3df9ce
sync 1.875
author | wight |
---|---|
date | Fri, 18 Feb 2005 07:39:39 +0000 |
parents | 34aed601f044 |
children | f5537cc95b02 |
rev | line source |
---|---|
1 | 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 | |
14492
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
31 #ifndef __INTEL_COMPILER |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
32 |
1 | 33 typedef char __int8; |
34 typedef unsigned char __uint8; | |
35 | |
36 typedef short __int16; | |
37 typedef unsigned short __uint16; | |
38 | |
39 typedef int __int32; | |
40 typedef unsigned int __uint32; | |
41 | |
42 typedef long long __int64; | |
43 typedef unsigned long long __uint64; | |
44 | |
14492
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
45 #else |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
46 |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
47 typedef unsigned __int8 __uint8; |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
48 typedef unsigned __int16 __uint16; |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
49 typedef unsigned __int32 __uint32; |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
50 typedef unsigned __int64 __uint64; |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
51 |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
52 #endif /* __INTEL_COMPILER */ |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
53 |
1 | 54 #if defined(_WIN64) |
55 | |
56 typedef __uint32 __ptr32; | |
57 typedef void *__ptr64; | |
58 | |
59 #else /* FIXME: defined(_WIN32) */ | |
60 | |
61 typedef void *__ptr32; | |
62 typedef __uint64 __ptr64; | |
63 | |
64 #endif | |
65 | |
66 /* Always signed and 32 bit wide */ | |
67 | |
68 typedef __int32 LONG32; | |
69 //typedef __int32 INT32; | |
70 | |
71 typedef LONG32 *PLONG32; | |
72 //typedef INT32 *PINT32; | |
73 | |
74 /* Always unsigned and 32 bit wide */ | |
75 | |
76 typedef __uint32 ULONG32; | |
77 typedef __uint32 DWORD32; | |
78 typedef __uint32 UINT32; | |
79 | |
80 typedef ULONG32 *PULONG32; | |
81 typedef DWORD32 *PDWORD32; | |
82 typedef UINT32 *PUINT32; | |
83 | |
84 /* Always signed and 64 bit wide */ | |
85 | |
86 typedef __int64 LONG64; | |
87 typedef __int64 INT64; | |
88 | |
89 typedef LONG64 *PLONG64; | |
90 typedef INT64 *PINT64; | |
91 | |
92 /* Always unsigned and 64 bit wide */ | |
93 | |
94 typedef __uint64 ULONG64; | |
95 typedef __uint64 DWORD64; | |
96 typedef __uint64 UINT64; | |
97 | |
98 typedef ULONG64 *PULONG64; | |
99 typedef DWORD64 *PDWORD64; | |
100 typedef UINT64 *PUINT64; | |
101 | |
102 /* Win32 or Win64 dependent typedef/defines. */ | |
103 | |
104 #ifdef _WIN64 | |
105 | |
106 typedef __int64 INT_PTR, *PINT_PTR; | |
107 typedef __uint64 UINT_PTR, *PUINT_PTR; | |
108 | |
109 #define MAXINT_PTR 0x7fffffffffffffff | |
110 #define MININT_PTR 0x8000000000000000 | |
111 #define MAXUINT_PTR 0xffffffffffffffff | |
112 | |
113 typedef __int32 HALF_PTR, *PHALF_PTR; | |
114 typedef __int32 UHALF_PTR, *PUHALF_PTR; | |
115 | |
116 #define MAXHALF_PTR 0x7fffffff | |
117 #define MINHALF_PTR 0x80000000 | |
118 #define MAXUHALF_PTR 0xffffffff | |
119 | |
120 typedef __int64 LONG_PTR, *PLONG_PTR; | |
121 typedef __uint64 ULONG_PTR, *PULONG_PTR; | |
122 typedef __uint64 DWORD_PTR, *PDWORD_PTR; | |
123 | |
124 #else /* FIXME: defined(_WIN32) */ | |
125 | |
126 typedef __int32 INT_PTR, *PINT_PTR; | |
127 typedef __uint32 UINT_PTR, *PUINT_PTR; | |
128 | |
129 #define MAXINT_PTR 0x7fffffff | |
130 #define MININT_PTR 0x80000000 | |
131 #define MAXUINT_PTR 0xffffffff | |
132 | |
133 typedef __int16 HALF_PTR, *PHALF_PTR; | |
134 typedef __uint16 UHALF_PTR, *PUHALF_PTR; | |
135 | |
136 #define MAXUHALF_PTR 0xffff | |
137 #define MAXHALF_PTR 0x7fff | |
138 #define MINHALF_PTR 0x8000 | |
139 | |
140 typedef __int32 LONG_PTR, *PLONG_PTR; | |
141 typedef __uint32 ULONG_PTR, *PULONG_PTR; | |
142 typedef __uint32 DWORD_PTR, *PDWORD_PTR; | |
143 | |
144 #endif /* defined(_WIN64) || defined(_WIN32) */ | |
145 | |
146 typedef INT_PTR SSIZE_T, *PSSIZE_T; | |
147 typedef UINT_PTR SIZE_T, *PSIZE_T; | |
148 | |
149 #ifdef __cplusplus | |
150 } /* extern "C" */ | |
151 #endif /* defined(__cplusplus) */ | |
152 | |
153 #endif /* !defined(__WINE_BASETSD_H) */ | |
154 | |
155 | |
156 |