Salome HOME
Improve swig generation process on Windows platform.
[tools/medcoupling.git] / src / INTERP_KERNEL / ExprEval / InterpKernelAsmX86.cxx
index 12e2acb31fc65f46c8fdca42b36cde11e789f8da..6761e210e939ac490d956c67d132f5df57e3199a 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -47,7 +47,11 @@ char *INTERP_KERNEL::AsmX86::copyToExecMemZone(const std::vector<char>& ml, unsi
   char *ret=0;
   int lgth=ml.size();
 #ifdef _POSIX_MAPPED_FILES
+# ifdef __APPLE__
+  ret=(char *)mmap(0,lgth,PROT_EXEC | PROT_WRITE,MAP_ANON | MAP_PRIVATE,-1,0);
+# else
   ret=(char *)mmap(0,lgth,PROT_EXEC | PROT_WRITE,MAP_ANONYMOUS | MAP_PRIVATE,-1,0);
+# endif
 #else
 #ifdef WIN32
   HANDLE h=CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_EXECUTE_READWRITE,0,lgth,NULL);