4 #pragma GCC system_header
9 #define __int64 long long
14 #define __int3264 __int64
15 #define ADDRESS_TAG_BIT 0x40000000000UI64
17 #define __int3264 __int32
18 #define ADDRESS_TAG_BIT 0x80000000UL
19 #define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
20 #define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
21 #define ULongToHandle( h) ((HANDLE)(ULONG_PTR) (h))
22 #define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
23 #define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
24 #define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
25 #define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
26 #define PtrToInt( p ) ((INT)(INT_PTR) (p) )
27 #define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
28 #define PtrToShort( p ) ((short)(LONG_PTR)(p) )
29 #define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
30 #define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
31 #define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
32 #define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
35 #define UlongToPtr(ul) ULongToPtr(ul)
36 #define UintToPtr(ui) UIntToPtr(ui)
37 #define MAXUINT_PTR (~((UINT_PTR)0))
38 #define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
39 #define MININT_PTR (~MAXINT_PTR)
40 #define MAXULONG_PTR (~((ULONG_PTR)0))
41 #define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
42 #define MINLONG_PTR (~MAXLONG_PTR)
43 #define MAXUHALF_PTR ((UHALF_PTR)~0)
44 #define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
45 #define MINHALF_PTR (~MAXHALF_PTR)
51 typedef int LONG32
, *PLONG32
;
53 typedef int INT32
, *PINT32
;
54 #endif /* ndef XFree86Server */
55 typedef unsigned int ULONG32
, *PULONG32
;
56 typedef unsigned int DWORD32
, *PDWORD32
;
57 typedef unsigned int UINT32
, *PUINT32
;
60 typedef __int64 INT_PTR
, *PINT_PTR
;
61 typedef unsigned __int64 UINT_PTR
, *PUINT_PTR
;
62 typedef __int64 LONG_PTR
, *PLONG_PTR
;
63 typedef unsigned __int64 ULONG_PTR
, *PULONG_PTR
;
64 typedef unsigned __int64 HANDLE_PTR
;
65 typedef unsigned int UHALF_PTR
, *PUHALF_PTR
;
66 typedef int HALF_PTR
, *PHALF_PTR
;
68 #if !defined(__midl) && !defined(__WIDL__)
69 static inline unsigned long HandleToUlong(const void* h
)
70 { return((unsigned long)(ULONG_PTR
) h
); }
71 static inline long HandleToLong( const void* h
)
72 { return((long)(LONG_PTR
) h
); }
73 static inline void* ULongToHandle( const long h
)
74 { return((void*) (UINT_PTR
) h
); }
75 static inline void* LongToHandle( const long h
)
76 { return((void*) (INT_PTR
) h
); }
77 static inline unsigned long PtrToUlong( const void* p
)
78 { return((unsigned long)(ULONG_PTR
) p
); }
79 static inline unsigned int PtrToUint( const void* p
)
80 { return((unsigned int)(UINT_PTR
) p
); }
81 static inline unsigned short PtrToUshort( const void* p
)
82 { return((unsigned short)(ULONG_PTR
) p
); }
83 static inline long PtrToLong( const void* p
)
84 { return((long)(LONG_PTR
) p
); }
85 static inline int PtrToInt( const void* p
)
86 { return((int)(INT_PTR
) p
); }
87 static inline short PtrToShort( const void* p
)
88 { return((short)(INT_PTR
) p
); }
89 static inline void* IntToPtr( const int i
)
90 { return( (void*)(INT_PTR
)i
); }
91 static inline void* UIntToPtr(const unsigned int ui
)
92 { return( (void*)(UINT_PTR
)ui
); }
93 static inline void* LongToPtr( const long l
)
94 { return( (void*)(LONG_PTR
)l
); }
95 static inline void* ULongToPtr( const unsigned long ul
)
96 { return( (void*)(ULONG_PTR
)ul
); }
99 typedef int INT_PTR
, *PINT_PTR
;
100 typedef unsigned int UINT_PTR
, *PUINT_PTR
;
102 #ifndef LONG_PTR_DEFINED
103 #define LONG_PTR_DEFINED
104 typedef long LONG_PTR
, *PLONG_PTR
;
105 typedef unsigned long ULONG_PTR
, *PULONG_PTR
;
108 typedef unsigned short UHALF_PTR
, *PUHALF_PTR
;
109 typedef short HALF_PTR
, *PHALF_PTR
;
111 #ifndef HANDLE_PTR_DEFINED
112 #define HANDLE_PTR_DEFINED
113 typedef unsigned long HANDLE_PTR
;
118 typedef ULONG_PTR SIZE_T
, *PSIZE_T
;
119 typedef LONG_PTR SSIZE_T
, *PSSIZE_T
;
120 typedef ULONG_PTR DWORD_PTR
, *PDWORD_PTR
;
121 typedef __int64 LONG64
, *PLONG64
;
122 typedef __int64 INT64
, *PINT64
;
123 typedef unsigned __int64 ULONG64
, *PULONG64
;
124 typedef unsigned __int64 DWORD64
, *PDWORD64
;
125 typedef unsigned __int64 UINT64
, *PUINT64
;
127 typedef signed short INT16
, *PINT16
;
128 typedef unsigned short UINT16
, *PUINT16
;
130 typedef ULONG_PTR KAFFINITY
;
131 typedef KAFFINITY
*PKAFFINITY
;
136 #endif /* !RC_INVOKED */
138 #endif /* _BASETSD_H */