#include "InterpKernelException.hxx"
#include <cstdlib>
+#ifdef WIN32
+#include<direct.h>
+#define getcwd _getcwd
+#else
#include <unistd.h>
+#endif
#include <sstream>
#include <fstream>
}
if (!good)
{
- resourceFile = get_current_dir_name();
+ resourceFile = getcwd(NULL, 0);
resourceFile += "/../../resources/";
std::ifstream my_file(resourceFile);
if (!my_file.good())
#include <cmath>
#include <numeric>
-#include <unistd.h> // get_current_dir_name()
-
+#ifdef WIN32
+#include<direct.h>
+#define getcwd _getcwd
+#else
+#include <unistd.h>
+#endif
using namespace ParaMEDMEM;
void MEDLoaderTest::testMesh1DRW()
resourceFile += "/share/resources/med/";
}
else {
- resourceFile = get_current_dir_name();
+ resourceFile = getcwd(NULL, 0);
resourceFile += "/../../../resources/";
}
#include "MEDCouplingMemArray.hxx"
#ifdef WIN32
-# include <windows.h>
+#include <windows.h>
+#include <direct.h>
+#define getcwd _getcwd
#else
# include <unistd.h>
#endif
resourceFile += "/share/resources/med/";
}
else {
- resourceFile = get_current_dir_name();
+ resourceFile = getcwd(NULL, 0);
resourceFile += "/../../../resources/";
}
#include <stdexcept>
#include <cstdlib>
#include <vector>
+#ifdef WIN32
+#include<direct.h>
+#define getcwd _getcwd
+#else
#include <unistd.h>
+#endif
#ifdef HAVE_MPI
#include <mpi.h>
}
else
{
- execName = get_current_dir_name();
+ execName = getcwd(NULL, 0);
execName += "/../../MEDPartitioner/medpartitioner";
if (! std::ifstream(execName.c_str()))
CPPUNIT_FAIL("Can't find medpartitioner, please set MEDCOUPLING_ROOT_DIR");