From: abn Date: Mon, 30 Nov 2015 15:07:27 +0000 (+0100) Subject: APPLE portability (thanks Antoine G.) X-Git-Tag: V8_0_0a1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b2a9b4c2e1e3061ea955975b7ad5a1b0f0d2352a;p=modules%2Fmed.git APPLE portability (thanks Antoine G.) --- diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.cxx b/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.cxx index aaeeabf14..081cab633 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.cxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.cxx @@ -47,7 +47,11 @@ char *INTERP_KERNEL::AsmX86::copyToExecMemZone(const std::vector& 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); diff --git a/src/INTERP_KERNEL/InterpolationUtils.hxx b/src/INTERP_KERNEL/InterpolationUtils.hxx index dd3ffef94..a96072b78 100644 --- a/src/INTERP_KERNEL/InterpolationUtils.hxx +++ b/src/INTERP_KERNEL/InterpolationUtils.hxx @@ -710,7 +710,7 @@ namespace INTERP_KERNEL class AngleLess { public: - bool operator()(std::pairtheta1, std::pair theta2) + bool operator()(std::pairtheta1, std::pair theta2) const { double norm1 = sqrt(theta1.first*theta1.first +theta1.second*theta1.second); double norm2 = sqrt(theta2.first*theta2.first +theta2.second*theta2.second); diff --git a/src/INTERP_KERNEL/PolygonAlgorithms.hxx b/src/INTERP_KERNEL/PolygonAlgorithms.hxx index bbb49362a..5d9f9d818 100644 --- a/src/INTERP_KERNEL/PolygonAlgorithms.hxx +++ b/src/INTERP_KERNEL/PolygonAlgorithms.hxx @@ -30,7 +30,7 @@ namespace INTERP_KERNEL class VertexLess { public: - bool operator()(const double * P_1, const double * P_2) + bool operator()(const double * P_1, const double * P_2) const { for(int idim=0; idim #include #endif @@ -209,7 +210,7 @@ namespace */ struct TCellByIDCompare { - bool operator () (const Cell* i1, const Cell* i2) + bool operator () (const Cell* i1, const Cell* i2) const { return i1->_number < i2->_number; }