sal: match the defintions of SAL_MAX_SIZE and sal_Size
With 64-bit MSVC, sizeof(long) is 4 but sizeof(void*) is 8, so this would select sal_uInt64 but SAL_MAX_UINT32. This should make sizeof(sal_Size) the same as sizeof(size_t) on all supported platforms, but still sal_Size maps to different integer type (long vs. int) than size_t on 32-bit. Change-Id: I638aac6b502e624ed6b01f5921e20bc40f42480c
This commit is contained in:
@@ -227,10 +227,10 @@ typedef void * sal_Handle;
|
||||
#define SAL_MAX_INT64 ((sal_Int64) SAL_CONST_INT64(0x7FFFFFFFFFFFFFFF))
|
||||
#define SAL_MAX_UINT64 ((sal_uInt64) SAL_CONST_UINT64(0xFFFFFFFFFFFFFFFF))
|
||||
|
||||
#if SAL_TYPES_SIZEOFLONG == 4
|
||||
#if SAL_TYPES_SIZEOFPOINTER == 4
|
||||
#define SAL_MAX_SSIZE SAL_MAX_INT32
|
||||
#define SAL_MAX_SIZE SAL_MAX_UINT32
|
||||
#elif SAL_TYPES_SIZEOFLONG == 8
|
||||
#elif SAL_TYPES_SIZEOFPOINTER == 8
|
||||
#define SAL_MAX_SSIZE SAL_MAX_INT64
|
||||
#define SAL_MAX_SIZE SAL_MAX_UINT64
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user