1
0
Fork 0

Erik Hofman:

A big honkin' set of minor tweaks to bring TerraGear into Irix compliance.
This commit is contained in:
curt 2003-01-07 22:46:51 +00:00
parent 27a068f721
commit 8b269dc000
42 changed files with 100 additions and 116 deletions

View file

@ -17,12 +17,6 @@ echo -n " automake: `automake --version | head -1 | awk '{print $4}'`"
echo " ($AUTO_MAKE_VERSION)" echo " ($AUTO_MAKE_VERSION)"
echo "" echo ""
ACLOCAL_OPTS=""
if [ $AUTO_MAKE_VERSION -ge 14 ]; then
if [ $OSTYPE = "IRIX" -o $OSTYPE = "IRIX64" ]; then echo " -I ."
ACLOCAL_OPTS="-I ."
fi
fi
echo "Running aclocal $ACLOCAL_OPTS" echo "Running aclocal $ACLOCAL_OPTS"
aclocal $ACLOCAL_OPTS aclocal $ACLOCAL_OPTS
@ -33,14 +27,8 @@ if [ ! -e src/Include/config.h.in ]; then
exit 1 exit 1
fi fi
echo -n "Running automake" echo "Running automake --add-missing"
if [ $OSTYPE = "IRIX" -o $OSTYPE = "IRIX64" ]; then automake --add-missing
echo " --add-missing --include-deps"
automake --add-missing --include-deps
else
echo " --add-missing"
automake --add-missing
fi
echo "Running autoconf" echo "Running autoconf"
autoconf autoconf
@ -50,16 +38,6 @@ if [ ! -e configure ]; then
exit 1 exit 1
fi fi
# fixup Makefiles for Irix
if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
echo "Fixing Makefiles for Irix"
for n in `find . -name Makefile.in`; do \
mv -f $n $n.ar-new; \
sed 's/$(AR) cru/$(AR) -o/g' $n.ar-new > $n; \
rm -f $n.ar-new; \
done;
fi
echo "" echo ""
echo "======================================" echo "======================================"

View file

@ -20,14 +20,35 @@ AC_PROG_RANLIB
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AR="ar" # specify the simgear location
OS=`uname -s` AC_ARG_WITH(simgear, [ --with-simgear=PREFIX Specify the prefix path to simgear])
if test "$OS" = "IRIX" -o "$OS" = "IRIX64"; then
if test "x$with_simgear" != "x" ; then
echo "SimGear prefix path is $with_simgear"
EXTRA_DIRS="${EXTRA_DIRS} $with_simgear"
fi
dnl set the $host variable based on local machine/os
AC_CANONICAL_HOST
case "${host}" in
*-*-irix*)
if test "$CXX" = "CC"; then if test "$CXX" = "CC"; then
AR="CC -ar" AR="CC -ar"
AC_SUBST(AR) ARFLAGS="-o"
CXXFLAGS="$CXXFLAGS -I$with_simgear/include/simgear/compatibility"
else
AR="ar"
ARFLAGS="cru"
fi fi
fi ;;
*)
AR="ar"
ARFLAGS="cru"
;;
esac
AC_SUBST(AR)
AC_SUBST(ARFLAGS)
dnl Specify if we want logging (testing build) or not (release build) dnl Specify if we want logging (testing build) or not (release build)
# set logging default value # set logging default value
@ -285,6 +306,24 @@ AC_TYPE_SIZE_T
AC_HEADER_TIME AC_HEADER_TIME
AC_STRUCT_TM AC_STRUCT_TM
dnl check for socklen_t (in Unix98)
AC_MSG_CHECKING(for socklen_t)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
int accept (int, struct sockaddr *, socklen_t *);
],[],[
AC_MSG_RESULT(yes)],[
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
int accept (int, struct sockaddr *, size_t *);
],[],[
AC_MSG_RESULT(size_t)
AC_DEFINE([socklen_t], size_t, [Define for socklen_t])], [
AC_MSG_RESULT(int)
AC_DEFINE([socklen_t], int, [Define for socklen_t])])])
dnl Checks for library functions. dnl Checks for library functions.
AC_TYPE_SIGNAL AC_TYPE_SIGNAL
AC_FUNC_VPRINTF AC_FUNC_VPRINTF
@ -350,9 +389,3 @@ else
echo "Debug messages: yes" echo "Debug messages: yes"
fi fi
if test "$OS" = "IRIX" -o "$OS" = "IRIX64"; then
if test "$CXX" = "CC"; then
echo "\nRemember to run: sh ../FlightGear-0.x.x/irix-hack.sh!\07\n"
fi
fi

