Rob Shearman : include: Declare the *_PTR types on top of the __int3264 intrinsic IDL types for widl in basetsd .h.

Alexandre Julliard julliard at winehq.org
Mon Nov 9 15:14:20 CST 2009


Module: wine
Branch: master
Commit: 2906af597dd291d8133356ac7407064d469a9b52
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2906af597dd291d8133356ac7407064d469a9b52

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Sat Nov  7 15:55:01 2009 +0100

include: Declare the *_PTR types on top of the __int3264 intrinsic IDL types for widl in basetsd.h.

---

 include/basetsd.h |   38 +++++++++++++++++++++++++++++---------
 1 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/include/basetsd.h b/include/basetsd.h
index 308a65d..6ce0102 100644
--- a/include/basetsd.h
+++ b/include/basetsd.h
@@ -102,15 +102,41 @@ typedef unsigned __int64 DECLSPEC_ALIGN(8) ULONG64, *PULONG64;
 typedef unsigned __int64 DECLSPEC_ALIGN(8) DWORD64, *PDWORD64;
 #endif
 
-/* Win32 or Win64 dependent typedef/defines. */
+/* Basic pointer-sized integer types */
 
-#ifdef _WIN64
+#if defined(__midl) || defined(__WIDL__)
+
+typedef /* [public] */ signed __int3264   INT_PTR, *PINT_PTR;
+typedef /* [public] */ signed __int3264   LONG_PTR, *PLONG_PTR;
+typedef /* [public] */ unsigned __int3264 UINT_PTR, *PUINT_PTR;
+typedef /* [public] */ unsigned __int3264 ULONG_PTR, *PULONG_PTR;
+typedef ULONG_PTR                   DWORD_PTR, *PDWORD_PTR;
+
+#elif defined(_WIN64)
+
+#define __int3264 __int64
 
 typedef signed __int64   INT_PTR, *PINT_PTR;
 typedef signed __int64   LONG_PTR, *PLONG_PTR;
 typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
 typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
-typedef unsigned __int64 DWORD_PTR, *PDWORD_PTR;
+typedef ULONG_PTR        DWORD_PTR, *PDWORD_PTR;
+
+#else
+
+#define __int3264 __int32
+
+typedef long          INT_PTR, *PINT_PTR;
+typedef unsigned long UINT_PTR, *PUINT_PTR;
+typedef long          LONG_PTR, *PLONG_PTR;
+typedef unsigned long ULONG_PTR, *PULONG_PTR;
+typedef ULONG_PTR     DWORD_PTR, *PDWORD_PTR;
+
+#endif
+
+/* Win32 or Win64 dependent typedef/defines. */
+
+#ifdef _WIN64
 
 #define MAXINT_PTR 0x7fffffffffffffff
 #define MININT_PTR 0x8000000000000000
@@ -201,12 +227,6 @@ static inline void *ULongToPtr(ULONG32 ul)
 
 #else /* FIXME: defined(_WIN32) */
 
-typedef long INT_PTR, *PINT_PTR;
-typedef unsigned long UINT_PTR, *PUINT_PTR;
-typedef long LONG_PTR, *PLONG_PTR;
-typedef unsigned long ULONG_PTR, *PULONG_PTR;
-typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
-
 #define MAXINT_PTR 0x7fffffff
 #define MININT_PTR 0x80000000
 #define MAXUINT_PTR 0xffffffff




More information about the wine-cvs mailing list