Explicitly specify alignment of 64-bit types.

oldstable
Alexandre Julliard 2004-05-04 00:43:02 +00:00
parent a11b2bbafb
commit 47a88ba221
6 changed files with 37 additions and 10 deletions

View File

@ -48,7 +48,7 @@ cpp_quote("#define MAX_PIN_NAME 128")
cpp_quote("#define MAX_FILTER_NAME 128")
typedef LONGLONG REFERENCE_TIME;
typedef double REFTIME;
typedef DOUBLE REFTIME;
typedef DWORD_PTR HSEMAPHORE;
typedef DWORD_PTR HEVENT;

View File

@ -59,20 +59,31 @@ extern "C" {
# endif
#endif /* !defined(_MSC_VER) */
/* FIXME: DECLSPEC_ALIGN should be declared only in winnt.h, but we need it here too */
#ifndef DECLSPEC_ALIGN
# if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
# define DECLSPEC_ALIGN(x) __declspec(align(x))
# elif defined(__GNUC__)
# define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
# else
# define DECLSPEC_ALIGN(x)
# endif
#endif
typedef signed char INT8, *PINT8;
typedef signed short INT16, *PINT16;
typedef signed int INT32, *PINT32;
typedef signed __int64 INT64, *PINT64;
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 UINT64, *PUINT64;
typedef unsigned __int64 DECLSPEC_ALIGN(8) UINT64, *PUINT64;
typedef signed int LONG32, *PLONG32;
typedef unsigned int ULONG32, *PULONG32;
typedef unsigned int DWORD32, *PDWORD32;
typedef signed __int64 LONG64, *PLONG64;
typedef unsigned __int64 ULONG64, *PULONG64;
typedef unsigned __int64 DWORD64, *PDWORD64;
typedef signed __int64 DECLSPEC_ALIGN(8) LONG64, *PLONG64;
typedef unsigned __int64 DECLSPEC_ALIGN(8) ULONG64, *PULONG64;
typedef unsigned __int64 DECLSPEC_ALIGN(8) DWORD64, *PDWORD64;
/* Win32 or Win64 dependent typedef/defines. */

View File

@ -117,7 +117,7 @@ typedef enum _PinDirection {
#define MAX_FILTER_NAME 128
typedef LONGLONG REFERENCE_TIME;
typedef double REFTIME;
typedef DOUBLE REFTIME;
typedef DWORD_PTR HSEMAPHORE;

View File

@ -319,13 +319,13 @@ typedef unsigned short WCHAR, *PWCHAR;
/* 'Extended/Wide' numerical types */
#ifndef _ULONGLONG_
#define _ULONGLONG_
typedef signed __int64 LONGLONG, *PLONGLONG;
typedef unsigned __int64 ULONGLONG, *PULONGLONG;
typedef signed __int64 DECLSPEC_ALIGN(8) LONGLONG, *PLONGLONG;
typedef unsigned __int64 DECLSPEC_ALIGN(8) ULONGLONG, *PULONGLONG;
#endif
#ifndef _DWORDLONG_
#define _DWORDLONG_
typedef ULONGLONG DWORDLONG, *PDWORDLONG;
typedef ULONGLONG DECLSPEC_ALIGN(8) DWORDLONG, *PDWORDLONG;
#endif
/* ANSI string types */

View File

@ -184,8 +184,12 @@ typedef struct tagMSG {
} MSG, *PMSG, *NPMSG, *LPMSG;
#endif /* winnt.h */
#if 0
typedef double DOUBLE;
#else
typedef double DECLSPEC_ALIGN(8) DOUBLE;
#endif
#ifndef _PALETTEENTRY_DEFINED
#define _PALETTEENTRY_DEFINED
typedef struct tagPALETTEENTRY {
@ -609,8 +613,12 @@ typedef enum tagSTATFLAG {
STATFLAG_NOOPEN = 2
} STATFLAG;
#if 0
typedef double DATE;
#else
typedef double DECLSPEC_ALIGN(8) DATE;
#endif
#if 0
typedef struct tagCY {
LONGLONG int64;

View File

@ -184,7 +184,11 @@ typedef struct tagMSG
cpp_quote("#endif /* winnt.h */")
cpp_quote("#if 0") /* for IDL only */
typedef double DOUBLE;
cpp_quote("#else")
cpp_quote("typedef double DECLSPEC_ALIGN(8) DOUBLE;")
cpp_quote("#endif")
cpp_quote("#ifndef _PALETTEENTRY_DEFINED")
cpp_quote("#define _PALETTEENTRY_DEFINED")
@ -563,7 +567,11 @@ typedef enum tagSTATFLAG {
/******************** OLE Automation ********************/
cpp_quote("#if 0") /* for IDL only */
typedef double DATE;
cpp_quote("#else")
cpp_quote("typedef double DECLSPEC_ALIGN(8) DATE;")
cpp_quote("#endif")
cpp_quote("#if 0") /* for IDL only */
typedef struct tagCY {