diff --git a/examples/osgstereoimage/osgstereoimage.cpp b/examples/osgstereoimage/osgstereoimage.cpp index aac4412ed..90dbb81e9 100644 --- a/examples/osgstereoimage/osgstereoimage.cpp +++ b/examples/osgstereoimage/osgstereoimage.cpp @@ -416,7 +416,7 @@ int main( int argc, char **argv ) } float radius = 1.0f; - float height = 2*radius*tanf(fovy*0.5f); + float height = 2*radius*tan(fovy*0.5f); float length = osg::PI*radius; // half a cylinder. // creat the scene from the file list. diff --git a/examples/osgviewer/GNUmakefile b/examples/osgviewer/GNUmakefile index be945b968..6aefc37e6 100644 --- a/examples/osgviewer/GNUmakefile +++ b/examples/osgviewer/GNUmakefile @@ -12,7 +12,7 @@ INSTFILES = \ EXEC = osgviewer -INC += $(PRODUCER_INCLUDE_DIR) +INC += $(PRODUCER_INCLUDE_DIR) LDFLAGS += $(PRODUCER_LIB_DIR) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/GNUmakefile b/src/osgPlugins/GNUmakefile index 84773a21d..586c2d21a 100644 --- a/src/osgPlugins/GNUmakefile +++ b/src/osgPlugins/GNUmakefile @@ -1,6 +1,6 @@ TOPDIR = ../.. -include $(TOPDIR)/Make/makedirdefs include $(TOPDIR)/Make/makedefs +include $(TOPDIR)/Make/makedirdefs DIRS = $(PLUGIN_DIRS) diff --git a/src/osgPlugins/ac3d/ac3d.cpp b/src/osgPlugins/ac3d/ac3d.cpp index 7720d6e75..1f2f8750b 100644 --- a/src/osgPlugins/ac3d/ac3d.cpp +++ b/src/osgPlugins/ac3d/ac3d.cpp @@ -6,7 +6,11 @@ #include +#ifdef __DARWIN_OSX__ +#include +#else #include +#endif #include #include diff --git a/src/osgPlugins/ac3d/osgac3d.h b/src/osgPlugins/ac3d/osgac3d.h index 428a7fac9..60a441e76 100644 --- a/src/osgPlugins/ac3d/osgac3d.h +++ b/src/osgPlugins/ac3d/osgac3d.h @@ -52,8 +52,12 @@ typedef struct ACObject_t #define Prototype #define Private static #define Boolean int +#ifndef FALSE #define FALSE (0) +#endif +#ifndef TRUE #define TRUE (!FALSE) +#endif #define STRING(s) (char *)(strcpy((char *)myalloc(strlen(s)+1), s)) #define streq(a,b) (!strcmp(a,b)) #define myalloc malloc diff --git a/src/osgPlugins/dx/DXWriter.cpp b/src/osgPlugins/dx/DXWriter.cpp index eeddf764e..712e91bf2 100644 --- a/src/osgPlugins/dx/DXWriter.cpp +++ b/src/osgPlugins/dx/DXWriter.cpp @@ -128,12 +128,13 @@ #include "AreaGeoSetTriangulator.h" #include "StateSetStr.h" + #if defined(__sgi) || defined(__FreeBSD__) #include #include #else #include - #if (defined(WIN32) || defined (macintosh)) && !defined(__CYGWIN__) + #if (defined(WIN32) || defined (__DARWIN_OSX__)) && !defined(__CYGWIN__) #include #else #include @@ -601,8 +602,10 @@ inline int IsNaNorInf( float f ) case FP_PINF : return 1; default : return 0; } -#elif defined(__FreeBSD__) || defined(__linux) || defined(__CYGWIN__) || defined(__DARWIN_OSX__) +#elif defined(__FreeBSD__) || defined(__linux) || defined(__CYGWIN__) return isnanf(f) || isinf(f); +#elif defined(__DARWIN_OSX__) + return __isnanf(f) || __isinf(f); #elif defined(__sun) return isnan(f); // KLUDGE - hack to get this to compile w/g++. #elif defined(WIN32) diff --git a/src/osgPlugins/geo/GNUmakefile b/src/osgPlugins/geo/GNUmakefile index ec7b53e62..1e66c8e06 100644 --- a/src/osgPlugins/geo/GNUmakefile +++ b/src/osgPlugins/geo/GNUmakefile @@ -2,10 +2,12 @@ TOPDIR = ../../.. include $(TOPDIR)/Make/makedefs CXXFILES =\ - geoActions.cpp\ + geoActions.cpp\ ReaderWriterGEO.cpp -LIBS += -losgText -losgSim $(OSG_LIBS) $(OTHER_LIBS) + +##LIBS += -losgText -losgSim $(OSG_LIBS) $(OTHER_LIBS) +LIBS = TARGET_BASENAME = geo include $(TOPDIR)/Make/cygwin_plugin_def diff --git a/src/osgPlugins/geo/ReaderWriterGEO.cpp b/src/osgPlugins/geo/ReaderWriterGEO.cpp index ff3404ae9..47b17076c 100644 --- a/src/osgPlugins/geo/ReaderWriterGEO.cpp +++ b/src/osgPlugins/geo/ReaderWriterGEO.cpp @@ -7,6 +7,8 @@ // 2- animation (see geoActions.cpp). // ver 1.1 GWM Dec 2002 +#include + #include #include #include @@ -702,7 +704,8 @@ class ReaderWriterGEO : public ReaderWriter osg::MatrixTransform *makeText(georecord *gr) { // make transform, geode & text osg::MatrixTransform *numt=NULL; std::string ttfPath("fonts/times.ttf"); - int gFontSize1=2; + // unused + //int gFontSize1=2; osgText::Text *text= new osgText::Text; text->setFont(ttfPath); const geoField *gfd=gr->getField(GEO_DB_TEXT_NAME); @@ -1927,7 +1930,8 @@ void internalVars::update(const osg::FrameStamp *_frameStamp) { void geoField::parseExt(std::ifstream &fin) const { // Feb 2003 parse onme extension fields static int nread=0; // debug only - geoExtensionDefRec *geoExt=(geoExtensionDefRec *)storage; + // unused + //geoExtensionDefRec *geoExt=(geoExtensionDefRec *)storage; for (uint i=0; i + #include #include #include diff --git a/src/osgPlugins/geo/geoFormat.h b/src/osgPlugins/geo/geoFormat.h index 9d74f2b12..4137b5be0 100644 --- a/src/osgPlugins/geo/geoFormat.h +++ b/src/osgPlugins/geo/geoFormat.h @@ -228,10 +228,12 @@ const unsigned char SIZEOF_BITFLAGS = (SIZEOF_INT); -const unsigned short MIN_CHAR_VAL = -128; +// Is this really meant to be unsigned???? +const unsigned short MIN_CHAR_VAL = (unsigned short)(-128); const unsigned short MAX_CHAR_VAL = 127; const unsigned short MAX_UCHAR_VAL = 255; -const unsigned short MIN_SHORT_VAL = -32768; +// Is this really meant to be unsigned???? +const unsigned short MIN_SHORT_VAL = (unsigned short)(-32768); const unsigned short MAX_SHORT_VAL = 32767; const unsigned short MAX_USHORT_VAL = 65535; diff --git a/src/osgPlugins/iv/parser.cpp b/src/osgPlugins/iv/parser.cpp index 7cdee2198..dc029ed82 100644 --- a/src/osgPlugins/iv/parser.cpp +++ b/src/osgPlugins/iv/parser.cpp @@ -56,7 +56,12 @@ # pragma warning (disable:4541) #endif +#ifdef __DARWIN_OSX__ +#include +#include +#else #include +#endif #include "mynode.h" #include #include "geometry.h" diff --git a/src/osgPlugins/iv/parser.y b/src/osgPlugins/iv/parser.y index 579c5a915..df1943f75 100644 --- a/src/osgPlugins/iv/parser.y +++ b/src/osgPlugins/iv/parser.y @@ -23,7 +23,11 @@ # pragma warning (disable:4541) #endif +#ifdef __DARWIN_OSX__ +#include +#else #include +#endif #include "mynode.h" #include #include "geometry.h"