From 3b4923e8d14cb3ec5779e7931661fd4ac0267aba Mon Sep 17 00:00:00 2001 From: abd Date: Fri, 8 Aug 2008 06:53:16 +0000 Subject: [PATCH] Merging with BR_WPdev_For_5_0 --- .../SALOME_ModuleCatalog_impl.cxx | 12 +++++++++++- src/NamingService/SALOME_NamingService.hxx | 18 +++++++----------- src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx | 6 ++++-- src/SALOMEDS/SALOMEDS_StudyManager_i.cxx | 2 +- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx index efb997978..34b01260b 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx @@ -31,6 +31,11 @@ #include #include +#ifdef WIN32 +# include +#endif + + using namespace std; #include "utilities.h" @@ -619,7 +624,12 @@ SALOME_ModuleCatalogImpl::GetComponentInfo(const char *name) CORBA::Long SALOME_ModuleCatalogImpl::getPID() { - return (CORBA::Long)getpid(); + return +#ifndef WIN32 + (CORBA::Long)getpid(); +#else + (CORBA::Long)_getpid(); +#endif } void SALOME_ModuleCatalogImpl::ShutdownWithExit() diff --git a/src/NamingService/SALOME_NamingService.hxx b/src/NamingService/SALOME_NamingService.hxx index 57e53ab75..35f174766 100644 --- a/src/NamingService/SALOME_NamingService.hxx +++ b/src/NamingService/SALOME_NamingService.hxx @@ -39,18 +39,14 @@ #include "Utils_Mutex.hxx" #include "ServiceUnreachable.hxx" -#if defined NAMINGSERVICE_EXPORTS -#if defined WIN32 -#define NAMINGSERVICE_EXPORT __declspec( dllexport ) +#ifdef WIN32 +# ifdef NAMINGSERVICE_EXPORTS +# define NAMINGSERVICE_EXPORT __declspec( dllexport ) +# else +# define NAMINGSERVICE_EXPORT __declspec( dllimport ) +# endif #else -#define NAMINGSERVICE_EXPORT -#endif -#else -#if defined WNT -#define NAMINGSERVICE_EXPORT __declspec( dllimport ) -#else -#define NAMINGSERVICE_EXPORT -#endif +# define NAMINGSERVICE_EXPORT #endif class NAMINGSERVICE_EXPORT SALOME_NamingService diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx index 78a3006e5..245338e56 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx @@ -79,7 +79,8 @@ char* SALOMEDS_GenericAttribute_i::Type() { SALOMEDS::Locker lock; if (_impl) { - return CORBA::string_dup(SALOMEDSImpl_GenericAttribute::Impl_GetType(_impl)); + string type = SALOMEDSImpl_GenericAttribute::Impl_GetType(_impl); + return CORBA::string_dup(type.c_str()); } return (char*)""; @@ -89,7 +90,8 @@ char* SALOMEDS_GenericAttribute_i::GetClassType() { SALOMEDS::Locker lock; if (_impl) { - return CORBA::string_dup(SALOMEDSImpl_GenericAttribute::Impl_GetClassType(_impl)); + string class_type = SALOMEDSImpl_GenericAttribute::Impl_GetClassType(_impl); + return CORBA::string_dup(class_type.c_str()); } return (char*)""; diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx index d40b1d772..e239e15dd 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx @@ -476,7 +476,7 @@ CORBA::LongLong SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, C long pid = (long)getpid(); #endif isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0; - return reinterpret_cast(_impl); + return ((CORBA::LongLong)(void*)_impl); } //=========================================================================== -- 2.39.2