From: rnv Date: Tue, 17 Apr 2012 12:06:19 +0000 (+0000) Subject: Win32 compilation. X-Git-Tag: TRIPOLI_323~58 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3c42e351d35803283a8f2375567530c6082adb8b;p=tools%2Fmedcoupling.git Win32 compilation. --- diff --git a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx index a6ce6cc99..9a7df8f5c 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx @@ -36,6 +36,11 @@ #include #include #include +#ifdef WIN32 +#include +#include +#endif + #include #include @@ -194,13 +199,22 @@ void MeshCollectionMedXmlDriver::write(const char* filename, ParaDomainSelector* xmlNewProp(node, BAD_CAST "ver", BAD_CAST "1"); //Description tag - time_t present; + time_t present; + char date[6]; +#ifndef WIN32 time( &present); struct tm *time_asc = localtime(&present); - char date[6]; sprintf(date,"%02d%02d%02d",time_asc->tm_year ,time_asc->tm_mon+1 ,time_asc->tm_mday); +#else + SYSTEMTIME st; + GetLocalTime ( &st ); + sprintf(date,"%02d%02d%02d", + st.wYear + ,st.wMonth + ,st.wDay); +#endif node = xmlNewChild(root_node,0, BAD_CAST "description",0); diff --git a/src/MEDPartitioner/Test/MEDPARTITIONERTest.hxx b/src/MEDPartitioner/Test/MEDPARTITIONERTest.hxx index 20e6a59ad..a27eff324 100644 --- a/src/MEDPartitioner/Test/MEDPARTITIONERTest.hxx +++ b/src/MEDPartitioner/Test/MEDPARTITIONERTest.hxx @@ -20,6 +20,17 @@ #ifndef __MEDPARTITIONERTEST_HXX__ #define __MEDPARTITIONERTEST_HXX__ +#ifdef WIN32 +# if defined MEDPARTITIONERTEST_EXPORTS || defined MEDPARTITIONERTest_EXPORTS +# define MEDPARTITIONERTEST_EXPORT __declspec( dllexport ) +# else +# define MEDPARTITIONERTEST_EXPORT __declspec( dllimport ) +# endif +#else +# define MEDPARTITIONERTEST_EXPORT +#endif + + #include #include @@ -30,7 +41,7 @@ #include "MEDCouplingExtrudedMesh.hxx" #include "MEDCouplingFieldDouble.hxx" -class MEDPARTITIONERTest : public CppUnit::TestFixture +class MEDPARTITIONERTEST_EXPORT MEDPARTITIONERTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( MEDPARTITIONERTest ); CPPUNIT_TEST( testMeshCollectionSingle );