From ee8479596ab150e3948e3bf9436a03979cf55f13 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Fri, 18 Feb 2005 12:56:35 +0000 Subject: [PATCH] Conditionally add DECLSPEC_ALIGN(8) to wine's 64-bit types and leave the modifier off when compiling with msvc. --- include/basetsd.h | 13 +++++++++++-- include/winnt.h | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/include/basetsd.h b/include/basetsd.h index ad8404ac392..bb6f9be0ef4 100644 --- a/include/basetsd.h +++ b/include/basetsd.h @@ -73,17 +73,26 @@ extern "C" { typedef signed char INT8, *PINT8; typedef signed short INT16, *PINT16; typedef signed int INT32, *PINT32; -typedef signed __int64 DECLSPEC_ALIGN(8) INT64, *PINT64; typedef unsigned char UINT8, *PUINT8; typedef unsigned short UINT16, *PUINT16; typedef unsigned int UINT32, *PUINT32; -typedef unsigned __int64 DECLSPEC_ALIGN(8) UINT64, *PUINT64; typedef signed int LONG32, *PLONG32; typedef unsigned int ULONG32, *PULONG32; typedef unsigned int DWORD32, *PDWORD32; + +#ifdef _MSC_VER +typedef signed __int64 INT64, *PINT64; +typedef unsigned __int64 UINT64, *PUINT64; +typedef signed __int64 LONG64, *PLONG64; +typedef unsigned __int64 ULONG64, *PULONG64; +typedef unsigned __int64 DWORD64, *PDWORD64; +#else +typedef signed __int64 DECLSPEC_ALIGN(8) INT64, *PINT64; +typedef unsigned __int64 DECLSPEC_ALIGN(8) UINT64, *PUINT64; typedef signed __int64 DECLSPEC_ALIGN(8) LONG64, *PLONG64; typedef unsigned __int64 DECLSPEC_ALIGN(8) ULONG64, *PULONG64; typedef unsigned __int64 DECLSPEC_ALIGN(8) DWORD64, *PDWORD64; +#endif /* Win32 or Win64 dependent typedef/defines. */ diff --git a/include/winnt.h b/include/winnt.h index 16d13969b24..65d13e33e68 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -310,14 +310,23 @@ typedef unsigned short WCHAR, *PWCHAR; /* 'Extended/Wide' numerical types */ #ifndef _ULONGLONG_ -#define _ULONGLONG_ +# define _ULONGLONG_ +# ifdef _MSC_VER +typedef signed __int64 LONGLONG, *PLONGLONG; +typedef unsigned __int64 ULONGLONG, *PULONGLONG; +# else typedef signed __int64 DECLSPEC_ALIGN(8) LONGLONG, *PLONGLONG; typedef unsigned __int64 DECLSPEC_ALIGN(8) ULONGLONG, *PULONGLONG; +# endif #endif #ifndef _DWORDLONG_ -#define _DWORDLONG_ -typedef ULONGLONG DECLSPEC_ALIGN(8) DWORDLONG, *PDWORDLONG; +# define _DWORDLONG_ +# ifdef _MSC_VER +typedef ULONGLONG DWORDLONG, *PDWORDLONG; +# else +typedef ULONGLONG DECLSPEC_ALIGN(8) DWORDLONG, *PDWORDLONG; +# endif #endif /* ANSI string types */