]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
ENV: Windows porting
authorenv <env@opencascade.com>
Fri, 29 Jul 2005 04:35:49 +0000 (04:35 +0000)
committerenv <env@opencascade.com>
Fri, 29 Jul 2005 04:35:49 +0000 (04:35 +0000)
src/Registry/RegistryService.cxx
src/Registry/RegistryService.hxx
src/Registry/SALOME_Registry_Server.cxx
src/SALOMELocalTrace/LocalTraceBufferPool.cxx

index 0992377c3c7d92a8f57e41b7dc9830fa769fce17..77c55a7a1a789ab275a80f01743ca058f2b9028f 100644 (file)
@@ -110,8 +110,11 @@ CORBA::ULong RegistryService::add( const Registry::Infos & infos )
        return (CORBA::ULong)_Compteur ;
 }
 
-
+#ifndef WNT
 void RegistryService::remove( const CORBA::ULong id)
+#else
+void RegistryService::remove( CORBA::ULong id)
+#endif
 {
        BEGIN_OF("RegistryService::remove") ;
        SCRUTE(id) ;
@@ -135,8 +138,11 @@ void RegistryService::remove( const CORBA::ULong id)
 }
 
 
-
+#ifndef WNT
 void RegistryService::hello( const CORBA::ULong id )
+#else
+void RegistryService::hello( CORBA::ULong id )
+#endif
 {
        BEGIN_OF("RegistryService::hello") ;
        SCRUTE(id) ;
index 63f7d57e4ddf2a1fa1b092102eb262895d990d33..c07043e5048d49ec1a12ffafe8fb246b805cb1e5 100644 (file)
 
 # include <map>
 
-
-class RegistryService : public POA_Registry::Components  //, public PortableServer::RefCountServantBase
+#if defined REGISTRY_EXPORTS
+#if defined WIN32
+#define REGISTRY_EXPORT __declspec( dllexport )
+#else
+#define REGISTRY_EXPORT
+#endif
+#else
+#if defined WNT
+#define REGISTRY_EXPORT __declspec( dllimport )
+#else
+#define REGISTRY_EXPORT
+#endif
+#endif
+
+class REGISTRY_EXPORT RegistryService : public POA_Registry::Components  //, public PortableServer::RefCountServantBase
 {
 
 public :
@@ -73,8 +86,13 @@ public :
         void ping();
        virtual CORBA::ULong add (const Registry::Infos & infos);
        virtual CORBA::ULong size ( void );
+#ifndef WNT
        virtual void remove( const CORBA::ULong id );
        virtual void hello( const CORBA::ULong id );
+#else
+       virtual void remove( CORBA::ULong id );
+       virtual void hello( CORBA::ULong id );
+#endif
        virtual void end(void);
 
        virtual Registry::AllInfos *getall(void);
index 0756e2b706109bf11f40a985453ba3b6259a4519..c5191de51d2b1105382b123b53fb14a3e5f6815c 100644 (file)
@@ -105,7 +105,11 @@ int main( int argc , char **argv )
   for (int i = 1; i<=NumberOfTries; i++)
     {
       if (i!=1) 
+#ifndef WNT
        a=nanosleep(&ts_req,&ts_rem);
+#else
+    Sleep(TIMESleep/1000000);
+#endif
       try
        { 
          obj = orb->resolve_initial_references("RootPOA");
@@ -130,7 +134,11 @@ int main( int argc , char **argv )
              for(int j=1; j<=NumberOfTries; j++)
                {
                  if (j!=1) 
+#ifndef WNT
                    a=nanosleep(&ts_req, &ts_rem);
+#else
+                       Sleep(TIMESleep/1000000);
+#endif
                  try
                    {
                      object = inc->resolve(name);
index 8a997221a423b19e5e946bf704c8ba89f886fb6c..0f4962c348a6ea5df24ad55ee442484fa8edcaf8 100644 (file)
@@ -37,7 +37,11 @@ using namespace std;
 #define MAXMESS_LENGTH MAX_TRACE_LENGTH-5
 
 LocalTraceBufferPool* LocalTraceBufferPool::_singleton = 0;
+#ifndef WNT
 pthread_mutex_t LocalTraceBufferPool::_singletonMutex;
+#else
+pthread_mutex_t LocalTraceBufferPool::_singletonMutex = PTHREAD_MUTEX_INITIALIZER;
+#endif
 
 // ============================================================================
 /*!