From b156fa7a49d278e50a4474b57f8a5f8d0154c565 Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Fri, 29 Apr 2005 13:46:32 +0000 Subject: [PATCH] fixed for Windows 64, using Microsoft C provided _WIN64 define --- harbour/include/hbdefs.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index ee488f853c..32877b3501 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -66,6 +66,11 @@ #define HB_LONG_LONG_OFF */ +#if defined( _WIN64 ) +# undef HB_LONG_LONG_OFF +# define HB_STRICT_ALIGNMENT +#endif + #if defined( HB_OS_WIN_32 ) #if !defined( HB_WIN32_IO_OFF ) #define HB_WIN32_IO @@ -226,7 +231,7 @@ * below are some hacks which don't have to be true on some machines * please update it if necessary */ -#if ULONG_MAX > UINT_MAX && UINT_MAX > USHRT_MAX +#if ( ULONG_MAX > UINT_MAX && UINT_MAX > USHRT_MAX ) || defined( _WIN64 ) # define HB_ARCH_64BIT #elif ULONG_MAX == UINT_MAX && UINT_MAX > USHRT_MAX # define HB_ARCH_32BIT @@ -286,7 +291,7 @@ # endif #endif -#if defined( HB_ARCH_64BIT ) +#if defined( HB_ARCH_64BIT ) && !defined( _WIN64 ) # if !defined( UINT64 ) typedef ULONG UINT64; # endif @@ -394,7 +399,11 @@ typedef unsigned long HB_COUNTER; /* type for memory pointer diff */ -typedef long HB_PTRDIFF; +#if defined( _WIN64 ) + typedef LONGLONG HB_PTRDIFF; +#else + typedef long HB_PTRDIFF; +#endif #ifdef HB_LONG_LONG_OFF typedef LONG HB_FOFFSET;