[Libreoffice-commits] core.git: include/sal
Michael Stahl
mstahl at redhat.com
Mon May 4 05:40:41 PDT 2015
include/sal/types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 10d55afd403c3379ea418c61f2c7e9fb68aad580
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon May 4 13:50:20 2015 +0200
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
diff --git a/include/sal/types.h b/include/sal/types.h
index 32a1c56..bed4979 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
More information about the Libreoffice-commits
mailing list