extern "C"
{
-#ifndef WNT
+#ifndef WIN32
#include <unistd.h>
#include <sys/mman.h>
#endif
// length = status.st_size;
//
// // Mapping the result file into memory
-// #ifdef WNT
+// #ifdef WIN32
// HANDLE fd = CreateFile(theFileName, GENERIC_READ, FILE_SHARE_READ,
// NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
// HANDLE hMapObject = CreateFileMapping(fd, NULL, PAGE_READONLY,
// } // for
// cout << std::endl;
//
-// #ifdef WNT
+// #ifdef WIN32
// UnmapViewOfFile(mapPtr);
// CloseHandle(hMapObject);
// CloseHandle(fd);
//=======================================================================
static bool readResultFile(const int fileOpen,
-#ifdef WNT
+#ifdef WIN32
const char* fileName,
#endif
GHS3DPlugin_GHS3D* theAlgo,
length = status.st_size;
// Mapping the result file into memory
-#ifdef WNT
+#ifdef WIN32
HANDLE fd = CreateFile(fileName, GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
HANDLE hMapObject = CreateFileMapping(fd, NULL, PAGE_READONLY,
(nbShape <= 1) ? tmpStr = " shape" : " shapes";
cout << tmpStr << endl;
}
-#ifdef WNT
+#ifdef WIN32
UnmapViewOfFile(mapPtr);
CloseHandle(hMapObject);
CloseHandle(fd);
helper.SetElementsOnShape( false );
Ok = readResultFile( fileOpen,
-#ifdef WNT
+#ifdef WIN32
aResultFileName.ToCString(),
#endif
this,
void GHS3DPlugin_GHS3D::CancelCompute()
{
_compute_canceled = true;
-#ifdef WNT
+#ifdef WIN32
#else
std::string cmd = "ps xo pid,args | grep " + _genericName;
//cmd += " | grep -e \"^ *[0-9]\\+ \\+" + GHS3DPlugin_Hypothesis::GetExeName() + "\"";
if(_compute_canceled)
return error(SMESH_Comment("interruption initiated by user"));
// open file
-#ifdef WNT
+#ifdef WIN32
int file = ::_open (logFile.ToCString(), _O_RDONLY|_O_BINARY);
#else
int file = ::open (logFile.ToCString(), O_RDONLY);