Tell the user if winedefault.reg is not loaded.
[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  * Copyright (C) 1999 Patrik Stridvall
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  */
21
22 #ifndef __WINE_BASETSD_H
23 #define __WINE_BASETSD_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* defined(__cplusplus) */
28
29 /*
30  * Win32 was easy to implement under Unix since most (all?) 32-bit
31  * Unices uses the same type model (ILP32) as Win32, where int, long
32  * and pointer are 32-bit.
33  *
34  * Win64, however, will cause some problems when implemented under Unix.
35  * Linux/{Alpha, Sparc64} and most (all?) other 64-bit Unices uses
36  * the LP64 type model where int is 32-bit and long and pointer are
37  * 64-bit. Win64 on the other hand uses the P64 (sometimes called LLP64)
38  * type model where int and long are 32 bit and pointer is 64-bit.
39  */
40
41 /* Type model indepent typedefs */
42
43 #ifndef _MSC_VER
44 typedef char      __int8;
45 typedef short     __int16;
46 typedef int       __int32;
47 typedef long long __int64;
48 #endif /* !defined(_MSC_VER) */
49
50 typedef unsigned char      __uint8;
51 typedef unsigned short     __uint16;
52 typedef unsigned int       __uint32;
53
54 #ifndef _MSC_VER
55 typedef unsigned long long __uint64;
56 #else
57 typedef unsigned __int64 __uint64;
58 #endif /* !defined(_MSC_VER) */
59
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 #ifndef _MSC_VER
69 typedef __uint64 __ptr64;
70 #endif /* !defined(_MSC_VER) */
71
72 #endif
73
74 /* Always signed and 32 bit wide */
75
76 typedef __int32 LONG32;
77 typedef __int32 INT32;
78
79 typedef LONG32 *PLONG32;
80 typedef INT32  *PINT32;
81
82 /* Always unsigned and 32 bit wide */
83
84 typedef __uint32 ULONG32;
85 typedef __uint32 DWORD32;
86 typedef __uint32 UINT32;
87
88 typedef ULONG32 *PULONG32;
89 typedef DWORD32 *PDWORD32;
90 typedef UINT32  *PUINT32;
91
92 /* Always signed and 64 bit wide */
93
94 typedef __int64 LONG64;
95 typedef __int64 INT64;
96
97 typedef LONG64 *PLONG64;
98 typedef INT64  *PINT64;
99
100 /* Always unsigned and 64 bit wide */
101
102 typedef __uint64 ULONG64;
103 typedef __uint64 DWORD64;
104 typedef __uint64 UINT64;
105
106 typedef ULONG64 *PULONG64;
107 typedef DWORD64 *PDWORD64;
108 typedef UINT64  *PUINT64;
109
110 /* Win32 or Win64 dependent typedef/defines. */
111
112 #ifdef _WIN64
113
114 typedef __int64 INT_PTR, *PINT_PTR;
115 typedef __uint64 UINT_PTR, *PUINT_PTR;
116
117 #define MAXINT_PTR 0x7fffffffffffffff
118 #define MININT_PTR 0x8000000000000000
119 #define MAXUINT_PTR 0xffffffffffffffff
120
121 typedef __int32 HALF_PTR, *PHALF_PTR;
122 typedef __int32 UHALF_PTR, *PUHALF_PTR;
123
124 #define MAXHALF_PTR 0x7fffffff
125 #define MINHALF_PTR 0x80000000
126 #define MAXUHALF_PTR 0xffffffff
127
128 typedef __int64 LONG_PTR, *PLONG_PTR;
129 typedef __uint64 ULONG_PTR, *PULONG_PTR;
130 typedef __uint64 DWORD_PTR, *PDWORD_PTR;
131
132 #else /* FIXME: defined(_WIN32) */
133
134 typedef __int32 INT_PTR, *PINT_PTR;
135 typedef __uint32 UINT_PTR, *PUINT_PTR;
136
137 #define MAXINT_PTR 0x7fffffff
138 #define MININT_PTR 0x80000000
139 #define MAXUINT_PTR 0xffffffff
140
141 typedef __int16 HALF_PTR, *PHALF_PTR;
142 typedef __uint16 UHALF_PTR, *PUHALF_PTR;
143
144 #define MAXUHALF_PTR 0xffff
145 #define MAXHALF_PTR 0x7fff
146 #define MINHALF_PTR 0x8000
147
148 typedef __int32 LONG_PTR, *PLONG_PTR;
149 typedef __uint32 ULONG_PTR, *PULONG_PTR;
150 typedef __uint32 DWORD_PTR, *PDWORD_PTR;
151
152 #endif /* defined(_WIN64) || defined(_WIN32) */
153
154 typedef INT_PTR SSIZE_T, *PSSIZE_T;
155 typedef UINT_PTR SIZE_T, *PSIZE_T;
156
157 #ifdef __cplusplus
158 } /* extern "C" */
159 #endif /* defined(__cplusplus) */
160
161 #endif /* !defined(__WINE_BASETSD_H) */
162
163
164