From: maintenance team Date: Thu, 28 Sep 2006 08:35:20 +0000 (+0000) Subject: CORBA::long as C++ long type collision on 64-bit Linux corrected X-Git-Tag: V3_2_3pre1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=513aeab37c961acb458e8bb0bc33b04736a1f7e2;p=modules%2Fkernel.git CORBA::long as C++ long type collision on 64-bit Linux corrected --- diff --git a/src/SALOMEDS/SALOMEDS_SObject.cxx b/src/SALOMEDS/SALOMEDS_SObject.cxx index 9affb5f38..1e551766d 100644 --- a/src/SALOMEDS/SALOMEDS_SObject.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject.cxx @@ -62,7 +62,13 @@ SALOMEDS_SObject::SALOMEDS_SObject(SALOMEDS::SObject_ptr theSObject) long pid = (long)getpid(); #endif - long addr = theSObject->GetLocalImpl(GetHostname().c_str(), pid, _isLocal); +#if SIZEOF_LONG == 4 + long addr = +#else + int addr = +#endif + theSObject->GetLocalImpl(GetHostname().c_str(), pid, _isLocal); + if(_isLocal) { _local_impl = ((SALOMEDSImpl_SObject*)(addr)); _corba_impl = SALOMEDS::SObject::_duplicate(theSObject); diff --git a/src/SALOMEDS/SALOMEDS_Study.cxx b/src/SALOMEDS/SALOMEDS_Study.cxx index 210b52833..01a0ca2d1 100644 --- a/src/SALOMEDS/SALOMEDS_Study.cxx +++ b/src/SALOMEDS/SALOMEDS_Study.cxx @@ -83,7 +83,13 @@ SALOMEDS_Study::SALOMEDS_Study(SALOMEDS::Study_ptr theStudy) long pid = (long)getpid(); #endif - long addr = theStudy->GetLocalImpl(GetHostname().c_str(), pid, _isLocal); +#if SIZEOF_LONG == 4 + long addr = +#else + int addr = +#endif + theStudy->GetLocalImpl(GetHostname().c_str(), pid, _isLocal); + if(_isLocal) { _local_impl = ((SALOMEDSImpl_Study*)(addr)); _corba_impl = SALOMEDS::Study::_duplicate(theStudy);