Mercurial > mplayer.hg
annotate loader/wine/basetsd.h @ 15664:aa24bbbfd5c4
gcc-2.95.3 fix, patch inspired by Steven M. Schultz
author | iive |
---|---|
date | Mon, 06 Jun 2005 17:27:46 +0000 |
parents | f5537cc95b02 |
children | 0a07aa511c2a |
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 | |
15166
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
14492
diff
changeset
|
6 /* |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
14492
diff
changeset
|
7 * Modified for use with MPlayer, detailed CVS changelog at |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
14492
diff
changeset
|
8 * http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/ |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
14492
diff
changeset
|
9 * $Id$ |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
14492
diff
changeset
|
10 */ |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
14492
diff
changeset
|
11 |
1 | 12 #ifndef __WINE_BASETSD_H |
13 #define __WINE_BASETSD_H | |
14 | |
15 #ifdef __WINE__ | |
16 #include "config.h" | |
17 #endif /* defined(__WINE__) */ | |
18 | |
19 #ifdef __cplusplus | |
20 extern "C" { | |
21 #endif /* defined(__cplusplus) */ | |
22 | |
23 /* | |
24 * Win32 was easy to implement under Unix since most (all?) 32-bit | |
25 * Unices uses the same type model (ILP32) as Win32, where int, long | |
26 * and pointer are 32-bit. | |
27 * | |
28 * Win64, however, will cause some problems when implemented under Unix. | |
29 * Linux/{Alpha, Sparc64} and most (all?) other 64-bit Unices uses | |
30 * the LP64 type model where int is 32-bit and long and pointer are | |
31 * 64-bit. Win64 on the other hand uses the P64 (sometimes called LLP64) | |
32 * type model where int and long are 32 bit and pointer is 64-bit. | |
33 */ | |
34 | |
35 /* Type model indepent typedefs */ | |
36 | |
14492
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
37 #ifndef __INTEL_COMPILER |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
38 |
1 | 39 typedef char __int8; |
40 typedef unsigned char __uint8; | |
41 | |
42 typedef short __int16; | |
43 typedef unsigned short __uint16; | |
44 | |
45 typedef int __int32; | |
46 typedef unsigned int __uint32; | |
47 | |
48 typedef long long __int64; | |
49 typedef unsigned long long __uint64; | |
50 | |
14492
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
51 #else |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
52 |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
53 typedef unsigned __int8 __uint8; |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
54 typedef unsigned __int16 __uint16; |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
55 typedef unsigned __int32 __uint32; |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
56 typedef unsigned __int64 __uint64; |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
57 |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
58 #endif /* __INTEL_COMPILER */ |
34aed601f044
icc support by Darek Ostolski <ostolski at kwantum dot gda dot pl>
diego
parents:
1
diff
changeset
|
59 |
1 | 60 #if defined(_WIN64) |
61 | |
62 typedef __uint32 __ptr32; | |
63 typedef void *__ptr64; | |
64 | |
65 #else /* FIXME: defined(_WIN32) */ | |
66 | |
67 typedef void *__ptr32; | |
68 typedef __uint64 __ptr64; | |
69 | |
70 #endif | |
71 | |
72 /* Always signed and 32 bit wide */ | |
73 | |
74 typedef __int32 LONG32; | |
75 //typedef __int32 INT32; | |
76 | |
77 typedef LONG32 *PLONG32; | |
78 //typedef INT32 *PINT32; | |
79 | |
80 /* Always unsigned and 32 bit wide */ | |
81 | |
82 typedef __uint32 ULONG32; | |
83 typedef __uint32 DWORD32; | |
84 typedef __uint32 UINT32; | |
85 | |
86 typedef ULONG32 *PULONG32; | |
87 typedef DWORD32 *PDWORD32; | |
88 typedef UINT32 *PUINT32; | |
89 | |
90 /* Always signed and 64 bit wide */ | |
91 | |
92 typedef __int64 LONG64; | |
93 typedef __int64 INT64; | |
94 | |
95 typedef LONG64 *PLONG64; | |
96 typedef INT64 *PINT64; | |
97 | |
98 /* Always unsigned and 64 bit wide */ | |
99 | |
100 typedef __uint64 ULONG64; | |
101 typedef __uint64 DWORD64; | |
102 typedef __uint64 UINT64; | |
103 | |
104 typedef ULONG64 *PULONG64; | |
105 typedef DWORD64 *PDWORD64; | |
106 typedef UINT64 *PUINT64; | |
107 | |
108 /* Win32 or Win64 dependent typedef/defines. */ | |
109 | |
110 #ifdef _WIN64 | |
111 | |
112 typedef __int64 INT_PTR, *PINT_PTR; | |
113 typedef __uint64 UINT_PTR, *PUINT_PTR; | |
114 | |
115 #define MAXINT_PTR 0x7fffffffffffffff | |
116 #define MININT_PTR 0x8000000000000000 | |
117 #define MAXUINT_PTR 0xffffffffffffffff | |
118 | |
119 typedef __int32 HALF_PTR, *PHALF_PTR; | |
120 typedef __int32 UHALF_PTR, *PUHALF_PTR; | |
121 | |
122 #define MAXHALF_PTR 0x7fffffff | |
123 #define MINHALF_PTR 0x80000000 | |
124 #define MAXUHALF_PTR 0xffffffff | |
125 | |
126 typedef __int64 LONG_PTR, *PLONG_PTR; | |
127 typedef __uint64 ULONG_PTR, *PULONG_PTR; | |
128 typedef __uint64 DWORD_PTR, *PDWORD_PTR; | |
129 | |
130 #else /* FIXME: defined(_WIN32) */ | |
131 | |
132 typedef __int32 INT_PTR, *PINT_PTR; | |
133 typedef __uint32 UINT_PTR, *PUINT_PTR; | |
134 | |
135 #define MAXINT_PTR 0x7fffffff | |
136 #define MININT_PTR 0x80000000 | |
137 #define MAXUINT_PTR 0xffffffff | |
138 | |
139 typedef __int16 HALF_PTR, *PHALF_PTR; | |
140 typedef __uint16 UHALF_PTR, *PUHALF_PTR; | |
141 | |
142 #define MAXUHALF_PTR 0xffff | |
143 #define MAXHALF_PTR 0x7fff | |
144 #define MINHALF_PTR 0x8000 | |
145 | |
146 typedef __int32 LONG_PTR, *PLONG_PTR; | |
147 typedef __uint32 ULONG_PTR, *PULONG_PTR; | |
148 typedef __uint32 DWORD_PTR, *PDWORD_PTR; | |
149 | |
150 #endif /* defined(_WIN64) || defined(_WIN32) */ | |
151 | |
152 typedef INT_PTR SSIZE_T, *PSSIZE_T; | |
153 typedef UINT_PTR SIZE_T, *PSIZE_T; | |
154 | |
155 #ifdef __cplusplus | |
156 } /* extern "C" */ | |
157 #endif /* defined(__cplusplus) */ | |
158 | |
159 #endif /* !defined(__WINE_BASETSD_H) */ | |
160 | |
161 | |
162 |