diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-05-04 13:50:20 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-05-04 14:34:05 +0200 |
commit | 10d55afd403c3379ea418c61f2c7e9fb68aad580 (patch) | |
tree | e74a262184d330fb7a967091b04b1e34a34de5dc | |
parent | 14aa07d79a3b5ee7f6b06f5999ad88dc08c64f9b (diff) |
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
-rw-r--r-- | include/sal/types.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sal/types.h b/include/sal/types.h index 32a1c56e8384..bed4979ae32c 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -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 |