From c6842343501a6cc3782b7d2428947ef8d8b9b413 Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 15 Nov 2011 07:07:18 +0000 Subject: [PATCH] rnv: Prepare SALOME-6.4.0 for Windows. --- src/Basics/Basics_Utils.cxx | 4 +- src/Basics/Basics_Utils.hxx | 20 ++++++- src/KernelHelpers/KernelHelpers.hxx | 39 +++++++++++++ src/KernelHelpers/KernelHelpersUseCases.cxx | 7 ++- src/KernelHelpers/Makefile.am | 3 +- .../SALOMEDS_DriverDefaultImpl.hxx | 56 ++++++++++--------- src/KernelHelpers/SALOME_KernelServices.hxx | 24 ++++---- src/KernelHelpers/SALOME_StudyEditor.hxx | 4 +- .../SALOMEDSImpl_StudyManager.cxx | 14 ++--- 9 files changed, 115 insertions(+), 56 deletions(-) create mode 100755 src/KernelHelpers/KernelHelpers.hxx diff --git a/src/Basics/Basics_Utils.cxx b/src/Basics/Basics_Utils.cxx index eacda61be..8c19e413d 100644 --- a/src/Basics/Basics_Utils.cxx +++ b/src/Basics/Basics_Utils.cxx @@ -21,6 +21,7 @@ // Autor : Alexander A. BORODIN // Module : SALOME // + #include "Basics_Utils.hxx" #include #include @@ -29,10 +30,9 @@ #include #include #include -#else -#include #endif + namespace Kernel_Utils { std::string GetHostname() diff --git a/src/Basics/Basics_Utils.hxx b/src/Basics/Basics_Utils.hxx index 507217dbe..94991fd81 100644 --- a/src/Basics/Basics_Utils.hxx +++ b/src/Basics/Basics_Utils.hxx @@ -26,13 +26,14 @@ #define _Basics_UTILS_HXX_ #include "SALOME_Basics.hxx" - #include #include + #ifndef WIN32 #include #else -#include +#include +#include #endif @@ -68,7 +69,7 @@ namespace Kernel_Utils // Helper macro for time analysis // ============================================================= // - +#ifndef WIN32 #define START_TIMING(name) static long name##tcount=0;static long name##cumul;long name##tt0; timeval name##tv; gettimeofday(&name##tv,0); \ name##tt0=name##tv.tv_usec+name##tv.tv_sec*1000000; \ if(name##tcount==0)std::cerr<<__FILE__<<":"<<__LINE__<<":"<<#name< #include CORBA_CLIENT_HEADER(SALOMEDS) #include CORBA_SERVER_HEADER(SALOME_Component) #include -class SALOME_StudyEditor { +class KERNELHELPERS_EXPORT SALOME_StudyEditor { public: SALOME_StudyEditor(int studyId); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx index 96fb9c896..67f16053a 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx @@ -30,6 +30,11 @@ #include "HDFexplorer.hxx" #include "Basics_Utils.hxx" +//Warning undef of Ascii Winwows define +#ifdef WIN32 +# undef GetUserName +#endif + #include "SALOMEDSImpl_Attributes.hxx" #include "SALOMEDSImpl_Tool.hxx" #include "SALOMEDSImpl_SComponent.hxx" @@ -42,15 +47,6 @@ #include #include -#ifdef WIN32 -#include -#endif - -//Warning undef of Ascii Winwows define -#ifdef WIN32 -# undef GetUserName -#endif - #define USE_CASE_LABEL_ID "0:2" static void SaveAttributes(const SALOMEDSImpl_SObject& SO, HDFgroup *hdf_group_sobject); -- 2.39.2