#include <fstream>
#include <map>
+#ifdef WIN32
+# include <process.h>
+#endif
+
+
using namespace std;
#include "utilities.h"
CORBA::Long SALOME_ModuleCatalogImpl::getPID()
{
- return (CORBA::Long)getpid();
+ return
+#ifndef WIN32
+ (CORBA::Long)getpid();
+#else
+ (CORBA::Long)_getpid();
+#endif
}
void SALOME_ModuleCatalogImpl::ShutdownWithExit()
#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
{
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*)"";
{
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*)"";
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);
}
//===========================================================================