summaryrefslogtreecommitdiff
path: root/cppu/source/typelib
diff options
context:
space:
mode:
Diffstat (limited to 'cppu/source/typelib')
-rw-r--r--cppu/source/typelib/static_types.cxx15
-rw-r--r--cppu/source/typelib/typelib.cxx17
2 files changed, 26 insertions, 6 deletions
diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx
index a95264379..185f75761 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
@@ -253,7 +260,7 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass(
::typelib_typedescription_register( &pTD1 );
::typelib_typedescription_release( pTD1 );
}
- // XInterface members
+ // XInterface members
typelib_InterfaceMethodTypeDescription * pMethod = 0;
typelib_Parameter_Init aParameters[1];
OUString sParamName0( RTL_CONSTASCII_USTRINGPARAM("aType") );
@@ -492,7 +499,7 @@ void SAL_CALL typelib_static_mi_interface_type_init(
OUString aTypeName( OUString::createFromAscii( pTypeName ) );
*ppRef = igetTypeByName( aTypeName.pData );
if (!*ppRef)
- {
+ {
typelib_InterfaceTypeDescription * pIface = 0;
::typelib_typedescription_newEmpty(
(typelib_TypeDescription **)&pIface, typelib_TypeClass_INTERFACE, aTypeName.pData );
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 1745dd69b..ae68792cd 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 ));