diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2002-10-23 09:40:57 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2002-10-23 09:40:57 +0000 |
commit | 8d5c215bb53788210abdccba65ec81ebde7613d5 (patch) | |
tree | c2e7d77c05f2094967dea37e49b8824d4ee33fec /cppu | |
parent | #104367# (diff) | |
download | core-8d5c215bb53788210abdccba65ec81ebde7613d5.tar.gz core-8d5c215bb53788210abdccba65ec81ebde7613d5.zip |
#104367# some fixes for 64 bit
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/inc/cppu/macros.hxx | 8 | ||||
-rw-r--r-- | cppu/source/uno/data.cxx | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/cppu/inc/cppu/macros.hxx b/cppu/inc/cppu/macros.hxx index 994310e7d4db..a98afa274b55 100644 --- a/cppu/inc/cppu/macros.hxx +++ b/cppu/inc/cppu/macros.hxx @@ -2,9 +2,9 @@ * * $RCSfile: macros.hxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: mh $ $Date: 2002-10-02 13:17:56 $ + * last change: $Author: dbo $ $Date: 2002-10-23 10:40:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,12 +71,12 @@ /** Namespace name for compiler/ platform, e.g. gcc3, msci */ #define CPPU_CURRENT_NAMESPACE CPPU_ENV -/** Patching the gcc 3 incomatible alignment change for linux intel. +/** Patching the gcc 3 incomatible alignment change for linux. This pragma macro is appended by the cppumaker tool to every first member of a struct, iff the struct inherits from a base struct the first member is no double or [unsigned] long long. @internal */ -#if defined(__GNUC__) && defined(LINUX) && (defined(INTEL) || defined(POWERPC)) && (__GNUC__ == 3) +#if defined(__GNUC__) && defined(LINUX) && (defined(INTEL) || defined(POWERPC) || defined(X86_64)) && (__GNUC__ == 3) #define CPPU_GCC3_ALIGN( base_struct ) __attribute__ ((aligned (__alignof__ (base_struct)))) #else #define CPPU_GCC3_ALIGN( base_struct ) diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx index 179d08d5cd91..5a09876edb13 100644 --- a/cppu/source/uno/data.cxx +++ b/cppu/source/uno/data.cxx @@ -2,9 +2,9 @@ * * $RCSfile: data.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: mh $ $Date: 2002-10-02 13:15:50 $ + * last change: $Author: dbo $ $Date: 2002-10-23 10:40:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -364,8 +364,8 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData( #define BINTEST_VERIFYOFFSET( s, m, n ) \ if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %d instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); } -#ifdef DEBUG -#if defined(__GNUC__) && defined(LINUX) && (defined(INTEL) || defined(POWERPC)) +#ifdef CPPU_ASSERTIONS +#if defined(__GNUC__) && defined(LINUX) && (defined(INTEL) || defined(POWERPC) || defined(X86_64)) #define BINTEST_VERIFYSIZE( s, n ) \ fprintf( stderr, "> sizeof(" #s ") = %d; __alignof__ (" #s ") = %d\n", sizeof(s), __alignof__ (s) ); \ if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); } @@ -374,7 +374,7 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData( fprintf( stderr, "> sizeof(" #s ") = %d\n", sizeof(s) ); \ if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); } #endif -#else // ! DEBUG +#else // ! CPPU_ASSERTIONS #define BINTEST_VERIFYSIZE( s, n ) \ if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); } #endif @@ -510,8 +510,8 @@ BinaryCompatible_Impl::BinaryCompatible_Impl() BINTEST_VERIFY( sizeof( Any ) == sizeof( uno_Any ) ); BINTEST_VERIFY( sizeof( Any ) == sizeof( void * ) * 3 ); BINTEST_VERIFYOFFSET( Any, pType, 0 ); - BINTEST_VERIFYOFFSET( Any, pData, 4 ); - BINTEST_VERIFYOFFSET( Any, pReserved, 8 ); + BINTEST_VERIFYOFFSET( Any, pData, 1 * sizeof (void *) ); + BINTEST_VERIFYOFFSET( Any, pReserved, 2 * sizeof (void *) ); // interface BINTEST_VERIFY( sizeof( Reference< XInterface > ) == sizeof( XInterface * ) ); // string |