Darwing porting change

This commit is contained in:
Hrvoje Jasak 2010-11-26 11:08:01 +00:00
parent 4bc8cba689
commit f3f7bbbe7c
2 changed files with 6 additions and 2 deletions

View file

@ -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

View file

@ -43,6 +43,10 @@ SourceFiles
extern "C"
{
# include "mgridgen.h"
# ifdef darwin
# undef FALSE
# undef TRUE
# endif
}