From 513aeab37c961acb458e8bb0bc33b04736a1f7e2 Mon Sep 17 00:00:00 2001 From: maintenance team Date: Thu, 28 Sep 2006 08:35:20 +0000 Subject: [PATCH] CORBA::long as C++ long type collision on 64-bit Linux corrected --- src/SALOMEDS/SALOMEDS_SObject.cxx | 8 +++++++- src/SALOMEDS/SALOMEDS_Study.cxx | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) 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); -- 2.39.2