]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Merging with BR_WPdev_For_5_0
authorabd <abd@opencascade.com>
Fri, 8 Aug 2008 06:53:16 +0000 (06:53 +0000)
committerabd <abd@opencascade.com>
Fri, 8 Aug 2008 06:53:16 +0000 (06:53 +0000)
src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx
src/NamingService/SALOME_NamingService.hxx
src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx
src/SALOMEDS/SALOMEDS_StudyManager_i.cxx

index efb99797821c09935efee1be38f623ee72ce95ae..34b01260b935b99bdc88b68cbad42f678fcb502e 100644 (file)
 #include <fstream>
 #include <map>
 
+#ifdef WIN32
+# include <process.h>
+#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()
index 57e53ab75b0541d1c2617c330843e588130f3742..35f174766d7f12a4cc999ed40c79beae4ee77fef 100644 (file)
 #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
index 78a3006e5e7f6b7e2e8e46461666d0663de53e08..245338e5649762f7f4b08529fe455eecb51e5ad1 100644 (file)
@@ -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*)"";
index d40b1d772ec3e51f92bf7932b4c0e3e70828c877..e239e15dd890e5a01a992aafe0948770d4e553a6 100644 (file)
@@ -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<CORBA::LongLong>(_impl);
+  return ((CORBA::LongLong)(void*)_impl);
 }
 
 //===========================================================================