From: Gilles Depeyrot Date: Sun, 22 Jul 2001 14:57:47 +0000 (+0000) Subject: corrections for Mac OS X compilation X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cb71207424c20cc8aa39280e108a9bb12cb379e1?ds=inline corrections for Mac OS X compilation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/opengl/isosurf/isosurf.cpp b/samples/opengl/isosurf/isosurf.cpp index 6ab145c64b..3d3bda3dc9 100644 --- a/samples/opengl/isosurf/isosurf.cpp +++ b/samples/opengl/isosurf/isosurf.cpp @@ -32,8 +32,18 @@ #include "wx/timer.h" #include "wx/glcanvas.h" -#include -#include +#ifdef __WXMAC__ +# ifdef __DARWIN__ +# include +# include +# else +# include +# include +# endif +#else +# include +# include +#endif #include "isosurf.h" @@ -255,7 +265,12 @@ bool MyApp::OnInit(void) #else int gl_attrib[20] = { WX_GL_RGBA, WX_GL_MIN_RED, 1, WX_GL_MIN_GREEN, 1, WX_GL_MIN_BLUE, 1, WX_GL_DEPTH_SIZE, 1, - WX_GL_DOUBLEBUFFER, None }; + WX_GL_DOUBLEBUFFER, +# ifdef __WXMAC__ + GL_NONE }; +# else + None }; +# endif #endif if(!doubleBuffer) diff --git a/samples/opengl/penguin/lw.cpp b/samples/opengl/penguin/lw.cpp index 027cf0eb98..957f18aa08 100644 --- a/samples/opengl/penguin/lw.cpp +++ b/samples/opengl/penguin/lw.cpp @@ -25,8 +25,8 @@ #include #include -#ifndef __WXMAC__ -// does this not give redefine errors on other platforms ? +#if !defined(__WXMAC__) || defined(__DARWIN__) +// these must be defined in the precompiled headers under CodeWarrior #define wxInt32 int #define wxUint32 unsigned int #endif diff --git a/samples/opengl/penguin/lw.h b/samples/opengl/penguin/lw.h index 06d8d520ab..be8c727bb5 100644 --- a/samples/opengl/penguin/lw.h +++ b/samples/opengl/penguin/lw.h @@ -21,9 +21,13 @@ #define LW_H #ifdef __WXMAC__ -#include +# ifdef __DARWIN__ +# include +# else +# include +# endif #else -#include +# include #endif #define LW_MAX_POINTS 200 diff --git a/samples/opengl/penguin/penguin.cpp b/samples/opengl/penguin/penguin.cpp index b3b59e7313..7e2e82a16d 100644 --- a/samples/opengl/penguin/penguin.cpp +++ b/samples/opengl/penguin/penguin.cpp @@ -31,9 +31,13 @@ #include "penguin.h" #ifdef __WXMAC__ -#include +# ifdef __DARWIN__ +# include +# else +# include +# endif #else -#include +# include #endif #define VIEW_ASPECT 1.3