]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Win32 Porting.
authorabd <abd@opencascade.com>
Fri, 3 Oct 2008 10:07:23 +0000 (10:07 +0000)
committerabd <abd@opencascade.com>
Fri, 3 Oct 2008 10:07:23 +0000 (10:07 +0000)
Correction of Export/Import defines for Win32 platform.
Using WIN32 standard define instead WNT define of OpenCascade library.
Using Basics instead Utils library.
Removed "using namespace std" from header files.

src/NamingService/Makefile.am
src/NamingService/NamingService_WaitForServerReadiness.cxx
src/NamingService/SALOME_NamingService.hxx
src/NamingService/SALOME_NamingService_defs.hxx [new file with mode: 0644]
src/NamingService/ServiceUnreachable.hxx

index a371d7e1c3d5dad1671964561ecc82e25a137dbc..3717f437735473b67c68f87e28293a55c3fcfc14 100644 (file)
@@ -32,7 +32,8 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am
 salomeinclude_HEADERS =\
        SALOME_NamingService.hxx \
        ServiceUnreachable.hxx \
-       NamingService_WaitForServerReadiness.hxx
+       NamingService_WaitForServerReadiness.hxx \
+       SALOME_NamingService_defs.hxx
 
 # Scripts to be exported
 dist_salomescript_DATA =\
index d4eb2aa7e1ab228c33119f389551c341462ef499..0cdc78ad5c3d71206e52d60e666d929d83e60c73 100644 (file)
@@ -79,7 +79,7 @@ void NamingService_WaitForServerReadiness(SALOME_NamingService* NS,
                  break; // server found, no more try to do
                }
              MESSAGE("Server "<< serverName <<" not yet ready, waiting...");
-#ifndef WNT
+#ifndef WIN32
               nanosleep(&ts_req,&ts_rem); // wait before retry
 #else
               Sleep(TIMESleep/1000000);
@@ -89,7 +89,7 @@ void NamingService_WaitForServerReadiness(SALOME_NamingService* NS,
       catch( ServiceUnreachable& )
        {
          MESSAGE("CORBA::COMM_FAILURE: Naming Service not yet ready, waiting...");
-#ifndef WNT
+#ifndef WIN32
           nanosleep(&ts_req,&ts_rem); // wait before retry
 #else
           Sleep(TIMESleep/1000000);
index 57e53ab75b0541d1c2617c330843e588130f3742..ce23e360e112d83a22328deef60c8ac3cbe6b614 100644 (file)
 #include "Utils_Mutex.hxx"
 #include "ServiceUnreachable.hxx"
 
-#if defined NAMINGSERVICE_EXPORTS
-#if defined WIN32
-#define NAMINGSERVICE_EXPORT __declspec( dllexport )
-#else
-#define NAMINGSERVICE_EXPORT
-#endif
-#else
-#if defined WNT
-#define NAMINGSERVICE_EXPORT __declspec( dllimport )
-#else
-#define NAMINGSERVICE_EXPORT
-#endif
-#endif
+#include "SALOME_NamingService_defs.hxx"
 
 class NAMINGSERVICE_EXPORT SALOME_NamingService
 {
diff --git a/src/NamingService/SALOME_NamingService_defs.hxx b/src/NamingService/SALOME_NamingService_defs.hxx
new file mode 100644 (file)
index 0000000..7119c3c
--- /dev/null
@@ -0,0 +1,42 @@
+//  SALOME NamingService : wrapping NamingService services
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+//  File   : SALOME_NamingService_defs.hxx
+//  Author : Alexander A. BORODIN
+//  Module : SALOME
+//  $Header$
+
+#ifndef SALOME_NAMINGSERVICE_DEFS_HXX
+#define SALOME_NAMINGSERVICE_DEFS_HXX
+
+#ifdef WIN32
+# ifdef NAMINGSERVICE_EXPORTS
+#  define NAMINGSERVICE_EXPORT __declspec( dllexport )
+# else
+#  define NAMINGSERVICE_EXPORT __declspec( dllimport )
+# endif
+#else
+# define NAMINGSERVICE_EXPORT
+#endif
+
+#endif //SALOME_NAMINGSERVICE_DEFS_HXX
\ No newline at end of file
index 496f376fe94433a02d1039dc62f1ce237b563367..14ffae697543654f1dca2f995db94efacea25879 100644 (file)
 #if !defined ( SERVICEUNREACHABLE_H )
 #define SERVICEUNREACHABLE_H
 
-#if defined NAMINGSERVICE_EXPORTS
-#if defined WNT
-#define NAMINGSERVICE_EXPORT __declspec( dllexport )
-#else
-#define NAMINGSERVICE_EXPORT
-#endif
-#else
-#if defined WNT
-#define NAMINGSERVICE_EXPORT __declspec( dllimport )
-#else
-#define NAMINGSERVICE_EXPORT
-#endif
-#endif
-
+#include "SALOME_NamingService_defs.hxx"
 #include "Utils_SALOME_Exception.hxx"
 
 //! exception class for NamingService : ServiceUnreachable