]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Win32 compilation.
authorrnv <rnv@opencascade.com>
Tue, 17 Apr 2012 12:06:19 +0000 (12:06 +0000)
committerrnv <rnv@opencascade.com>
Tue, 17 Apr 2012 12:06:19 +0000 (12:06 +0000)
src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx
src/MEDPartitioner/Test/MEDPARTITIONERTest.hxx

index a6ce6cc99bdc99c56bbe3de59115dcf34c6e6b11..9a7df8f5c94531acfd83922c2fda1aed794c83f4 100644 (file)
 #include <fstream>
 #include <sstream>
 #include <iostream>
+#ifdef WIN32
+#include <time.h>
+#include <windows.h>
+#endif
+
 
 #include <libxml/tree.h>
 #include <libxml/parser.h>
@@ -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);
 
index 20e6a59ad044d189302bb4d2b4e090d5c99181f4..a27eff324016a73f543b5b56006dba37ad36315f 100644 (file)
 #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 <cppunit/extensions/HelperMacros.h>
 
 #include <set>
@@ -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 );