libemf 1.0.9
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
10extern "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
27typedef char __int8;
28typedef unsigned char __uint8;
29
30typedef short __int16;
31typedef unsigned short __uint16;
32
33typedef int __int32;
34typedef unsigned int __uint32;
35
36// wogl
37//typedef long long __int64;
38//typedef unsigned long long __uint64;
39typedef long __int64;
40typedef unsigned long __uint64;
41
42#if defined(_WIN64)
43
44typedef __uint32 __ptr32;
45typedef void *__ptr64;
46
47#else /* FIXME: defined(_WIN32) */
48
49typedef void *__ptr32;
50typedef __uint64 __ptr64;
51
52#endif
53
54/* Always signed and 32 bit wide */
55
56typedef __int32 LONG32;
57typedef __int32 INT32;
58
59typedef LONG32 *PLONG32;
60typedef INT32 *PINT32;
61
62/* Always unsigned and 32 bit wide */
63
64typedef __uint32 ULONG32;
65typedef __uint32 DWORD32;
66typedef __uint32 UINT32;
67
68typedef ULONG32 *PULONG32;
69typedef DWORD32 *PDWORD32;
70typedef UINT32 *PUINT32;
71
72/* Always signed and 64 bit wide */
73
74typedef __int64 LONG64;
75typedef __int64 INT64;
76
77typedef LONG64 *PLONG64;
78typedef INT64 *PINT64;
79
80/* Always unsigned and 64 bit wide */
81
82typedef __uint64 ULONG64;
83typedef __uint64 DWORD64;
84typedef __uint64 UINT64;
85
86typedef ULONG64 *PULONG64;
87typedef DWORD64 *PDWORD64;
88typedef UINT64 *PUINT64;
89
90/* Win32 or Win64 dependent typedef/defines. */
91
92#ifdef _WIN64
93
94typedef __int64 INT_PTR, *PINT_PTR;
95typedef __uint64 UINT_PTR, *PUINT_PTR;
96
97#define MAXINT_PTR 0x7fffffffffffffff
98#define MININT_PTR 0x8000000000000000
99#define MAXUINT_PTR 0xffffffffffffffff
100
101typedef __int32 HALF_PTR, *PHALF_PTR;
102typedef __int32 UHALF_PTR, *PUHALF_PTR;
103
104#define MAXHALF_PTR 0x7fffffff
105#define MINHALF_PTR 0x80000000
106#define MAXUHALF_PTR 0xffffffff
107
108typedef __int64 LONG_PTR, *PLONG_PTR;
109typedef __uint64 ULONG_PTR, *PULONG_PTR;
110typedef __uint64 DWORD_PTR, *PDWORD_PTR;
111
112#else /* FIXME: defined(_WIN32) */
113
114typedef __int32 INT_PTR, *PINT_PTR;
115typedef __uint32 UINT_PTR, *PUINT_PTR;
116
117#define MAXINT_PTR 0x7fffffff
118#define MININT_PTR 0x80000000
119#define MAXUINT_PTR 0xffffffff
120
121typedef __int16 HALF_PTR, *PHALF_PTR;
122typedef __uint16 UHALF_PTR, *PUHALF_PTR;
123
124#define MAXUHALF_PTR 0xffff
125#define MAXHALF_PTR 0x7fff
126#define MINHALF_PTR 0x8000
127
128typedef __int32 LONG_PTR, *PLONG_PTR;
129typedef __uint32 ULONG_PTR, *PULONG_PTR;
130typedef __uint32 DWORD_PTR, *PDWORD_PTR;
131
132#endif /* defined(_WIN64) || defined(_WIN32) */
133
134typedef INT_PTR SSIZE_T, *PSSIZE_T;
135typedef UINT_PTR SIZE_T, *PSIZE_T;
136
137#ifdef __cplusplus
138} /* extern "C" */
139#endif /* defined(__cplusplus) */
140
141#endif /* !defined(__WINE_BASETSD_H) */
142
143
144