From Bob Kuehne, change on __DARWIN_OSX__ define to __APPLE__

This commit is contained in:
Robert Osfield
2004-03-08 11:02:05 +00:00
parent 1e4bceb562
commit bd37f999c4
15 changed files with 33 additions and 30 deletions

View File

@@ -283,9 +283,9 @@ const Timer* Timer::instance()
}
#elif defined (__DARWIN_OSX__) || defined (macintosh)
#elif defined (__APPLE__) || defined (macintosh)
#if defined (__DARWIN_OSX__)
#if defined (__APPLE__)
#include <Carbon/Carbon.h> // do I really have to link against the Carbon framework just for this?
#else
#include <MacTypes.h>

View File

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

View File

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

View File

@@ -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" )) )
{

View File

@@ -6,7 +6,7 @@
#include <stdio.h>
#ifdef __DARWIN_OSX__
#ifdef __APPLE__
#include <sys/malloc.h>
#else
#include <malloc.h>
@@ -158,10 +158,9 @@ static std::vector<osg::Material*> palette; // change to dynamic array
static int startmatindex = 0;
osg::Material*ac_palette_get_material(const unsigned int id)
osg::Material*ac_palette_get_material(int id)
{
if (id<palette.size()) return(palette[id]);
else return NULL;
return(palette[id]);
}

View File

@@ -134,7 +134,7 @@
#include <ieeefp.h>
#else
#include <math.h>
#if (defined(WIN32) || defined (__DARWIN_OSX__)) && !defined(__CYGWIN__)
#if (defined(WIN32) || defined (__APPLE__)) && !defined(__CYGWIN__)
#include <float.h>
#else
#include <unistd.h>
@@ -604,7 +604,7 @@ inline int IsNaNorInf( float f )
}
#elif defined(__FreeBSD__) || defined(__linux) || defined(__CYGWIN__)
return isnanf(f) || isinf(f);
#elif defined(__DARWIN_OSX__)
#elif defined(__APPLE__)
return __isnanf(f) || __isinf(f);
#elif defined(__sun)
return isnan(f); // KLUDGE - hack to get this to compile w/g++.

View File

@@ -56,7 +56,7 @@
# pragma warning (disable:4541)
#endif
#ifdef __DARWIN_OSX__
#ifdef __APPLE__
#include <sys/types.h>
#include <sys/malloc.h>
#else

View File

@@ -23,7 +23,7 @@
# pragma warning (disable:4541)
#endif
#ifdef __DARWIN_OSX__
#ifdef __APPLE__
#include <sys/malloc.h>
#else
#include <malloc.h>