From Bob Kuehne, change on __DARWIN_OSX__ define to __APPLE__
This commit is contained in:
@@ -386,15 +386,19 @@ endif
|
||||
|
||||
#### MacOS X specific definitions
|
||||
ifeq ($(OS),Darwin)
|
||||
C++ = c++
|
||||
ifeq (x$(CXX),x)
|
||||
C++ = g++
|
||||
else
|
||||
C++ = $(CXX)
|
||||
endif
|
||||
INC += -I/usr/X11R6/include
|
||||
LDFLAGS += -L/usr/X11R6/lib -L/sw/lib
|
||||
DEF += -Wall -D__DARWIN_OSX__
|
||||
DEF += -Wall
|
||||
OPTF = -O2
|
||||
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
||||
DEPARG = -M $(DEF)
|
||||
SHARED = -dynamic
|
||||
ARCH =
|
||||
ARCH = 32
|
||||
ARCHINST =
|
||||
ARCHARGS =
|
||||
LINKARGS =
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#elif defined(__sun)
|
||||
#include <unistd.h>
|
||||
#include <sys/sockio.h>
|
||||
#elif defined (__DARWIN_OSX__)
|
||||
#elif defined (__APPLE__)
|
||||
#include <unistd.h>
|
||||
#include <sys/sockio.h>
|
||||
#elif defined (WIN32)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
// non windows, doesn't require nonsense as seen below :-)
|
||||
#ifndef __gl_h_
|
||||
#ifdef __DARWIN_OSX__
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
#elif defined(__DARWIN_OSX__)
|
||||
#elif defined(__APPLE__)
|
||||
#include <mach-o/dyld.h>
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
@@ -50,7 +50,7 @@ inline void* getGLExtensionFuncPtr(const char *funcName)
|
||||
|
||||
return (void*)wglGetProcAddress(funcName);
|
||||
|
||||
#elif defined(__DARWIN_OSX__)
|
||||
#elif defined(__APPLE__)
|
||||
|
||||
std::string temp( "_" );
|
||||
temp += funcName; // Mac OS X prepends an underscore on function names
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef OSG_GLU
|
||||
#define OSG_GLU 1
|
||||
|
||||
#ifdef __DARWIN_OSX__
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/glu.h>
|
||||
#else
|
||||
#include <GL/glu.h>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// for OSX users :
|
||||
// comment in if you want backwards compatibility with 10.1.x versions
|
||||
// otherwise you'll have problems with missing floorf and __isnan*()
|
||||
// #define DARWIN_OSX_PRE_10_2
|
||||
// #define APPLE_PRE_10_2
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||
#include <float.h>
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#if (defined(WIN32) && !(defined(_MSC_VER) && (_MSC_VER >= 1300)) && !defined(__MINGW32__) ) || \
|
||||
defined (sun) || \
|
||||
defined (__DARWIN_OSX__)
|
||||
defined (__APPLE__)
|
||||
|
||||
|
||||
#include <float.h>
|
||||
@@ -88,7 +88,7 @@
|
||||
#if (defined(WIN32) && !(defined(_MSC_VER) && (_MSC_VER >= 1300)) && !defined(__MINGW32__) ) || \
|
||||
defined (sun) || \
|
||||
defined (__hpux__) || \
|
||||
defined (DARWIN_OSX_PRE_10_2)
|
||||
defined (APPLE_PRE_10_2)
|
||||
|
||||
#ifndef floorf
|
||||
#define floorf (float)floor
|
||||
@@ -163,7 +163,7 @@ inline double RadiansToDegrees(double angle) { return angle*180.0/PI; }
|
||||
inline bool isNaN(float v) { return _isnan(v)!=0; }
|
||||
inline bool isNaN(double v) { return _isnan(v)!=0; }
|
||||
#else
|
||||
# if defined(__DARWIN_OSX__) && !defined (DARWIN_OSX_PRE_10_2)
|
||||
# if defined(__APPLE__) && !defined (APPLE_PRE_10_2)
|
||||
inline bool isNaN(float v) { return __isnanf(v); }
|
||||
inline bool isNaN(double v) { return __isnand(v); }
|
||||
#else
|
||||
|
||||
@@ -57,7 +57,7 @@ class SG_EXPORT Timer {
|
||||
static const Timer* instance();
|
||||
|
||||
|
||||
#if defined __DARWIN_OSX__ || defined macintosh
|
||||
#if defined __APPLE__ || defined macintosh
|
||||
// PJA MAC OSX - inline Tick() pollutes namespace so badly
|
||||
// we cant compile, due to Carbon.h ...
|
||||
Timer_t tick() const;
|
||||
@@ -219,7 +219,7 @@ class SG_EXPORT Timer {
|
||||
}
|
||||
}
|
||||
|
||||
#elif !defined (__DARWIN_OSX__) && !defined (macintosh)
|
||||
#elif !defined (__APPLE__) && !defined (macintosh)
|
||||
|
||||
// no choice, always use std::clock()
|
||||
namespace osg{
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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" )) )
|
||||
{
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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++.
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
# pragma warning (disable:4541)
|
||||
#endif
|
||||
|
||||
#ifdef __DARWIN_OSX__
|
||||
#ifdef __APPLE__
|
||||
#include <sys/types.h>
|
||||
#include <sys/malloc.h>
|
||||
#else
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
# pragma warning (disable:4541)
|
||||
#endif
|
||||
|
||||
#ifdef __DARWIN_OSX__
|
||||
#ifdef __APPLE__
|
||||
#include <sys/malloc.h>
|
||||
#else
|
||||
#include <malloc.h>
|
||||
|
||||
Reference in New Issue
Block a user