Changes for IRIX build and fix to build system

This commit is contained in:
Don BURNS 2004-08-28 23:04:47 +00:00
parent 2a3f7b2799
commit 3e74db50e5
7 changed files with 38 additions and 20 deletions

View File

@ -224,7 +224,7 @@ endif
ifeq ($(OS),IRIX)
CXX = CC
ifeq ($(CXX),CC)
LINKARGS = -L${TOPDIR}/lib -LANG:std -OPT:Olimit=0
LINKARGS = -L${TOPDIR}/$(LIBINST) -LANG:std -OPT:Olimit=0
C++ = CC
DEPARG = -M
INC += -I${TOPDIR}/include -I/usr/freeware/include
@ -256,7 +256,7 @@ ifeq ($(OS),IRIX)
endif
else
LIBS = -lstdc++
LINKARGS = -L${TOPDIR}/lib
LINKARGS = -L${TOPDIR}/$(LIBINST)
C++ = g++
INC += -I${TOPDIR}/include -I/usr/freeware/include
DEF += -fPIC -W -Wno-unused

View File

@ -97,7 +97,7 @@ $(LIB:=.dbg) : $(PLUGIN:=.dbg)
$(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
THISDIR=../$(THISDIR)\
MAKEDEPEND=Makedepend $(LIB)
@$(MAKE) LNSRC=$(DEBUGDIR)/$(LIB) LNDEST=$(LIBINST)/$(OS)$(ARCH)/$(LIB) __link
@$(MAKE) LNSRC=$(DEBUGDIR)/$(LIB) LNDEST=$(LIBINST)/$(LIB) __link
$(PLUGIN:=.dbg) :
@[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
@ -122,7 +122,7 @@ $(LIB:=.opt) :
$(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
THISDIR=../$(THISDIR)\
MAKEDEPEND=Makedepend $(LIB)
@$(MAKE) LNSRC=$(OPTDIR)/$(LIB) LNDEST=$(LIBINST)/$(OS)$(ARCH)/$(LIB) __link
@$(MAKE) LNSRC=$(OPTDIR)/$(LIB) LNDEST=$(LIBINST)/$(LIB) __link
$(PLUGIN:=.opt) :
@[ -d $(OPTDIR) ] || mkdir -p $(OPTDIR)
@ -179,6 +179,7 @@ endif
depend : $(MAKEDEPEND)
__link :
@echo Calling dolink.sh wit LNSRC = $(LNSRC) and LNDEST = $(LNDEST)
@sh $(TOPDIR)/Make/dolink.sh $(TOPDIR) $(LNSRC) $(LNDEST) "$(LINK)"
__instfiles :

View File

@ -47,10 +47,10 @@ osg::Node* createScalarBar()
std::string printScalar(float scalar)
{
std::cout<<"In MyScalarPrinter::printScalar"<<std::endl;
if(scalar==0.0f) return ScalarPrinter::printScalar(scalar)+" Bottom";
else if(scalar==0.5f) return ScalarPrinter::printScalar(scalar)+" Middle";
else if(scalar==1.0f) return ScalarPrinter::printScalar(scalar)+" Top";
else return ScalarPrinter::printScalar(scalar);
if(scalar==0.0f) return ScalarBar::ScalarPrinter::printScalar(scalar)+" Bottom";
else if(scalar==0.5f) return ScalarBar::ScalarPrinter::printScalar(scalar)+" Middle";
else if(scalar==1.0f) return ScalarBar::ScalarPrinter::printScalar(scalar)+" Top";
else return ScalarBar::ScalarPrinter::printScalar(scalar);
}
};

View File

@ -308,9 +308,9 @@ std::string osgDB::findFileInDirectory(const std::string& fileName,const std::st
convertStringPathIntoFilePathList("/usr/lib32/:/usr/local/lib32/",filepath);
// bloody mess see rld(1) man page
#if (_MIPS_SIM == _MIPS_SIM_ABI32)
char* ptr;
#if (_MIPS_SIM == _MIPS_SIM_ABI32)
if( (ptr = getenv( "LD_LIBRARY_PATH" )))
{
convertStringPathIntoFilePathList(ptr,filepath);

View File

@ -159,7 +159,10 @@ sockinetaddr sockinetbuf::localaddr() const
{
sockinetaddr sin;
int len = sin.size();
if (::getsockname(rep->sock, sin.addr (), (socklen_t*) // LN
if (::getsockname(rep->sock, sin.addr (),
#ifndef __sgi
(socklen_t*) // LN
#endif
&len) == -1)
throw sockerr (errno, "sockinetbuf::localaddr");
return sin;
@ -183,7 +186,10 @@ sockinetaddr sockinetbuf::peeraddr() const
{
sockinetaddr sin;
int len = sin.size();
if (::getpeername(rep->sock, sin.addr (), (socklen_t*) // LN
if (::getpeername(rep->sock, sin.addr (),
#ifndef __sgi
(socklen_t*) // LN
#endif
&len) == -1)
throw sockerr (errno, "sockinetbuf::peeraddr");
return sin;

View File

@ -242,7 +242,7 @@ bool sockerr::benign () const
case EWOULDBLOCK:
// On FreeBSD (and probably on Linux too)
// EAGAIN has the same value as EWOULDBLOCK
#if !defined(__linux__) && !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)) // LN
#if !defined( __sgi) && !defined(__linux__) && !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)) // LN
case EAGAIN:
#endif
return true;
@ -493,7 +493,10 @@ sockbuf::sockdesc sockbuf::accept (sockAddr& sa)
{
int len = sa.size ();
int soc = -1;
if ((soc = ::accept (rep->sock, sa.addr (), (socklen_t*) // LN
if ((soc = ::accept (rep->sock, sa.addr (),
#ifndef __sgi
(socklen_t*) // LN
#endif
&len)) == -1)
throw sockerr (errno, "sockbuf::sockdesc", sockname.c_str());
return sockdesc (soc);
@ -545,11 +548,14 @@ int sockbuf::recvfrom (sockAddr& sa, void* buf, int len, int msgf)
throw sockoob ();
int rval = 0;
int sa_len = sa.size ();
int __sa_len = sa.size ();
if ((rval = ::recvfrom (rep->sock, (char*) buf, len,
msgf, sa.addr (), (socklen_t*) // LN
&sa_len)) == -1)
msgf, sa.addr (),
#ifndef __sgi
(socklen_t*) // LN
#endif
&__sa_len)) == -1)
throw sockerr (errno, "sockbuf::recvfrom", sockname.c_str());
return rval;
}
@ -715,7 +721,10 @@ void sockbuf::shutdown (shuthow sh)
int sockbuf::getopt (int op, void* buf, int len, int level) const
{
if (::getsockopt (rep->sock, level, op, (char*) buf, (socklen_t*) // LN
if (::getsockopt (rep->sock, level, op, (char*) buf,
#ifndef __sgi
(socklen_t*) // LN
#endif
&len) == -1)
throw sockerr (errno, "sockbuf::getopt", sockname.c_str());
return len;
@ -930,6 +939,7 @@ void sockbuf::closeonexec (bool set) const
// if set is true, set close on exec flag
// else clear close on exec flag
{
#ifndef __sgi
if (set) {
if (::ioctl (rep->sock, FIOCLEX, 0) == -1)
throw sockerr (errno, "sockbuf::closeonexec", sockname.c_str());
@ -937,6 +947,7 @@ void sockbuf::closeonexec (bool set) const
if (::ioctl (rep->sock, FIONCLEX, 0) == -1)
throw sockerr (errno, "sockbuf::closeonexec", sockname.c_str());
}
#endif
}
#endif // !WIN32

View File

@ -34,12 +34,12 @@
#define _SOCKSTREAM_H
#include <iostream> // must be ANSI compatible
#include <cstddef>
//#include <cstddef>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <cstdio>
//#include <cstdio>
#ifndef WIN32
# include <sys/types.h>
# include <sys/uio.h>