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