Fixes for IRIX build

This commit is contained in:
Don BURNS 2004-11-29 01:12:25 +00:00
parent 860bc59f8e
commit c7e8386707
10 changed files with 29 additions and 18 deletions

View File

@ -93,7 +93,7 @@ public:
}; };
EffectPanel() EffectPanel()
: Frame(), : osgfxbrowser::Frame(),
selected_fx_(-1), selected_fx_(-1),
fxen_(true), fxen_(true),
root_(new osg::Group), root_(new osg::Group),

View File

@ -1,5 +1,5 @@
#include <cstdio> //#include <cstdio>
#include <cstdlib> //#include <cstdlib>
#include <iostream> #include <iostream>
#include <list> #include <list>
#include <string> #include <string>

View File

@ -27,7 +27,7 @@ class OSGDB_EXPORT ImageOptions : public osgDB::ReaderWriter::Options
ImageOptions(const std::string& str); ImageOptions(const std::string& str);
ImageOptions(const ImageOptions& options,const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY): ImageOptions(const ImageOptions& options,const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY):
Options(options,copyop), osgDB::ReaderWriter::Options(options,copyop),
_sourceImageSamplingMode(options._sourceImageSamplingMode), _sourceImageSamplingMode(options._sourceImageSamplingMode),
_sourceImageWindowMode(options._sourceImageWindowMode), _sourceImageWindowMode(options._sourceImageWindowMode),
_sourceRatioWindow(options._sourceRatioWindow), _sourceRatioWindow(options._sourceRatioWindow),

View File

@ -37,7 +37,8 @@ class OSGDB_EXPORT ReaderWriter : public osg::Object
ReaderWriter() {} ReaderWriter() {}
ReaderWriter(const ReaderWriter& rw,const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY):Object(rw,copyop) {} ReaderWriter(const ReaderWriter& rw,const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY):
osg::Object(rw,copyop) {}
virtual ~ReaderWriter(); virtual ~ReaderWriter();
@ -84,7 +85,7 @@ class OSGDB_EXPORT ReaderWriter : public osg::Object
Options(const std::string& str):_str(str) {} Options(const std::string& str):_str(str) {}
Options(const Options& options,const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY): Options(const Options& options,const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY):
Object(options,copyop), osg::Object(options,copyop),
_str(options._str), _str(options._str),
_databasePaths(options._databasePaths), _databasePaths(options._databasePaths),
_objectCacheHint(options._objectCacheHint) {} _objectCacheHint(options._objectCacheHint) {}

View File

@ -37,7 +37,7 @@ class OSGDB_EXPORT ReentrantMutex : public OpenThreads::Mutex
private: private:
ReentrantMutex(const ReentrantMutex &):Mutex() {} ReentrantMutex(const ReentrantMutex &):OpenThreads::Mutex() {}
ReentrantMutex &operator=(const ReentrantMutex &) {return *(this);} ReentrantMutex &operator=(const ReentrantMutex &) {return *(this);}

View File

@ -35,7 +35,7 @@ int ReentrantMutex::lock()
} }
else else
{ {
int result = Mutex::lock(); int result = OpenThreads::Mutex::lock();
if (result==0) if (result==0)
{ {
_threadHoldingMutex = OpenThreads::Thread::CurrentThread(); _threadHoldingMutex = OpenThreads::Thread::CurrentThread();
@ -50,7 +50,7 @@ int ReentrantMutex::unlock()
if (_threadHoldingMutex==OpenThreads::Thread::CurrentThread() && _lockCount>0) if (_threadHoldingMutex==OpenThreads::Thread::CurrentThread() && _lockCount>0)
{ {
--_lockCount; --_lockCount;
if (_lockCount<=0) return Mutex::unlock(); if (_lockCount<=0) return OpenThreads::Mutex::unlock();
} }
return 0; return 0;
} }
@ -64,7 +64,7 @@ int ReentrantMutex::trylock()
} }
else else
{ {
int result = Mutex::trylock(); int result = OpenThreads::Mutex::trylock();
if (result==0) if (result==0)
{ {
_threadHoldingMutex = OpenThreads::Thread::CurrentThread(); _threadHoldingMutex = OpenThreads::Thread::CurrentThread();

View File

@ -57,9 +57,9 @@ osgDB::ReaderWriter::ReadResult ReaderWriterFLT::readNode(const std::string& fil
} }
osg::ref_ptr<ReaderWriter::Options> local_options = options ? osg::ref_ptr<osgDB::ReaderWriter::Options> local_options = options ?
static_cast<ReaderWriter::Options*>(options->clone(osg::CopyOp(osg::CopyOp::SHALLOW_COPY))) : static_cast<osgDB::ReaderWriter::Options*>(options->clone(osg::CopyOp(osg::CopyOp::SHALLOW_COPY))) :
new ReaderWriter::Options; new osgDB::ReaderWriter::Options;
local_options->setDatabasePath(osgDB::getFilePath(fileName)); local_options->setDatabasePath(osgDB::getFilePath(fileName));
read->setOptions(local_options.get()); read->setOptions(local_options.get());

View File

@ -163,7 +163,11 @@ sockinetaddr sockinetbuf::localaddr() const
{ {
sockinetaddr sin; sockinetaddr sin;
int len = sin.size(); int len = sin.size();
#ifdef __sgi
if (::getsockname(rep->sock, sin.addr (), (int *) // LN
#else
if (::getsockname(rep->sock, sin.addr (), (socklen_t*) // LN if (::getsockname(rep->sock, sin.addr (), (socklen_t*) // LN
#endif
&len) == -1) &len) == -1)
throw sockerr (errno, "sockinetbuf::localaddr"); throw sockerr (errno, "sockinetbuf::localaddr");
return sin; return sin;
@ -187,7 +191,11 @@ sockinetaddr sockinetbuf::peeraddr() const
{ {
sockinetaddr sin; sockinetaddr sin;
int len = sin.size(); int len = sin.size();
#ifdef __sgi
if (::getpeername(rep->sock, sin.addr (), (int *) // LN
#else
if (::getpeername(rep->sock, sin.addr (), (socklen_t*) // LN if (::getpeername(rep->sock, sin.addr (), (socklen_t*) // LN
#endif
&len) == -1) &len) == -1)
throw sockerr (errno, "sockinetbuf::peeraddr"); throw sockerr (errno, "sockinetbuf::peeraddr");
return sin; return sin;

View File

@ -63,6 +63,7 @@
#include "sockstream.h" #include "sockstream.h"
#include <sstream> #include <sstream>
#include <string> #include <string>
#if defined(__APPLE__) #if defined(__APPLE__)
typedef int socklen_t; typedef int socklen_t;
#endif #endif
@ -128,6 +129,10 @@ extern "C" {
#include <sys/filio.h> #include <sys/filio.h>
#endif #endif
#ifdef __sgi
#define socklen_t int
#endif
#ifndef BUFSIZ #ifndef BUFSIZ
# define BUFSIZ 1024 # define BUFSIZ 1024
#endif #endif

View File

@ -54,9 +54,6 @@
#endif #endif
#endif #endif
#ifdef __sgi
typedef int socklen_t;
#endif
using namespace std; using namespace std;