Salome HOME
Win32 compilation.
authorana <ana@opencascade.com>
Thu, 24 Oct 2013 14:21:23 +0000 (14:21 +0000)
committerana <ana@opencascade.com>
Thu, 24 Oct 2013 14:21:23 +0000 (14:21 +0000)
src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx
src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx

index 65e2cf9cc980bee682f314c53ea3b2a5efbedcac..b18489b4080d081db195953b0b54b0e5ce84ff10 100644 (file)
 
 extern "C"
 {
-#ifndef WNT
+#ifndef WIN32
 #include <unistd.h>
 #include <sys/mman.h>
 #endif
@@ -614,7 +614,7 @@ static int findShapeID(SMESH_Mesh&          mesh,
 //   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,
@@ -976,7 +976,7 @@ static int findShapeID(SMESH_Mesh&          mesh,
 //   } // for
 //   cout << std::endl;
 //   
-// #ifdef WNT
+// #ifdef WIN32
 //   UnmapViewOfFile(mapPtr);
 //   CloseHandle(hMapObject);
 //   CloseHandle(fd);
@@ -2887,7 +2887,7 @@ static bool writePoints (ofstream &                       theFile,
 //=======================================================================
 
 static bool readResultFile(const int                       fileOpen,
-#ifdef WNT
+#ifdef WIN32
                            const char*                     fileName,
 #endif
                            GHS3DPlugin_GHS3D*              theAlgo,
@@ -2946,7 +2946,7 @@ static bool readResultFile(const int                       fileOpen,
   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,
@@ -3217,7 +3217,7 @@ static bool readResultFile(const int                       fileOpen,
     (nbShape <= 1) ? tmpStr = " shape" : " shapes";
     cout << tmpStr << endl;
   }
-#ifdef WNT
+#ifdef WIN32
   UnmapViewOfFile(mapPtr);
   CloseHandle(hMapObject);
   CloseHandle(fd);
@@ -3483,7 +3483,7 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh&         theMesh,
     helper.SetElementsOnShape( false );
 
     Ok = readResultFile( fileOpen,
-#ifdef WNT
+#ifdef WIN32
                          aResultFileName.ToCString(),
 #endif
                          this,
@@ -3787,7 +3787,7 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh&         theMesh,
 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() + "\"";
@@ -4124,7 +4124,7 @@ bool GHS3DPlugin_GHS3D::storeErrorDescription(const TCollection_AsciiString& log
   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);
index e462a062616f4208fd7466fa6dfc3935283fda58..2b8378d8c3ecbcd4634e1117d38b753e7d1a2adf 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <TCollection_AsciiString.hxx>
 
-#ifdef WNT
+#ifdef WIN32
 #include <process.h>
 #define getpid _getpid
 #endif
@@ -1558,7 +1558,7 @@ std::string GHS3DPlugin_Hypothesis::CommandToRun(const GHS3DPlugin_Hypothesis* h
     cmd += hyp->myGradation;
   }
 
-#ifdef WNT
+#ifdef WIN32
   cmd += " < NUL";
 #endif