diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 58dab977db..7f7b533707 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-18 10:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * include/hbdefs.h + + HB_SIZE/HB_ISIZ set to 64-bit value on Win64 targets. + This change should finally fix the many casting errors appearing + in Win64 builds of Harbour, plus it enables to use proper 64-bit + sizes for strings and arrays. + ; TODO: Test and fix and places where this may cause a problem. + Delete all now unnecessary casting from size_t to HB_SIZE. + (f.e. '( HB_SIZE ) strlen(') + 2010-06-18 10:50 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbdefs.h + Rearranged types to first define base Harbour types, then diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index 9dccf8f84b..26945c5032 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -232,6 +232,7 @@ #endif /* HB_LONG_LONG_OFF */ +/* Basic types */ #define HB_FALSE 0 #define HB_TRUE (!0) @@ -244,8 +245,15 @@ typedef long HB_LONG; /* WARNING: These types have a ne typedef unsigned long HB_ULONG; /* WARNING: These types have a new size in Harbour 2.1.x and upper. */ typedef int HB_INT; typedef unsigned int HB_UINT; -typedef unsigned long HB_SIZE; /* TODO: Currently 'unsigned long', to be changed to HB_LONGLONG on win64, long on other systems */ -typedef long HB_ISIZ; /* TODO: Change to HB_SIZE, after HB_SIZE has been converted to signed type. TEMPORARY type. */ + +/* Harbour size type */ +#if defined( HB_OS_WIN_64 ) + typedef HB_ULONGLONG HB_SIZE; /* TODO: Currently 'unsigned', to be changed 'signed' */ + typedef HB_LONGLONG HB_ISIZ; /* TODO: Change to HB_SIZE, after HB_SIZE has been converted to signed type. TEMPORARY type. */ +#else + typedef HB_ULONG HB_SIZE; /* TODO: Currently 'unsigned', to be changed 'signed' */ + typedef HB_LONG HB_ISIZ; /* TODO: Change to HB_SIZE, after HB_SIZE has been converted to signed type. TEMPORARY type. */ +#endif /* Convenience */ typedef HB_UCHAR HB_BYTE;