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.
#ifndef _SALOME_ModuleCatalog_HXX_
#define _SALOME_ModuleCatalog_HXX_
-#ifdef WNT
- #if defined MODULECATALOG_EXPORTS
- #if defined WIN32
- #define MODULECATALOG_EXPORT __declspec( dllexport )
- #else
- #define MODULECATALOG_EXPORT
- #endif
- #else
- #if defined WIN32
- #define MODULECATALOG_EXPORT __declspec( dllimport )
- #else
- #define MODULECATALOG_EXPORT
- #endif
- #endif
+#ifdef WIN32
+# ifdef MODULECATALOG_EXPORTS
+# define MODULECATALOG_EXPORT __declspec( dllexport )
+# else
+# define MODULECATALOG_EXPORT __declspec( dllimport )
+# endif
#else
#define MODULECATALOG_EXPORT
#endif
_length = S_in.ServiceoutParameter.length();
S_out.ServiceoutParameter.length(_length);
-#ifndef WNT
for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++)
-#else
- for (ind2 = 0; ind2 < _length ; ind2 ++)
-#endif
duplicate(S_out.ServiceoutParameter[ind2],
S_in.ServiceoutParameter[ind2]);
_length = S_in.ServiceinDataStreamParameter.length();
S_out.ServiceinDataStreamParameter.length(_length);
-#ifndef WNT
for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++)
-#else
- for (ind2 = 0; ind2 < _length ; ind2 ++)
-#endif
duplicate(S_out.ServiceinDataStreamParameter[ind2],
S_in.ServiceinDataStreamParameter[ind2]);
if(MYDEBUG) SCRUTE(_length);
S_out.ServiceoutDataStreamParameter.length(_length);
-#ifndef WNT
for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++)
-#else
- for (ind2 = 0; ind2 < _length ; ind2 ++)
-#endif
duplicate(S_out.ServiceoutDataStreamParameter[ind2],
S_in.ServiceoutDataStreamParameter[ind2]);
}
MESSAGE("Get Typed Component list (SUPERV Type)");
list_typed_composants
= Catalogue->GetTypedComponentList(SALOME_ModuleCatalog::SUPERV);
-#ifndef WNT
for (unsigned int ind = 0; ind < list_typed_composants->length();ind++)
-#else
- for (ind = 0; ind < list_typed_composants->length();ind++)
-#endif
MESSAGE("Component SUPERV list : " << list_typed_composants[ind]);
// Get list of couple (component name, component icone)
SALOME_ModuleCatalog::ListOfIAPP_Affich_var list_composants_icone
= Catalogue->GetComponentIconeList();
-#ifndef WNT
for (unsigned int ind = 0; ind < list_composants_icone->length();ind++)
-#else
- for (ind = 0; ind < list_composants_icone->length();ind++)
-#endif
{
MESSAGE("Component name: " << list_composants_icone[ind].modulename);
MESSAGE("Component icone: " << list_composants_icone[ind].moduleicone);
for (int i = 1; i<=NumberOfTries; i++)
{
if (i!=1)
-#ifndef WNT
+#ifndef WIN32
a=nanosleep(&ts_req,&ts_rem);
#else
Sleep(TIMESleep/1000000);
for(int j=1; j<=NumberOfTries; j++)
{
if (j!=1)
-#ifndef WNT
+#ifndef WIN32
a=nanosleep(&ts_req, &ts_rem);
#else
Sleep(TIMESleep/1000000);
#include "SALOME_ModuleCatalog_Acomponent_impl.hxx"
#include <fstream>
#include <map>
+#include "utilities.h"
-using namespace std;
+#ifdef WIN32
+# include <process.h>
+#endif
-#include "utilities.h"
+using namespace std;
#ifdef _DEBUG_
static int MYDEBUG = 0;
list<string> dirList;
-#ifdef WNT
+#ifdef WIN32
dirList = splitStringToList(_general_path, SEPARATOR);
#else
//check for new format
// The components in the general catalog are taken only if they're
// not defined in the personal catalog
-#ifndef WNT
+#ifndef WIN32
for(unsigned int ind=0; ind < _general_module_list.size();ind++){
#else
for(ind=0; ind < _general_module_list.size();ind++){
// The components in the general catalog are taken only if they're
// not defined in the personal catalog
-#ifndef WNT
+#ifndef WIN32
for(unsigned int ind=0; ind < _general_module_list.size();ind++){
#else
for(ind=0; ind < _general_module_list.size();ind++){
// The components in the general catalog are taken only if they're
// not defined in the personal catalog
-#ifndef WNT
+#ifndef WIN32
for (unsigned int ind=0; ind < _general_module_list.size();ind++)
#else
for (ind=0; ind < _general_module_list.size();ind++)
CORBA::Long SALOME_ModuleCatalogImpl::getPID()
{
- return (CORBA::Long)getpid();
+ return
+#ifndef WIN32
+ (CORBA::Long)getpid();
+#else
+ (CORBA::Long)_getpid();
+#endif
}
void SALOME_ModuleCatalogImpl::ShutdownWithExit()
_length = S_parser.outParameters.size();
S_corba.ServiceoutParameter.length(_length);
-#ifndef WNT
+#ifndef WIN32
for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++)
#else
for (ind2 = 0; ind2 < _length ; ind2 ++)
_length = S_parser.inDataStreamParameters.size();
S_corba.ServiceinDataStreamParameter.length(_length);
-#ifndef WNT
+#ifndef WIN32
for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++)
#else
for (ind2 = 0; ind2 < _length ; ind2 ++)
// if(MYDEBUG) SCRUTE(_length);
S_corba.ServiceoutDataStreamParameter.length(_length);
-#ifndef WNT
+#ifndef WIN32
for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++)
#else
for (ind2 = 0; ind2 < _length ; ind2 ++)
}
// Parse if a computer name is twice in the list of computers
-#ifndef WNT
for (unsigned int ind = 0; ind < _machine_list.size(); ind++)
-#else
- for (ind = 0; ind < _machine_list.size(); ind++)
-#endif
{
for (unsigned int ind1 = ind+1 ; ind1 < _machine_list.size(); ind1++)
{
#ifndef _SALOME_NOTIFICATION_SWIG_HXX_
#define _SALOME_NOTIFICATION_SWIG_HXX_
-#ifdef WNT
- #if defined NOTIFICATION_SWIG_EXPORTS
- #if defined WIN32
- #define NOTIFICATION_SWIG_EXPORT __declspec( dllexport )
- #else
- #define NOTIFICATION_SWIG_EXPORT
- #endif
- #else
- #if defined WIN32
- #define NOTIFICATION_SWIG_EXPORT __declspec( dllimport )
- #else
- #define NOTIFICATION_SWIG_EXPORT
- #endif
- #endif
+#ifdef WIN32
+# ifdef NOTIFICATION_SWIG_EXPORTS
+# define NOTIFICATION_SWIG_EXPORT __declspec( dllexport )
+# else
+# define NOTIFICATION_SWIG_EXPORT __declspec( dllimport )
+# endif
#else
- #define NOTIFICATION_SWIG_EXPORT
+# define NOTIFICATION_SWIG_EXPORT
#endif
#endif