summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-10-13 13:11:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2010-10-13 20:31:42 +0100
commit5192050cf4be36774ff74824423cf1001566f427 (patch)
tree80236e5ca968918290326ee0a9b5db9655b0af93 /cppu
parent74fc2358e2721b2e275bbd5985af9c36c6baee82 (diff)
AIX cppu quirks
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/typelib/static_types.cxx11
-rw-r--r--cppu/source/typelib/typelib.cxx17
2 files changed, 24 insertions, 4 deletions
diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx
index 605bc5aadbdc..2cb8abf8d5c3 100644
--- a/cppu/source/typelib/static_types.cxx
+++ b/cppu/source/typelib/static_types.cxx
@@ -79,8 +79,15 @@ void SAL_CALL typelib_typedescriptionreference_getByName(
*/
struct AlignSize_Impl
{
- sal_Int16 nInt16;
- double dDouble;
+ sal_Int16 nInt16;
+#ifdef AIX
+ //double: doubleword aligned if -qalign=natural/-malign=natural
+ //which isn't the default ABI. Otherwise word aligned, While a long long int
+ //is always doubleword aligned, so use that instead.
+ sal_Int64 dDouble;
+#else
+ double dDouble;
+#endif
};
#ifdef SAL_W32
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index aa0d18589a89..66407d3912e0 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -69,8 +69,15 @@ using namespace osl;
*/
struct AlignSize_Impl
{
- sal_Int16 nInt16;
- double dDouble;
+ sal_Int16 nInt16;
+#ifdef AIX
+ //double: doubleword aligned if -qalign=natural/-malign=natural
+ //which isn't the default ABI. Otherwise word aligned, While a long long int
+ //is always doubleword aligned, so use that instead.
+ sal_Int64 dDouble;
+#else
+ double dDouble;
+#endif
};
#ifdef SAL_W32
@@ -1941,7 +1948,13 @@ extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
nSize = rMaxIntegralTypeSize = (sal_Int32)(sizeof( float ));
break;
case typelib_TypeClass_DOUBLE:
+#ifdef AIX
+ //See previous AIX ifdef comment for an explanation
+ nSize = (sal_Int32)(sizeof(double));
+ rMaxIntegralTypeSize = (sal_Int32)(sizeof(void*));
+#else
nSize = rMaxIntegralTypeSize = (sal_Int32)(sizeof( double ));
+#endif
break;
case typelib_TypeClass_BYTE:
nSize = rMaxIntegralTypeSize = (sal_Int32)(sizeof( sal_Int8 ));