Define data types to the correct size on 64-bit platforms.

oldstable
Alexandre Julliard 2005-09-22 10:58:04 +00:00
parent 470f23d471
commit bdf01c368d
3 changed files with 25 additions and 3 deletions

View File

@ -38,6 +38,10 @@ extern "C" {
* type model where int and long are 32 bit and pointer is 64-bit.
*/
#ifdef __x86_64__
#define _WIN64
#endif
/* Type model independent typedefs */
/* The __intXX types are native types defined by the MS C compiler.
* Apps that make use of them before they get defined here, can
@ -55,7 +59,11 @@ extern "C" {
# define __int32 int
# endif
# ifndef __int64
# define __int64 long long
# ifdef _WIN64
# define __int64 long
# else
# define __int64 long long
# endif
# endif
#endif /* !defined(_MSC_VER) */

View File

@ -41,6 +41,10 @@ extern "C" {
# define _X86_
#endif
#ifdef __x86_64__
#define _WIN64
#endif
#ifndef __stdcall
# ifdef __i386__
# ifdef __GNUC__
@ -174,11 +178,17 @@ typedef unsigned short WORD, *PWORD, *LPWORD;
typedef unsigned short USHORT, *PUSHORT;
typedef int INT, *PINT, *LPINT;
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;
#else
typedef long *LPLONG;
typedef unsigned long DWORD, *PDWORD, *LPDWORD;
typedef unsigned long ULONG, *PULONG;
typedef float FLOAT, *PFLOAT;
typedef char *PSZ;
#endif
/* Macros to map Winelib names to the correct implementation name */
/* Note that Winelib is purely Win32. */

View File

@ -300,7 +300,11 @@ 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;
#else
typedef long LONG, *PLONG;
#endif
/* Some systems might have wchar_t, but we really need 16 bit characters */
#ifdef WINE_UNICODE_NATIVE