Fixes for IRIX build
This commit is contained in:
@@ -35,7 +35,7 @@ int ReentrantMutex::lock()
|
||||
}
|
||||
else
|
||||
{
|
||||
int result = Mutex::lock();
|
||||
int result = OpenThreads::Mutex::lock();
|
||||
if (result==0)
|
||||
{
|
||||
_threadHoldingMutex = OpenThreads::Thread::CurrentThread();
|
||||
@@ -50,7 +50,7 @@ int ReentrantMutex::unlock()
|
||||
if (_threadHoldingMutex==OpenThreads::Thread::CurrentThread() && _lockCount>0)
|
||||
{
|
||||
--_lockCount;
|
||||
if (_lockCount<=0) return Mutex::unlock();
|
||||
if (_lockCount<=0) return OpenThreads::Mutex::unlock();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -64,7 +64,7 @@ int ReentrantMutex::trylock()
|
||||
}
|
||||
else
|
||||
{
|
||||
int result = Mutex::trylock();
|
||||
int result = OpenThreads::Mutex::trylock();
|
||||
if (result==0)
|
||||
{
|
||||
_threadHoldingMutex = OpenThreads::Thread::CurrentThread();
|
||||
|
||||
@@ -57,9 +57,9 @@ osgDB::ReaderWriter::ReadResult ReaderWriterFLT::readNode(const std::string& fil
|
||||
|
||||
}
|
||||
|
||||
osg::ref_ptr<ReaderWriter::Options> local_options = options ?
|
||||
static_cast<ReaderWriter::Options*>(options->clone(osg::CopyOp(osg::CopyOp::SHALLOW_COPY))) :
|
||||
new ReaderWriter::Options;
|
||||
osg::ref_ptr<osgDB::ReaderWriter::Options> local_options = options ?
|
||||
static_cast<osgDB::ReaderWriter::Options*>(options->clone(osg::CopyOp(osg::CopyOp::SHALLOW_COPY))) :
|
||||
new osgDB::ReaderWriter::Options;
|
||||
local_options->setDatabasePath(osgDB::getFilePath(fileName));
|
||||
read->setOptions(local_options.get());
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// The constructors of isockinet, osockinet and iosockinet are changed.
|
||||
|
||||
#include "sockinet.h"
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__)
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
@@ -163,7 +163,11 @@ sockinetaddr sockinetbuf::localaddr() const
|
||||
{
|
||||
sockinetaddr sin;
|
||||
int len = sin.size();
|
||||
#ifdef __sgi
|
||||
if (::getsockname(rep->sock, sin.addr (), (int *) // LN
|
||||
#else
|
||||
if (::getsockname(rep->sock, sin.addr (), (socklen_t*) // LN
|
||||
#endif
|
||||
&len) == -1)
|
||||
throw sockerr (errno, "sockinetbuf::localaddr");
|
||||
return sin;
|
||||
@@ -187,7 +191,11 @@ sockinetaddr sockinetbuf::peeraddr() const
|
||||
{
|
||||
sockinetaddr sin;
|
||||
int len = sin.size();
|
||||
#ifdef __sgi
|
||||
if (::getpeername(rep->sock, sin.addr (), (int *) // LN
|
||||
#else
|
||||
if (::getpeername(rep->sock, sin.addr (), (socklen_t*) // LN
|
||||
#endif
|
||||
&len) == -1)
|
||||
throw sockerr (errno, "sockinetbuf::peeraddr");
|
||||
return sin;
|
||||
|
||||
@@ -63,7 +63,8 @@
|
||||
#include "sockstream.h"
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#if defined(__APPLE__)
|
||||
|
||||
#if defined(__APPLE__)
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
@@ -128,6 +129,10 @@ extern "C" {
|
||||
#include <sys/filio.h>
|
||||
#endif
|
||||
|
||||
#ifdef __sgi
|
||||
#define socklen_t int
|
||||
#endif
|
||||
|
||||
#ifndef BUFSIZ
|
||||
# define BUFSIZ 1024
|
||||
#endif
|
||||
|
||||
@@ -54,9 +54,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __sgi
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user