From 463b47f0208b621ac91d974005c99f1bfc94a005 Mon Sep 17 00:00:00 2001 From: Don BURNS Date: Mon, 29 Nov 2004 03:05:27 +0000 Subject: [PATCH] Fixes for SOlaris build --- Make/makedefs | 5 +++-- include/osgDB/DatabasePager | 14 ++++++-------- include/osgDB/Registry | 2 ++ src/osgPlugins/jpeg/GNUmakefile | 2 -- src/osgPlugins/osga/OSGA_Archive.h | 23 +++++++++++++---------- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/Make/makedefs b/Make/makedefs index e65b4a0fb..2e804fd6e 100644 --- a/Make/makedefs +++ b/Make/makedefs @@ -156,8 +156,6 @@ ifeq ($(OS),SunOS) ifeq ($(COMPILER),gnu) C++ = g++ DEPARG = -M - INC += - DEF += -W -Wall -fPIC -fpermissive OPTF = -O2 DBGF = -g -DOSG_COMPILE_UNIT_TESTS SHARED = -shared -fPIC @@ -195,6 +193,7 @@ ifeq ($(OS),SunOS) LINKARGS = GIF_LIBS = /usr/local/lib/libgif.a TIFF_LIB = /usr/local/lib/libtiff.a + JPEG_INCLUDE = -I/usr/local/include JPEG_LIBS = /usr/local/lib/libjpeg.a PNG_LIBS = /usr/local/lib/libpng.a /usr/local/lib/libz.a endif @@ -218,6 +217,7 @@ ifeq ($(OS),SunOS) GDAL_LIBS = `gdal-config --libs` + endif #### IRIX Specific definitions @@ -228,6 +228,7 @@ ifeq ($(OS),IRIX) C++ = CC DEPARG = -M INC += -I${TOPDIR}/include -I/usr/freeware/include + LDFLAGS += -L/usr/local/lib DEF += -LANG:std -OPT:Olimit=0 \ -DEBUG:woff=1681 -DEBUG:woff=1682 -DEBUG:woff=3303\ -MDupdate $(MAKEDEPEND) diff --git a/include/osgDB/DatabasePager b/include/osgDB/DatabasePager index 12bb5546e..fbef2e9cc 100644 --- a/include/osgDB/DatabasePager +++ b/include/osgDB/DatabasePager @@ -212,19 +212,17 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl * Note, must only be called from a valid graphics context. */ virtual void compileGLObjects(osg::State& state,double& availableTime); + typedef std::list< osg::ref_ptr > PagedLODList; + typedef std::set< osg::ref_ptr > StateSetList; + typedef std::vector< osg::ref_ptr > DrawableList; + typedef std::pair DataToCompile; + typedef std::map< unsigned int, DataToCompile > DataToCompileMap; + typedef std::set ActiveGraphicsContexts; protected: virtual ~DatabasePager(); - typedef std::list< osg::ref_ptr > PagedLODList; - - typedef std::set< osg::ref_ptr > StateSetList; - typedef std::vector< osg::ref_ptr > DrawableList; - typedef std::pair DataToCompile; - typedef std::map< unsigned int, DataToCompile > DataToCompileMap; - - typedef std::set ActiveGraphicsContexts; friend struct DatabaseRequest; diff --git a/include/osgDB/Registry b/include/osgDB/Registry index b6fe1fa6b..4ab78be97 100644 --- a/include/osgDB/Registry +++ b/include/osgDB/Registry @@ -397,6 +397,7 @@ class OSGDB_EXPORT Registry : public osg::Referenced void eraseWrapper(DotOsgWrapperMap& wrappermap,DotOsgWrapper* wrapper); + public: /** Functor used in internal implementations.*/ struct ReadFunctor { @@ -413,6 +414,7 @@ class OSGDB_EXPORT Registry : public osg::Referenced const ReaderWriter::Options* _options; }; + protected: // forward declare helper classes struct ReadObjectFunctor; struct ReadImageFunctor; diff --git a/src/osgPlugins/jpeg/GNUmakefile b/src/osgPlugins/jpeg/GNUmakefile index b0a0a5557..75bd12022 100644 --- a/src/osgPlugins/jpeg/GNUmakefile +++ b/src/osgPlugins/jpeg/GNUmakefile @@ -4,9 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ ReaderWriterJPEG.cpp\ -ifeq ($(OS),HP-UX) INC += $(JPEG_INCLUDE) -endif LIBS += $(OSG_LIBS) $(JPEG_LIBS) $(OTHER_LIBS) diff --git a/src/osgPlugins/osga/OSGA_Archive.h b/src/osgPlugins/osga/OSGA_Archive.h index 778d3d345..e6f5df03a 100644 --- a/src/osgPlugins/osga/OSGA_Archive.h +++ b/src/osgPlugins/osga/OSGA_Archive.h @@ -80,11 +80,6 @@ class OSGA_Archive : public osgDB::Archive /** Write an osg::Node with specified file name to the Archive.*/ virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* options=NULL) const; - - protected: - - mutable osgDB::ReentrantMutex _serializerMutex; - #if defined(_MSC_VER) typedef __int64 pos_type; typedef __int64 size_type; @@ -95,6 +90,11 @@ class OSGA_Archive : public osgDB::Archive typedef std::pair PositionSizePair; typedef std::map FileNamePositionMap; + + protected: + + mutable osgDB::ReentrantMutex _serializerMutex; + friend class IndexBlock; @@ -148,6 +148,7 @@ class OSGA_Archive : public osgDB::Archive char* _data; }; + public: /** Functor used in internal implementations.*/ struct ReadFunctor { @@ -161,11 +162,6 @@ class OSGA_Archive : public osgDB::Archive std::string _filename; const osgDB::ReaderWriter::Options* _options; }; - - struct ReadObjectFunctor; - struct ReadImageFunctor; - struct ReadHeightFieldFunctor; - struct ReadNodeFunctor; /** Functor used in internal implementations.*/ struct WriteFunctor @@ -180,6 +176,13 @@ class OSGA_Archive : public osgDB::Archive std::string _filename; const osgDB::ReaderWriter::Options* _options; }; + + protected: + struct ReadObjectFunctor; + struct ReadImageFunctor; + struct ReadHeightFieldFunctor; + struct ReadNodeFunctor; + struct WriteObjectFunctor; struct WriteImageFunctor;