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
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
#if 0 // defined(__DARWIN_OSX__)
|
||||
#if 0 // defined(__APPLE__)
|
||||
#include "FileUtils_Mac.cpp" // this is not functional yet -- fix!
|
||||
#else
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ void Registry::initLibraryFilePathList()
|
||||
|
||||
convertStringPathIntoFilePathList("C:/Windows/System/",_libraryFilePath);
|
||||
|
||||
#elif defined(__DARWIN_OSX__)
|
||||
#elif defined(__APPLE__)
|
||||
|
||||
if ((ptr = getenv( "DYLD_LIBRARY_PATH" )) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user