[PATCH 2/4] Make DWORD/LONG/ULONG an int to use the same type in Win32 and Win64

Michael Stefaniuc mstefani at redhat.de
Thu Sep 28 18:18:35 CDT 2006

(long is 32 bits in Win64). Use the WINE_NO_LONG_AS_INT define for the
dlls that cannot transition yet to this.
 include/windef.h |   10 +++++-----
 include/winnt.h  |    6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/windef.h b/include/windef.h
index 850c026..c328fb4 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -196,14 +196,14 @@ typedef int             INT,        *PIN
 typedef unsigned int    UINT,       *PUINT;
 typedef float           FLOAT,      *PFLOAT;
 typedef char                        *PSZ;
-#if defined(_WIN64) && !defined(_MSC_VER)
-typedef int                                    *LPLONG;
-typedef unsigned int    DWORD,      *PDWORD,   *LPDWORD;
-typedef unsigned int    ULONG,      *PULONG;
+#if defined(_MSC_VER) || (defined(WINE_NO_LONG_AS_INT) && !defined(_WIN64))
 typedef long                                   *LPLONG;
 typedef unsigned long   DWORD,      *PDWORD,   *LPDWORD;
 typedef unsigned long   ULONG,      *PULONG;
+typedef int                                    *LPLONG;
+typedef unsigned int    DWORD,      *PDWORD,   *LPDWORD;
+typedef unsigned int    ULONG,      *PULONG;
 /* Macros to map Winelib names to the correct implementation name */
diff --git a/include/winnt.h b/include/winnt.h
index 119e0be..c067c5c 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -318,10 +318,10 @@ typedef VOID           *PVOID64;
 typedef BYTE            BOOLEAN,    *PBOOLEAN;
 typedef char            CHAR,       *PCHAR;
 typedef short           SHORT,      *PSHORT;
-#if defined(_WIN64) && !defined(_MSC_VER)
-typedef int             LONG,       *PLONG;
+#if defined(_MSC_VER) || (defined(WINE_NO_LONG_AS_INT) && !defined(_WIN64))
 typedef long            LONG,       *PLONG;
+typedef int             LONG,       *PLONG;
 /* Some systems might have wchar_t, but we really need 16 bit characters */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060929/b230675c/attachment.pgp

More information about the wine-patches mailing list