View file

@ -559,7 +559,8 @@ void build_airport( string airport_raw, float alt_m,
// 3rd pass: generate all remaining runways not covered in the first pass // 3rd pass: generate all remaining runways not covered in the first pass
for ( i = 0; i < (int)runways.size(); ++i ) { for ( i = 0; i < (int)runways.size(); ++i ) {
string type_flag = runways[i].surface_flags.substr(2, 1); string type_flag = runways[i].surface_flags.substr(2, 1);
if ( type_flag != "P" && type_flag != "R" && type_flag != "V" ) { if ( type_flag != string("P") && type_flag != string("R")
&& type_flag != string("V") ) {
build_runway( runways[i], elev * SG_FEET_TO_METER, build_runway( runways[i], elev * SG_FEET_TO_METER,
&rwy_polys, &texparams, &accum, &apt_base, &rwy_polys, &texparams, &accum, &apt_base,
&apt_clearing ); &apt_clearing );

View file

@ -324,7 +324,7 @@ static superpoly_list gen_runway_threshold_lights( const FGRunway& rwy_info,
ref2 = Point3D( lon, lat, 0.0 ); ref2 = Point3D( lon, lat, 0.0 );
// five lights for each side // five lights for each side
for ( int i = 0; i < 5; ++i ) { for ( i = 0; i < 5; ++i ) {
g_lights.push_back( ref1 ); g_lights.push_back( ref1 );
g_normals.push_back( normal1 ); g_normals.push_back( normal1 );

View file

@ -142,7 +142,7 @@ void gen_non_precision_rwy( const FGRunway& rwy_info,
SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation = " << rwy_info.rwy_no); SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation = " << rwy_info.rwy_no);
SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation letter = " << letter); SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation letter = " << letter);
if ( letter != "" ) { if ( !letter.empty() ) {
start_pct = end_pct; start_pct = end_pct;
end_pct = start_pct + ( 90.0 / length ); end_pct = start_pct + ( 90.0 / length );
gen_runway_section( rwy_info, runway_a, gen_runway_section( rwy_info, runway_a,

View file

@ -145,7 +145,7 @@ void gen_precision_rwy( const FGRunway& rwy_info,
SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation = " << rwy_info.rwy_no); SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation = " << rwy_info.rwy_no);
SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation letter = " << letter); SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation letter = " << letter);
if ( letter != "" ) { if ( !letter.empty() ) {
start_pct = end_pct; start_pct = end_pct;
end_pct = start_pct + ( 90.0 / length ); end_pct = start_pct + ( 90.0 / length );
gen_runway_section( rwy_info, runway_a, gen_runway_section( rwy_info, runway_a,

View file

@ -131,7 +131,7 @@ void gen_visual_rwy( const FGRunway& rwy_info,
SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation = " << rwy_info.rwy_no); SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation = " << rwy_info.rwy_no);
SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation letter = " << letter); SG_LOG(SG_GENERAL, SG_DEBUG, "Runway designation letter = " << letter);
if ( letter != "" ) { if ( !letter.empty() ) {
start_pct = end_pct; start_pct = end_pct;
end_pct = start_pct + ( 90.0 / length ); end_pct = start_pct + ( 90.0 / length );
gen_runway_section( rwy_info, runway_a, gen_runway_section( rwy_info, runway_a,

View file

@ -37,9 +37,7 @@
#include "clipper.hxx" #include "clipper.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
#endif
#define MASK_CLIP 1 #define MASK_CLIP 1

View file

@ -40,10 +40,8 @@
#include "genobj.hxx" #include "genobj.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
SG_USING_STD(endl); SG_USING_STD(endl);
#endif
// calculate the global bounding sphere. Center is the center of the // calculate the global bounding sphere. Center is the center of the

View file

@ -62,10 +62,8 @@
#include "construct.hxx" #include "construct.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
SG_USING_STD(endl); SG_USING_STD(endl);
#endif
SG_USING_STD(string); SG_USING_STD(string);
SG_USING_STD(vector); SG_USING_STD(vector);

View file

@ -36,10 +36,8 @@
#include "match.hxx" #include "match.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
SG_USING_STD(endl); SG_USING_STD(endl);
#endif
FGMatch::FGMatch( void ) { FGMatch::FGMatch( void ) {

View file

@ -3,7 +3,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <Include/config.h> # include <config.h>
#endif #endif
#ifdef HAVE_SYS_PARAM_H #ifdef HAVE_SYS_PARAM_H

View file

@ -1,6 +1,9 @@
// remote_server.c -- Written by Curtis Olson // remote_server.c -- Written by Curtis Olson
// -- for CSci 5502 // -- for CSci 5502
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -26,7 +29,7 @@ SG_USING_STD( cout );
SG_USING_STD( cerr ); SG_USING_STD( cerr );
SG_USING_STD( endl ); SG_USING_STD( endl );
#if defined (sun) || defined (__CYGWIN__) #if defined (sun) || defined (__CYGWIN__) || defined(sgi)
# define WAIT_ANY (pid_t)-1 # define WAIT_ANY (pid_t)-1
#endif #endif

View file

@ -28,10 +28,8 @@
#include "triangle.hxx" #include "triangle.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
SG_USING_STD(endl); SG_USING_STD(endl);
#endif
// Constructor // Constructor

View file

@ -58,10 +58,8 @@
#include "array.hxx" #include "array.hxx"
SG_USING_STD(string); SG_USING_STD(string);
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
SG_USING_STD(endl); SG_USING_STD(endl);
#endif
FGArray::FGArray( void ) { FGArray::FGArray( void ) {

View file

@ -57,10 +57,8 @@
#include "dem.hxx" #include "dem.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
SG_USING_STD(endl); SG_USING_STD(endl);
#endif
#define MAX_EX_NODES 10000 #define MAX_EX_NODES 10000

View file

@ -28,10 +28,8 @@
#include "trisegs.hxx" #include "trisegs.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
SG_USING_STD(endl); SG_USING_STD(endl);
#endif
// Constructor // Constructor

View file

@ -27,10 +27,8 @@
#include "genfans.hxx" #include "genfans.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD( cout ); SG_USING_STD( cout );
SG_USING_STD( endl ); SG_USING_STD( endl );
#endif
// make sure the list is expanded at least to hold "n" and then push // make sure the list is expanded at least to hold "n" and then push

View file

@ -45,10 +45,8 @@
# include <Win32/mkdir.hpp> # include <Win32/mkdir.hpp>
#endif #endif
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD( cout ); SG_USING_STD( cout );
SG_USING_STD( endl ); SG_USING_STD( endl );
#endif
void write_polygon( const FGPolygon& poly, const string& base ) { void write_polygon( const FGPolygon& poly, const string& base ) {

View file

@ -34,9 +34,7 @@ extern "C" {
#include <simgear/math/point3d.hxx> #include <simgear/math/point3d.hxx>
#include <simgear/misc/exception.hxx> #include <simgear/misc/exception.hxx>
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(endl); SG_USING_STD(endl);
#endif
#include <poly2tri/interface.h> #include <poly2tri/interface.h>

View file

@ -37,9 +37,7 @@
#include STL_STRING #include STL_STRING
#include <vector> #include <vector>
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(ostream); SG_USING_STD(ostream);
#endif
SG_USING_STD(string); SG_USING_STD(string);
SG_USING_STD(vector); SG_USING_STD(vector);

View file

@ -28,7 +28,7 @@ SG_USING_STD(endl);
* Append an integer to a string. * Append an integer to a string.
*/ */
static void static void
append (string &s, int i) strAppend (string &s, int i)
{ {
char buf[128]; char buf[128];
sprintf(buf, "%d", i); sprintf(buf, "%d", i);
@ -40,7 +40,7 @@ append (string &s, int i)
* Append a double-precision real to a string. * Append a double-precision real to a string.
*/ */
static void static void
append (string &s, double f) strAppend (string &s, double f)
{ {
char buf[128]; char buf[128];
sprintf(buf, "%f", f); sprintf(buf, "%f", f);
@ -150,7 +150,7 @@ expect (istream &input, int i)
input >> in; input >> in;
if (in != i) { if (in != i) {
string message = "Expected "; string message = "Expected ";
append(message, i); strAppend(message, i);
throw E00Exception(message.c_str()); throw E00Exception(message.c_str());
} }
} }
@ -166,7 +166,7 @@ expect (istream &input, double f)
input >> in; input >> in;
if (in != f) { if (in != f) {
string message = "Expected "; string message = "Expected ";
append(message, f); strAppend(message, f);
throw E00Exception(message.c_str()); throw E00Exception(message.c_str());
} }
} }
@ -180,7 +180,7 @@ expect (istream &input, const char *s)
{ {
string in; string in;
input >> in; input >> in;
if (in != s) { if (in != string(s)) {
string message = "Expected "; string message = "Expected ";
message += s; message += s;
throw E00Exception(message.c_str()); throw E00Exception(message.c_str());
@ -490,7 +490,7 @@ E00::readTX6 ()
*_input >> dummy; *_input >> dummy;
// FIXME: will fail if "JABBERWOCKY" appears // FIXME: will fail if "JABBERWOCKY" appears
// in the text annotation itself // in the text annotation itself
while (dummy != "JABBERWOCKY") while (dummy != string("JABBERWOCKY"))
*_input >> dummy; *_input >> dummy;
} }
@ -502,7 +502,7 @@ E00::readTX7 ()
*_input >> dummy; *_input >> dummy;
// FIXME: will fail if "JABBERWOCKY" appears // FIXME: will fail if "JABBERWOCKY" appears
// in the text annotation itself // in the text annotation itself
while (dummy != "JABBERWOCKY") while (dummy != string("JABBERWOCKY"))
*_input >> dummy; *_input >> dummy;
} }
@ -513,7 +513,7 @@ E00::readRXP ()
*_input >> dummy; *_input >> dummy;
// FIXME: will fail if "JABBERWOCKY" appears // FIXME: will fail if "JABBERWOCKY" appears
// in the text annotation itself // in the text annotation itself
while (dummy != "JABBERWOCKY") while (dummy != string("JABBERWOCKY"))
*_input >> dummy; *_input >> dummy;
} }
@ -524,7 +524,7 @@ E00::readRPL ()
*_input >> dummy; *_input >> dummy;
// FIXME: will fail if "JABBERWOCKY" appears // FIXME: will fail if "JABBERWOCKY" appears
// in the text annotation itself // in the text annotation itself
while (dummy != "JABBERWOCKY") while (dummy != string("JABBERWOCKY"))
*_input >> dummy; *_input >> dummy;
} }
@ -548,7 +548,7 @@ E00::readIFO ()
*_input >> line; *_input >> line;
while (line != string("EOI")) { while (line != string("EOI")) {
int i;
// Start of a new IFO file. // Start of a new IFO file.
IFO ifo; IFO ifo;
IFO::Entry entry; IFO::Entry entry;
@ -570,7 +570,7 @@ E00::readIFO ()
// Read the item definitions // Read the item definitions
ifo.defs.resize(0); ifo.defs.resize(0);
for (int i = 0; i < ifo.numItems; i++) { for (i = 0; i < ifo.numItems; i++) {
IFO::ItemDef def; IFO::ItemDef def;
*_input >> def.itemName; *_input >> def.itemName;
@ -593,7 +593,7 @@ E00::readIFO ()
// Read the data records // Read the data records
ifo.entries.resize(0); ifo.entries.resize(0);
for (int i = 0; i < ifo.numDataRecords; i++) { for (i = 0; i < ifo.numDataRecords; i++) {
// cout << " Reading entry " << i << endl; // cout << " Reading entry " << i << endl;
entry.resize(0); entry.resize(0);
line_pos = 0; line_pos = 0;

View file

@ -11,9 +11,7 @@
SG_USING_STD(vector); SG_USING_STD(vector);
SG_USING_STD(string); SG_USING_STD(string);
#if ! defined(SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(istream); SG_USING_STD(istream);
#endif
// An exception reading an E00 file. // An exception reading an E00 file.

View file

@ -10,9 +10,7 @@
#include "landcover.hxx" #include "landcover.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(ifstream); SG_USING_STD(ifstream);
#endif
SG_USING_STD(string); SG_USING_STD(string);
LandCover::LandCover( const string &filename ) LandCover::LandCover( const string &filename )

View file

@ -12,9 +12,7 @@
#include STL_STRING #include STL_STRING
#include STL_FSTREAM #include STL_FSTREAM
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(ifstream); SG_USING_STD(ifstream);
#endif
SG_USING_STD(string); SG_USING_STD(string);

View file

@ -12,11 +12,9 @@
#include "landcover.hxx" #include "landcover.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cerr); SG_USING_STD(cerr);
SG_USING_STD(cout); SG_USING_STD(cout);
SG_USING_STD(endl); SG_USING_STD(endl);
#endif
SG_USING_STD(string); SG_USING_STD(string);
int int

View file

@ -84,8 +84,16 @@ VpfCoverage::hasFeature (const string &name) const
{ {
if (_feature_names == 0) if (_feature_names == 0)
getFeatureNames(); getFeatureNames();
return (find(_feature_names->begin(), _feature_names->end(), name)
!= _feature_names->end()); vector<const string>::iterator it;
for (it = _feature_names->begin(); it != _feature_names->end(); it++)
if (*it == name)
return(it != _feature_names->end());
return false;
// return (std::find(_feature_names->begin(), _feature_names->end(), name)
// != _feature_names->end());
} }
const VpfFeature const VpfFeature

View file

@ -247,12 +247,12 @@ VpfFeature::getFCA () const
bool bool
VpfFeature::isProperty (const string &name) const VpfFeature::isProperty (const string &name) const
{ {
return (name != "id" && return (name != string("id") &&
name != "tile_id" && name != string("tile_id") &&
name != "end_id" && name != string("end_id") &&
name != "edg_id" && name != string("edg_id") &&
name != "fac_id" && name != string("fac_id") &&
name != "txt_id"); name != string("txt_id"));
} }
const string const string

View file

@ -112,7 +112,7 @@ VpfPropertyDecl::getVDTName () const
bool bool
VpfPropertyDecl::hasVDT () const VpfPropertyDecl::hasVDT () const
{ {
return (getVDTName() != "-"); return (getVDTName() != string("-"));
} }
const VpfTable & const VpfTable &

View file

@ -4,6 +4,8 @@
#include <string> #include <string>
#include <fstream> #include <fstream>
#include <simgear/misc/zfstream.hxx> // ios_binary
using std::string; using std::string;
using std::ifstream; using std::ifstream;
using std::istream; using std::istream;
@ -290,11 +292,11 @@ VpfTable::read (const string &fileName)
_path = fileName; _path = fileName;
ifstream input; ifstream input;
input.open(fileName.c_str(), std::ios::binary); input.open(fileName.c_str(), ios_binary);
if (!input) { if (!input) {
input.clear(); input.clear();
string fileName2 = fileName + '.'; string fileName2 = fileName + '.';
input.open(fileName2.c_str(), std::ios::binary); input.open(fileName2.c_str(), ios_binary);
} }
if (!input) if (!input)
throw VpfException(string("Failed to open VPF table file ") + fileName); throw VpfException(string("Failed to open VPF table file ") + fileName);
@ -363,7 +365,11 @@ VpfTable::read_row (istream &input, VpfValue * row)
if (!input.get(c)) if (!input.get(c))
return false; return false;
else else
#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
input.unget(); input.unget();
#else
input.putback(c);
#endif
// OK, continue // OK, continue
int nCols = _columns.size(); int nCols = _columns.size();
for (int i = 0; i < nCols; i++) { for (int i = 0; i < nCols; i++) {

View file

@ -37,9 +37,7 @@
#include "point2d.hxx" #include "point2d.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
#endif
SG_USING_STD(string); SG_USING_STD(string);

View file

@ -29,9 +29,7 @@
#include <DEM/dem.hxx> #include <DEM/dem.hxx>
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
#endif
// static float dem_data[DEM_SIZE_1][DEM_SIZE_1]; // static float dem_data[DEM_SIZE_1][DEM_SIZE_1];

View file

@ -6,6 +6,7 @@ e00lines_LDADD = \
$(top_builddir)/src/Lib/Geometry/libGeometry.a \ $(top_builddir)/src/Lib/Geometry/libGeometry.a \
$(top_builddir)/src/Lib/Polygon/libPolygon.a \ $(top_builddir)/src/Lib/Polygon/libPolygon.a \
$(top_builddir)/src/Lib/poly2tri/libpoly2tri.a \ $(top_builddir)/src/Lib/poly2tri/libpoly2tri.a \
$(top_builddir)/src/Lib/TriangleJRS/libTriangleJRS.a \
$(top_builddir)/src/Lib/e00/libe00.a \ $(top_builddir)/src/Lib/e00/libe00.a \
-lsgdebug -lsgbucket -lsgmisc -lsgmath -lsgio -lsgxml -lgenpolyclip -lz -lsgdebug -lsgbucket -lsgmisc -lsgmath -lsgio -lsgxml -lgenpolyclip -lz

View file

@ -37,10 +37,8 @@
#include STL_STRING #include STL_STRING
#include <vector> #include <vector>
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cerr); SG_USING_STD(cerr);
SG_USING_STD(cout); SG_USING_STD(cout);
#endif
SG_USING_STD(string); SG_USING_STD(string);
SG_USING_STD(vector); SG_USING_STD(vector);

View file

@ -36,9 +36,7 @@
#include "gshhs_split.hxx" #include "gshhs_split.hxx"
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout); SG_USING_STD(cout);
#endif
SG_USING_STD(string); SG_USING_STD(string);

View file

@ -48,9 +48,7 @@
#include "gshhs_split.hxx" #include "gshhs_split.hxx"
SG_USING_STD( string ); SG_USING_STD( string );
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD( cout ); SG_USING_STD( cout );
#endif
// hackity, hackity, hack ... cough cough // hackity, hackity, hack ... cough cough
#ifdef i386 #ifdef i386

View file

@ -39,9 +39,7 @@
# include <Win32/mkdir.hpp> # include <Win32/mkdir.hpp>
#endif #endif
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD( cout ); SG_USING_STD( cout );
#endif
SG_USING_STD( string ); SG_USING_STD( string );
// return the type of the shapefile record // return the type of the shapefile record

View file

@ -39,9 +39,7 @@
# include <Win32/mkdir.hpp> # include <Win32/mkdir.hpp>
#endif #endif
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD( cout ); SG_USING_STD( cout );
#endif
SG_USING_STD( string ); SG_USING_STD( string );
// return the type of the shapefile record // return the type of the shapefile record
@ -214,7 +212,7 @@ int main( int argc, char **argv ) {
string shapetype = SHPTypeName( nShapeType ); string shapetype = SHPTypeName( nShapeType );
if ( shapetype != "Polygon" ) { if ( shapetype != string("Polygon") ) {
SG_LOG( SG_GENERAL, SG_ALERT, "Can't handle non-polygon shape files" ); SG_LOG( SG_GENERAL, SG_ALERT, "Can't handle non-polygon shape files" );
exit(-1); exit(-1);
} }

View file

@ -6,6 +6,7 @@ tgvpf_LDADD = \
$(top_builddir)/src/Lib/Geometry/libGeometry.a \ $(top_builddir)/src/Lib/Geometry/libGeometry.a \
$(top_builddir)/src/Lib/Polygon/libPolygon.a \ $(top_builddir)/src/Lib/Polygon/libPolygon.a \
$(top_builddir)/src/Lib/poly2tri/libpoly2tri.a \ $(top_builddir)/src/Lib/poly2tri/libpoly2tri.a \
$(top_builddir)/src/Lib/TriangleJRS/libTriangleJRS.a \
$(top_builddir)/src/Lib/vpf/libvpf.a \ $(top_builddir)/src/Lib/vpf/libvpf.a \
-lsgdebug -lsgbucket -lsgmisc -lsgmath -lsgio -lsgxml -lgenpolyclip -lz -lsgdebug -lsgbucket -lsgmisc -lsgmath -lsgio -lsgxml -lgenpolyclip -lz

View file

@ -37,10 +37,8 @@
#include STL_STRING #include STL_STRING
#include <vector> #include <vector>
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cerr); SG_USING_STD(cerr);
SG_USING_STD(cout); SG_USING_STD(cout);
#endif
SG_USING_STD(string); SG_USING_STD(string);
SG_USING_STD(vector); SG_USING_STD(vector);
@ -485,7 +483,7 @@ main (int argc, const char **argv)
const tg::Line line = vpf2tg(feature.getLine(i)); const tg::Line line = vpf2tg(feature.getLine(i));
if (!bounds.isOverlapping(line.getBounds())) if (!bounds.isOverlapping(line.getBounds()))
continue; continue;
makePolygon(line, (width == -1 ? 50 : width), shape); tg::makePolygon(line, (width == -1 ? 50 : width), shape);
break; break;
} }
case VpfFeature::POLYGON: { case VpfFeature::POLYGON: {

View file

@ -6,6 +6,7 @@ tguserdef_LDADD = \
$(top_builddir)/src/Lib/Geometry/libGeometry.a \ $(top_builddir)/src/Lib/Geometry/libGeometry.a \
$(top_builddir)/src/Lib/Polygon/libPolygon.a \ $(top_builddir)/src/Lib/Polygon/libPolygon.a \
$(top_builddir)/src/Lib/poly2tri/libpoly2tri.a \ $(top_builddir)/src/Lib/poly2tri/libpoly2tri.a \
$(top_builddir)/src/Lib/TriangleJRS/libTriangleJRS.a \
-lsgbucket -lsgmisc -lsgmath -lsgio -lsgxml -lsgdebug -lgenpolyclip -lz -lsgbucket -lsgmisc -lsgmath -lsgio -lsgxml -lsgdebug -lgenpolyclip -lz
INCLUDES = -I$(top_srcdir)/src/Lib INCLUDES = -I$(top_srcdir)/src/Lib

View file

@ -84,7 +84,7 @@ add_line (SGPropertyNode_ptr node)
} }
FGPolygon poly; FGPolygon poly;
makePolygon(line, node->getIntValue("width", 10), poly); tg::makePolygon(line, node->getIntValue("width", 10), poly);
poly = polygon_int(poly, bounds_poly); poly = polygon_int(poly, bounds_poly);
split_polygon(".", material, poly); split_polygon(".", material, poly);
} }