annotate loader/wine/basetsd.h @ 4802:9c06b312ced6

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