From Bob Kuehne, change on __DARWIN_OSX__ define to __APPLE__
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include <Io.h>
|
||||
#include <Windows.h>
|
||||
#include <Winbase.h>
|
||||
#elif defined(__DARWIN_OSX__)
|
||||
#elif defined(__APPLE__)
|
||||
#include <mach-o/dyld.h>
|
||||
#else // all other unix
|
||||
#include <unistd.h>
|
||||
@@ -51,7 +51,7 @@ DynamicLibrary::~DynamicLibrary()
|
||||
osg::notify(osg::INFO)<<"Closing DynamicLibrary "<<_name<<std::endl;
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
FreeLibrary((HMODULE)_handle);
|
||||
#elif defined(__DARWIN_OSX__)
|
||||
#elif defined(__APPLE__)
|
||||
NSUnLinkModule(_handle, FALSE);
|
||||
#elif defined(__hpux__)
|
||||
// fortunately, shl_t is a pointer
|
||||
@@ -85,7 +85,7 @@ DynamicLibrary::HANDLE DynamicLibrary::getLibraryHandle( const std::string& libr
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
handle = LoadLibrary( libraryName.c_str() );
|
||||
#elif defined(__DARWIN_OSX__)
|
||||
#elif defined(__APPLE__)
|
||||
NSObjectFileImage image;
|
||||
// NSModule os_handle = NULL;
|
||||
if (NSCreateObjectFileImageFromFile(libraryName.c_str(), &image) == NSObjectFileImageSuccess) {
|
||||
@@ -119,7 +119,7 @@ DynamicLibrary::PROC_ADDRESS DynamicLibrary::getProcAddress(const std::string& p
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
return (DynamicLibrary::PROC_ADDRESS)GetProcAddress( (HMODULE)_handle,
|
||||
procName.c_str() );
|
||||
#elif defined(__DARWIN_OSX__)
|
||||
#elif defined(__APPLE__)
|
||||
std::string temp("_");
|
||||
NSSymbol symbol;
|
||||
temp += procName; // Mac OS X prepends an underscore on function names
|
||||
|
||||
Reference in New Issue
Block a user