diff --git a/examples/osgplanets/osgplanets.cpp b/examples/osgplanets/osgplanets.cpp index 91595e784..d389a8f49 100644 --- a/examples/osgplanets/osgplanets.cpp +++ b/examples/osgplanets/osgplanets.cpp @@ -381,8 +381,8 @@ int main( int argc, char **argv ) root->addChild(sunLight); // create the sun - osg::Node* sun = solarSystem.createPlanet( solarSystem._radiusSun, "Sun", osg::Vec4( 1.0f, 1.0f, 1.0f, 1.0f), solarSystem._mapSun ); - osg::StateSet* sunStateSet = sun->getOrCreateStateSet(); + osg::Node* solarSun = solarSystem.createPlanet( solarSystem._radiusSun, "Sun", osg::Vec4( 1.0f, 1.0f, 1.0f, 1.0f), solarSystem._mapSun ); + osg::StateSet* sunStateSet = solarSun->getOrCreateStateSet(); osg::Material* material = new osg::Material; material->setEmission( osg::Material::FRONT_AND_BACK, osg::Vec4( 1.0f, 1.0f, 0.0f, 0.0f ) ); sunStateSet->setAttributeAndModes( material, osg::StateAttribute::ON ); @@ -396,7 +396,7 @@ int main( int argc, char **argv ) sunLight->addChild( sunBillboard ); // stick sun right under root, no transformations for the sun - sunLight->addChild( sun ); + sunLight->addChild( solarSun ); // create light source in the sun diff --git a/src/osgDB/FileUtils.cpp b/src/osgDB/FileUtils.cpp index 7d66206e4..643b62bba 100644 --- a/src/osgDB/FileUtils.cpp +++ b/src/osgDB/FileUtils.cpp @@ -99,7 +99,7 @@ bool osgDB::makeDirectory( const std::string &path ) break; default: - osg::notify(osg::DEBUG_INFO) << "osgDB::makeDirectory(): " << sys_errlist[errno] << std::endl; + osg::notify(osg::DEBUG_INFO) << "osgDB::makeDirectory(): " << strerror(errno) << std::endl; return false; } } @@ -112,7 +112,7 @@ bool osgDB::makeDirectory( const std::string &path ) if( mkdir( dir.c_str(), 0755 )< 0 ) { - osg::notify(osg::DEBUG_INFO) << "osgDB::makeDirectory(): " << sys_errlist[errno] << std::endl; + osg::notify(osg::DEBUG_INFO) << "osgDB::makeDirectory(): " << strerror(errno) << std::endl; return false; } paths.pop(); diff --git a/src/osgPlugins/ac3d/Geode.cpp b/src/osgPlugins/ac3d/Geode.cpp index b1e0fe649..bb2b7816a 100644 --- a/src/osgPlugins/ac3d/Geode.cpp +++ b/src/osgPlugins/ac3d/Geode.cpp @@ -773,7 +773,7 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset) const osg::StateSet::ModeList& ModeList = TextureModeList[0]; assert(ModeList.size() == 1); // Check for a single mode of GL_TEXTURE_2D and ON - std::pair ModeValuePair = *ModeList.begin(); + osg::StateSet::ModeList::value_type ModeValuePair = *ModeList.begin(); assert(ModeValuePair.first == GL_TEXTURE_2D); assert(ModeValuePair.second == osg::StateAttribute::ON); const osg::StateSet::AttributeList& AttributeList = TextureAttributeList[0]; diff --git a/src/osgPlugins/lwo/Surface.cpp b/src/osgPlugins/lwo/Surface.cpp index 7e4cdd088..5e5dcd91c 100644 --- a/src/osgPlugins/lwo/Surface.cpp +++ b/src/osgPlugins/lwo/Surface.cpp @@ -123,7 +123,7 @@ void Surface::compile(const lwo2::FORM::SURF *surf, const Clip_map &clips) osg::notify(osg::WARN) << "Warning: lwosg::Surface: cannot find clip number " << new_block.get_image_map().image_map << std::endl; } } - blocks_.insert(std::make_pair(new_block.get_ordinal(), new_block)); + blocks_.insert(Block_map::value_type(new_block.get_ordinal(), new_block)); } } } diff --git a/src/osgPlugins/lws/SceneLoader.h b/src/osgPlugins/lws/SceneLoader.h index 9fca12055..a812df82f 100644 --- a/src/osgPlugins/lws/SceneLoader.h +++ b/src/osgPlugins/lws/SceneLoader.h @@ -72,17 +72,6 @@ namespace lwosg inline const Animation_list &get_camera_animations() const { return camera_animations_; } inline Animation_list &get_camera_animations() { return camera_animations_; } - protected: - bool parse_block(const std::string &name, const std::string &data); - bool parse_block(const std::string &name, const std::vector &data); - void clear(); - - private: - typedef std::map > Object_map; - Object_map objects_; - - Animation_list camera_animations_; - struct Motion_envelope { struct Key { osg::Vec3 position; @@ -94,6 +83,17 @@ namespace lwosg Key_map keys; }; + protected: + bool parse_block(const std::string &name, const std::string &data); + bool parse_block(const std::string &name, const std::vector &data); + void clear(); + + private: + typedef std::map > Object_map; + Object_map objects_; + + Animation_list camera_animations_; + struct Scene_object { osg::ref_ptr layer_node; int parent; diff --git a/src/osgPlugins/net/sockinet.cpp b/src/osgPlugins/net/sockinet.cpp index 7ad8eae7e..585bce0d4 100644 --- a/src/osgPlugins/net/sockinet.cpp +++ b/src/osgPlugins/net/sockinet.cpp @@ -59,6 +59,10 @@ extern "C" { # define ENOPROTOOPT WSAENOPROTOOPT #endif // !WIN32 +#ifndef INADDR_NONE +#define INADDR_NONE ((in_addr_t) 0xffffffff) +#endif + void herror(const char*); sockinetaddr::sockinetaddr () diff --git a/src/osgPlugins/net/sockstream.cpp b/src/osgPlugins/net/sockstream.cpp index eb229df32..ff3458400 100644 --- a/src/osgPlugins/net/sockstream.cpp +++ b/src/osgPlugins/net/sockstream.cpp @@ -123,6 +123,11 @@ extern "C" { #endif // !WIN32 +#ifdef __sun +#include +#include +#endif + #ifndef BUFSIZ # define BUFSIZ 1024 #endif @@ -135,7 +140,7 @@ extern "C" { const char* sockerr::errstr () const { #if defined(__CYGWIN__) || !defined(WIN32) - return sys_errlist[err]; + return strerror(err); #else return 0; // TODO #endif @@ -195,7 +200,7 @@ bool sockerr::op () const case EHOSTDOWN: case EHOSTUNREACH: case ENOTEMPTY: -# if !defined(__linux__) // LN +# if !defined(__linux__) && !defined(__sun)// LN case EPROCLIM: # endif case EUSERS: @@ -240,7 +245,7 @@ bool sockerr::benign () const case EWOULDBLOCK: // On FreeBSD (and probably on Linux too) // EAGAIN has the same value as EWOULDBLOCK -#if !defined(__CYGWIN__) && !defined( __sgi) && !defined(__linux__) && !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)) // LN +#if !defined(__CYGWIN__) && !defined( __sgi) && !defined(__linux__) && !defined(__sun) && !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)) // LN case EAGAIN: #endif return true; diff --git a/src/osgUtil/TriStripVisitor.cpp b/src/osgUtil/TriStripVisitor.cpp index 6dec8fd90..1c0e7bc0b 100644 --- a/src/osgUtil/TriStripVisitor.cpp +++ b/src/osgUtil/TriStripVisitor.cpp @@ -417,7 +417,7 @@ void TriStripVisitor::stripify(Geometry& geom) { std::swap(pitr->m_Indices[2],pitr->m_Indices[3]); unsigned int minValue = *(std::max_element(pitr->m_Indices.begin(),pitr->m_Indices.end())); - quadMap.insert(std::pair(minValue,pitr)); + quadMap.insert(QuadMap::value_type(minValue,pitr)); } }