From f3f7bbbe7c1cba42cdbaa91968a54474cbcb213a Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 26 Nov 2010 11:08:01 +0000 Subject: [PATCH] Darwing porting change --- src/OpenFOAM/db/dlLibraryTable/dlLibraryTable.C | 4 ++-- .../MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/dlLibraryTable/dlLibraryTable.C b/src/OpenFOAM/db/dlLibraryTable/dlLibraryTable.C index eb8dd373d..dafff7d2a 100644 --- a/src/OpenFOAM/db/dlLibraryTable/dlLibraryTable.C +++ b/src/OpenFOAM/db/dlLibraryTable/dlLibraryTable.C @@ -68,13 +68,13 @@ bool Foam::dlLibraryTable::open(const fileName& functionLibName) { if (functionLibName.size()) { - void* functionLibPtr = + void* functionLibPtr = dlopen(functionLibName.c_str(), RTLD_LAZY|RTLD_GLOBAL); #ifdef darwin if(!functionLibPtr && functionLibName.ext()=="so") { fileName lName=functionLibName.lessExt()+".dylib"; - functionLibPtr = + functionLibPtr = dlopen(lName.c_str(), RTLD_LAZY|RTLD_GLOBAL); } #endif diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H index 64141b1ca..4f982b9f0 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H @@ -43,6 +43,10 @@ SourceFiles extern "C" { # include "mgridgen.h" +# ifdef darwin +# undef FALSE +# undef TRUE +# endif }