Bob Jamison wrote:
Jeremy Y. Meng wrote:
Dear Inkscape developers,
Thank you all for this wonderful program. I love it and have been trying to port it to SGI IRIX 6.5 platform. My workstation is an Octane2 V6 running 6.5.28.
My goal is to build Inkscape-20051109-0840 using SGI MIPSpro compiler. I managed to get an executable by patching the source (many many "#ifdef (__sgi) ..."). However it crashed every time shortly after startup, with the following error:
inkscape
event_scan: got unknown client message ALERT: Process [inkscape] 775729 generated trap, but has signal 10 held or ignored epc 0xfa46a14 ra 0xfa46244 badvaddr 0xffffffffff396d98 process has been terminated to prevent infinite loop Bus error
The interesting part is that I could run inkscape remotely from a windows machine via Cygwin/X server and play with it for a while (until it randomly crashed). Does this have anything to do with the X visuals? The Octane V6 has a highest 30-bit visual.
Then I tried again using gcc 3.4. This time I only need to modify a few #define's regarding isFinite() and round(). But the disaster was when making the inkscape binary. There are tons of errors like a few listed below.
I don't know too much C++. I am hoping my patch didn't introduce any bugs into Inkscape. Anyone interested please take a look at my patch and maybe give some insights?
--- begin pasting error msg --- gmake all-recursive gmake[1]: Entering directory `/usr/people/voidfoo/devel/inkscape/inkscape_gcc/build_gcc' Making all in src gmake[2]: Entering directory `/usr/people/voidfoo/devel/inkscape/inkscape_gcc/build_gcc/src' /bin/sh ../libtool --mode=link g++ -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -g -O2 -Wa,-xgot -L/usr/nekoware/lib -o inkscape --export-dynamic main.o libinkpre.a application/libinkapp.a ui/dialog/libuidialog.a dialogs/libspdialogs.a dom/libdom.a jabber_whiteboard/libjabber_whiteboard.a trace/libtrace.a svg/libspsvg.a widgets/libspwidgets.a display/libspdisplay.a helper/libspchelp.a libcroco/libcroco.a libnrtype/libnrtype.a libnr/libnr.a libavoid/libavoid.a livarot/libvarot.a ui/view/libuiview.a ui/libui.a ui/widget/libuiwidget.a extension/libextension.a extension/implementation/libimplementation.a extension/internal/libinternal.a extension/script/libscript.a xml/libspxml.a util/libinkutil.a io/libio.a inkjar/libinkjar.a libinkpost.a debug/libinkdebug.a -L/usr/nekoware/lib -L/usr/nekoware//lib -lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lpangomm-1.4 -lglibmm-2.4 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lxslt -lxml2 -lz -liconv -lm -lsigc-2.0 -lgthread-2.0 -lpthread -lglib-2.0 -lintl -lpng -lz -lpopt -L/usr/nekoware/lib -lgnomevfs-2 -lbonobo-2 -lgconf-2 -lbonobo-activation -lORBit-2 -lm -lgmodule-2.0 -lgthread-2.0 -lpthread -lglib-2.0 -lintl -rpath /usr/nekoware/lib -L/usr/nekoware/lib -lXft -lfreetype -lz -lXrender -lX11 -lfontconfig -L/usr/nekoware/lib -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -L/usr/nekoware/lib -rpath /usr/nekoware/lib -lfreetype -lz -lgc g++ -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -g -O2 -Wa,-xgot -o inkscape --export-dynamic main.o -L/usr/nekoware/lib libinkpre.a application/libinkapp.a ui/dialog/libuidialog.a dialogs/libspdialogs.a dom/libdom.a jabber_whiteboard/libjabber_whiteboard.a trace/libtrace.a svg/libspsvg.a widgets/libspwidgets.a display/libspdisplay.a helper/libspchelp.a libcroco/libcroco.a libnrtype/libnrtype.a libnr/libnr.a libavoid/libavoid.a livarot/libvarot.a ui/view/libuiview.a ui/libui.a ui/widget/libuiwidget.a extension/libextension.a extension/implementation/libimplementation.a extension/internal/libinternal.a extension/script/libscript.a xml/libspxml.a util/libinkutil.a io/libio.a inkjar/libinkjar.a libinkpost.a debug/libinkdebug.a -L/usr/nekoware//lib /usr/nekoware/lib/libgtkmm-2.4.so -L/usr/lib32 /usr/nekoware/lib/libgdkmm-2.4.so /usr/nekoware/lib/libatkmm-1.6.so /usr/nekoware/lib/libpangomm-1.4.so /usr/nekoware/lib/libglibmm-2.4.so /usr/nekoware/lib/libgtk-x11-2.0.so /usr/nekoware/lib/libgdk-x11-2.0.so /usr/nekoware//lib/libatk-1.0.so /usr/nekoware/lib/libgdk_pixbuf-2.0.so /usr/nekoware/lib/libpangocairo-1.0.so /usr/nekoware/lib/libcairo.so -lpng12 /usr/nekoware/lib/libglitz.so /usr/nekoware/lib/libxslt.so /usr/nekoware/lib/libsigc-2.0.so -lpng /usr/nekoware/lib/libgnomevfs-2.so -L/usr/local/lib -L/usr/local2/lib /usr/nekoware/lib/libxml2.so -lssl -lcrypto -lgen /usr/nekoware/lib/libbonobo-2.so /usr/nekoware/lib/libgconf-2.so /usr/nekoware/lib/libbonobo-activation.so /usr/nekoware/lib/libORBitCosNaming-2.so -lfastm /usr/nekoware/lib/libORBit-2.so /usr/nekoware/lib/libpopt.so /usr/nekoware/lib/libgthread-2.0.so -lpthread /usr/nekoware/lib/libXft.so /usr/nekoware/lib/libXrender.so -lX11 /usr/nekoware/lib/libfontconfig.so /usr/nekoware/lib/libexpat.so /usr/nekoware/lib/libpangoft2-1.0.so /usr/nekoware/lib/libpango-1.0.so -lm /usr/nekoware/lib/libgobject-2.0.so /usr/nekoware/lib/libgmodule-2.0.so /usr/nekoware/lib/libglib-2.0.so /usr/nekoware/lib/libintl.so /usr/nekoware/lib/libiconv.so -lc /usr/nekoware/lib/libfreetype.so -lz /usr/nekoware/lib/libgc.so -ldl -Wl,-rpath -Wl,/usr/nekoware/lib:/usr/nekoware//lib ld32: WARNING 84 : dom/libdom.a is not used for resolving any symbol. ld32: WARNING 84 : jabber_whiteboard/libjabber_whiteboard.a is not used for resolving any symbol. ld32: WARNING 84 : inkjar/libinkjar.a is not used for resolving any symbol. ld32: WARNING 84 : /usr/nekoware/lib/libgtkmm-2.4.so is not used for resolving any symbol. ld32: WARNING 84 : /usr/nekoware/lib/libxslt.so is not used for resolving any symbol. ld32: WARNING 84 : /usr/lib32/libgen.so is not used for resolving any symbol. ld32: WARNING 84 : /usr/nekoware/lib/libXft.so is not used for resolving any symbol. ld32: WARNING 84 : /usr/lib32/libdl.so is not used for resolving any symbol. ld32: ERROR 33 : Unresolved text symbol "Gtk::Main::Main(int*, char***, bool)" -- 1st referenced by main.o. Use linker option -v to see when and which objects, archives and dsos are loaded. ld32: ERROR 33 : Unresolved text symbol "Gtk::Main::run()" -- 1st referenced by main.o. Use linker option -v to see when and which objects, archives and dsos are loaded. ld32: ERROR 33 : Unresolved text symbol "Gtk::Main::~Main()" -- 1st referenced by main.o. Use linker option -v to see when and which objects, archives and dsos are loaded. ld32: ERROR 33 : Unresolved text symbol "Glib::ustring::ustring()" -- 1st referenced by libinkpre.a(file.o). Use linker option -v to see when and which objects, archives and dsos are loaded. ld32: ERROR 33 : Unresolved text symbol "Glib::ustring::operator=(char const*)" -- 1st referenced by libinkpre.a(file.o). Use linker option -v to see when and which objects, archives and dsos are loaded. [many many lines skipped] ld32: ERROR 33 : Unresolved text symbol "virtual thunk to Gtk::Adjustment::~Adjustment()" -- 1st referenced by extension/libextension.a(parameter.o). Use linker option -v to see when and which objects, archives and dsos are loaded. ld32: INFO 152: Output file removed because of error. collect2: ld returned 2 exit status gmake[2]: *** [inkscape] Error 1 gmake[2]: Leaving directory `/usr/people/voidfoo/devel/inkscape/inkscape_gcc/build_gcc/src' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/people/voidfoo/devel/inkscape/inkscape_gcc/build_gcc' gmake: *** [all] Error 2 --- end pasting error msg ---
Thank you very much!
diff -ru inkscape-20051109-0840/src/approx-equal.h inkscape_irix/src/approx-equal.h --- inkscape-20051109-0840/src/approx-equal.h 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/approx-equal.h 2005-11-09 09:54:18.400619200 -0800 @@ -1,7 +1,11 @@ #ifndef __APROX_EQUAL_H__ #define __APROX_EQUAL_H__
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <math.h> +#else #include <cmath> +#endif
inline bool approx_equal(double const a, double const b) { diff -ru inkscape-20051109-0840/src/dialogs/clonetiler.cpp inkscape_irix/src/dialogs/clonetiler.cpp --- inkscape-20051109-0840/src/dialogs/clonetiler.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/dialogs/clonetiler.cpp 2005-11-09 12:02:36.209770800 -0800 @@ -1157,9 +1157,9 @@ power = 1 + gamma_picked;
val = pow (val, power);
r = pow (r, power);
g = pow (g, power);
b = pow (b, power);
r = pow ((double)r, power);
g = pow ((double)g, power);
b = pow ((double)b, power); } if (invert_picked) {
diff -ru inkscape-20051109-0840/src/dialogs/export.cpp inkscape_irix/src/dialogs/export.cpp --- inkscape-20051109-0840/src/dialogs/export.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/dialogs/export.cpp 2005-11-09 11:26:09.770456720 -0800 @@ -1193,7 +1193,7 @@ sp_export_bbox_equal(NR::Rect &one, NR::Rect &two) { // FIXME: make this an NR::Rect method
- double epsilon = 1.0 / pow (10, EXPORT_COORD_PRECISION);
- double epsilon = 1.0 / pow ((float)10, EXPORT_COORD_PRECISION); return ( (fabs(one.min()[NR::X] - two.min()[NR::X]) < epsilon) && (fabs(one.min()[NR::Y] - two.min()[NR::Y]) < epsilon) &&
diff -ru inkscape-20051109-0840/src/dialogs/input.cpp inkscape_irix/src/dialogs/input.cpp --- inkscape-20051109-0840/src/dialogs/input.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/dialogs/input.cpp 2005-11-09 11:49:44.936827440 -0800 @@ -27,6 +27,9 @@ #include "../prefs-utils.h"
#include "input.h" +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <string> +#endif
static GtkWidget *dlg = NULL; static win_data wd; diff -ru inkscape-20051109-0840/src/dialogs/layer-properties.cpp inkscape_irix/src/dialogs/layer-properties.cpp --- inkscape-20051109-0840/src/dialogs/layer-properties.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/dialogs/layer-properties.cpp 2005-11-09 11:54:38.901811920 -0800 @@ -122,7 +122,11 @@ destroy_(); Glib::signal_idle().connect( sigc::bind_return( +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + sigc::bind(sigc::ptr_fun<void *, void>(&::operator delete), this), +#else sigc::bind(sigc::ptr_fun(&::operator delete), this), +#endif false ) ); diff -ru inkscape-20051109-0840/src/dialogs/unclump.cpp inkscape_irix/src/dialogs/unclump.cpp --- inkscape-20051109-0840/src/dialogs/unclump.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/dialogs/unclump.cpp 2005-11-09 12:03:57.273043600 -0800 @@ -14,6 +14,9 @@
#include <map> #include <algorithm> +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +using namespace std; +#endif
#include "selection.h" #include "sp-object.h" diff -ru inkscape-20051109-0840/src/extension/error-file.cpp inkscape_irix/src/extension/error-file.cpp --- inkscape-20051109-0840/src/extension/error-file.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/extension/error-file.cpp 2005-11-09 12:59:27.343672080 -0800 @@ -43,7 +43,11 @@ probably good to check anyway). */ ErrorFileNotice::ErrorFileNotice (void) : +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + MessageDialog( +#else Gtk::MessageDialog::MessageDialog( +#endif "", /* message */ false, /* use markup */ Gtk::MESSAGE_WARNING, /* dialog type */ diff -ru inkscape-20051109-0840/src/extension/internal/bluredge.cpp inkscape_irix/src/extension/internal/bluredge.cpp --- inkscape-20051109-0840/src/extension/internal/bluredge.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/extension/internal/bluredge.cpp 2005-11-09 12:51:16.337447760 -0800 @@ -72,7 +72,9 @@ item != items.end(); item++) { SPItem * spitem = *item;
+#ifdef __GNUC__ Inkscape::XML::Node * new_items[steps]; +#endif Inkscape::XML::Node * new_group = sp_repr_new("svg:g"); (SP_OBJECT_REPR(spitem)->parent())->appendChild(new_group); /** \todo Need to figure out how to get from XML::Node to SPItem */ @@ -86,14 +88,26 @@ for (int i = 0; i < steps; i++) { double offset = (width / (float)(steps - 1) * (float)i)
(width / 2.0);
new_items[i] = (SP_OBJECT_REPR(spitem))->duplicate();
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + SPItem * item_i = (SPItem *)(SP_OBJECT_REPR(spitem))->duplicate();
new_items.push_back(item_i);
SPCSSAttr * css = sp_repr_css_attr(new_items[i], "style");
SPCSSAttr * css = sp_repr_css_attr((Inkscape::XML::Node
*)item_i, "style"); sp_repr_css_set_property(css, "opacity", opacity_string);
sp_repr_css_change(new_items[i], css, "style");
sp_repr_css_change((Inkscape::XML::Node *)item_i, css,
"style");
new_group->appendChild(new_items[i]);
new_group->appendChild((Inkscape::XML::Node *)item_i);
selection->add(item_i);
+#else
new_items[i] = (SPItem
*)(SP_OBJECT_REPR(spitem))->duplicate();
SPCSSAttr * css = sp_repr_css_attr((Inkscape::XML::Node
*)new_items[i], "style");
sp_repr_css_set_property(css, "opacity", opacity_string);
sp_repr_css_change((Inkscape::XML::Node *)new_items[i],
css, "style");
new_group->appendChild((Inkscape::XML::Node
*)new_items[i]); selection->add(new_items[i]); +#endif sp_selected_path_to_curves();
if (offset < 0.0) {
diff -ru inkscape-20051109-0840/src/extension/prefdialog.cpp inkscape_irix/src/extension/prefdialog.cpp --- inkscape-20051109-0840/src/extension/prefdialog.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/extension/prefdialog.cpp 2005-11-09 13:01:36.553433040 -0800 @@ -18,7 +18,11 @@ namespace Extension {
PrefDialog::PrefDialog (Glib::ustring name, Gtk::Widget * controls) : +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + Dialog(name + _(" Preferences"), true, true) +#else Gtk::Dialog::Dialog(name + _(" Preferences"), true, true) +#endif { this->get_vbox()->pack_start(*controls, true, true, 5);
diff -ru inkscape-20051109-0840/src/inkscape-stock.cpp inkscape_irix/src/inkscape-stock.cpp --- inkscape-20051109-0840/src/inkscape-stock.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/inkscape-stock.cpp 2005-11-09 09:21:18.576598000 -0800 @@ -32,12 +32,21 @@
#include "inkscape-stock.h"
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +typedef struct +#else static struct StockIcon +#endif { const char *name; const char *filename;
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +} StockIcon; +static const StockIcon stock_icons[] = { +#else } const stock_icons[] = { +#endif /*stroke style */ //{INKSCAPE_STOCK_JOIN_MITER, "join_miter.xpm" }, //{INKSCAPE_STOCK_JOIN_ROUND, "join_round.xpm" }, @@ -127,10 +136,17 @@ //{INKSCAPE_STOCK_PROPERTIES_FILL_PAGE, "properties_fill.xpm" }, //{INKSCAPE_STOCK_PROPERTIES_STROKE_PAINT_PAGE, "properties_stroke.xpm" }, //{INKSCAPE_STOCK_PROPERTIES_STROKE_PAGE, "properties_stroke.xpm" }, +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730
- {"",""},
+#endif
};
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +static gint stock_icon_count = (sizeof (stock_icons) - 1) / sizeof (*stock_icons); +#else static gint stock_icon_count = sizeof (stock_icons) / sizeof (*stock_icons); +#endif static gboolean stock_initialized = FALSE;
void diff -ru inkscape-20051109-0840/src/io/sys.cpp inkscape_irix/src/io/sys.cpp --- inkscape-20051109-0840/src/io/sys.cpp 2005-11-09 08:40:14.000000000 -0800 +++ inkscape_irix/src/io/sys.cpp 2005-11-09 13:23:55.370001040 -0800 @@ -48,7 +48,16 @@
extern guint update_in_progress;
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <stdarg.h> +int dumpOne, dumpMk; +void DEBUG_MESSAGE(int narg, ...) {
va_list ap;
va_start(ap, narg);
va_end(ap);
+} +#else #define DEBUG_MESSAGE(key, ...) \ {\ gint dump = prefs_get_int_attribute_limited("options.bulia", #key, 0, 0, 1);\ @@ -74,7 +83,7 @@ gtk_widget_show_all( dialog );\ }\ }
+#endif
diff -ru inkscape-20051109-0840/src/isnan.h inkscape_irix/src/isnan.h --- inkscape-20051109-0840/src/isnan.h 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/isnan.h 2005-11-09 09:48:31.187455840 -0800 @@ -28,6 +28,8 @@
#if defined(__isnan) # define isNaN(_a) (__isnan(_a)) /* MacOSX/Darwin definition < 10.4 */ +#elif defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +# define isNaN(_a) (::isnan(_a)) /* IRIX MIPSpro */ #elif defined(WIN32) || defined(_isnan) # define isNaN(_a) (_isnan(_a)) /* Win32 definition */ #elif defined(isnan) || defined(__FreeBSD__) @@ -43,6 +45,8 @@
#if defined(__isfinite) # define isFinite(_a) (__isfinite(_a)) /* MacOSX/Darwin definition < 10.4 */ +#elif defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +# define isFinite(_a) (finite(_a)) /* IRIX MIPSpro */ #elif defined(isfinite) # define isFinite(_a) (isfinite(_a)) #else diff -ru inkscape-20051109-0840/src/libavoid/makepath.cpp inkscape_irix/src/libavoid/makepath.cpp --- inkscape-20051109-0840/src/libavoid/makepath.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/libavoid/makepath.cpp 2005-11-09 14:19:52.346046320 -0800 @@ -30,13 +30,17 @@ #include "libavoid/geometry.h" #include "libavoid/connector.h" #include "libavoid/graph.h" +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <algorithm> +using namespace std; +#endif #include <vector> #include <math.h>
namespace Avoid {
-static const double PI = 4.0 * atan(1); +static const double PI = 4.0 * atan((double)1);
double segmt_penalty = 0; double angle_penalty = 0; diff -ru inkscape-20051109-0840/src/libavoid/timer.cpp inkscape_irix/src/libavoid/timer.cpp --- inkscape-20051109-0840/src/libavoid/timer.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/libavoid/timer.cpp 2005-11-09 14:21:57.153665440 -0800 @@ -20,7 +20,12 @@
- */
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <stdio.h> +#include <time.h> +#else #include <cstdio> +#endif #include <cstdlib> #include <cassert> using std::abort; diff -ru inkscape-20051109-0840/src/libavoid/visibility.cpp inkscape_irix/src/libavoid/visibility.cpp --- inkscape-20051109-0840/src/libavoid/visibility.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/libavoid/visibility.cpp 2005-11-09 15:00:56.561930320 -0800 @@ -172,7 +172,7 @@ // SWEEP CODE //
-static const double PI = 4.0 * atan(1); +static const double PI = 4.0 * atan((double)1); static VertInf *centerInf; static Point centerPoint; static VertID centerID; @@ -273,7 +273,7 @@ double obsAngle; };
-typedef std::set<EdgePair > EdgeSet; +typedef std::set<EdgePair> EdgeSet;
static bool ppCompare(PointPair& pp1, PointPair& pp2) @@ -594,8 +594,8 @@ EdgeSet::iterator ePtr; if (prevDir == BEHIND) {
//ePtr = e.find(prevPair);
ePtr = std::find(e.begin(), e.end(), prevPair);
ePtr = e.find(prevPair);
//ePtr = std::find(e.begin(), e.end(), prevPair); if (ePtr != e.end()) { e.erase(ePtr);
@@ -618,8 +618,8 @@
if (nextDir == BEHIND) {
//ePtr = e.find(nextPair);
ePtr = std::find(e.begin(), e.end(), nextPair);
ePtr = e.find(nextPair);
//ePtr = std::find(e.begin(), e.end(), nextPair); if (ePtr != e.end()) { e.erase(ePtr);
diff -ru inkscape-20051109-0840/src/libnr/nr-point-l.h inkscape_irix/src/libnr/nr-point-l.h --- inkscape-20051109-0840/src/libnr/nr-point-l.h 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/libnr/nr-point-l.h 2005-11-09 09:06:24.345911280 -0800 @@ -60,7 +60,10 @@ ICoord operator[](Dim2 d) const throw() { return _pt[d]; } ICoord &operator[](Dim2 d) throw() { return _pt[d]; }
- __attribute__((__deprecated__)) operator NRPointL() const {
+#ifdef __GNUC__
- __attribute__((__deprecated__)) +#endif
operator NRPointL() const { NRPointL nrp; nrp.x = _pt[X]; nrp.y = _pt[Y];
diff -ru inkscape-20051109-0840/src/libnrtype/FontFactory.h inkscape_irix/src/libnrtype/FontFactory.h --- inkscape-20051109-0840/src/libnrtype/FontFactory.h 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/libnrtype/FontFactory.h 2005-11-09 10:14:50.449476240 -0800 @@ -9,7 +9,12 @@
#include <functional> #include <algorithm> +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <hash_map> +namespace __gnu_cxx = std; +#else #include <ext/hash_map> +#endif
#ifdef HAVE_CONFIG_H # include <config.h> diff -ru inkscape-20051109-0840/src/libnrtype/Layout-TNG-Compute.cpp inkscape_irix/src/libnrtype/Layout-TNG-Compute.cpp --- inkscape-20051109-0840/src/libnrtype/Layout-TNG-Compute.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/libnrtype/Layout-TNG-Compute.cpp 2005-11-09 14:14:48.823191840 -0800 @@ -22,10 +22,21 @@ namespace Inkscape { namespace Text {
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <stdarg.h> +#define __IFDEBUG +void TRACE(char *format, ...) {
- va_list ap;
- va_start(ap, format);
- va_end(ap);
+} +#else //#define IFDEBUG(...) __VA_ARGS__ #define IFDEBUG(...)
#define TRACE(format, ...) IFDEBUG(g_print(format, ## __VA_ARGS__),g_print("\n")) +#endif
// ******* enum conversion tables static Layout::EnumConversionItem const enum_convert_spstyle_direction_to_pango_direction[] = { @@ -282,7 +293,13 @@ double soft_hyphen_glyph_width = 0.0; bool soft_hyphen_in_word = false; bool is_soft_hyphen = false; +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#ifdef __IFDEBUG
int char_count = 0;
+#endif +#else IFDEBUG(int char_count = 0); +#endif
// if we're not at the start of the span we need to pre-init
glyph_index span->start_glyph_index = 0; @@ -297,7 +314,11 @@
if (char_attributes.is_mandatory_break) { *last_emergency_break_span = *last_break_span = *span;
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#ifdef __IFDEBUG TRACE("span %d end of para; width = %f chars = %d", span->start.iter_span - para.unbroken_spans.begin(), span->width, char_count); +#endif +#endif return false; }
@@ -330,7 +351,13 @@ if (char_attributes.is_white) char_width += text_source->style->word_spacing.computed; span->width += char_width; +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#ifdef __IFDEBUG
char_count++;
+#endif +#else IFDEBUG(char_count++); +#endif
if (char_attributes.is_white) { span->whitespace_count++;
@@ -345,12 +372,20 @@ span->end.increment();
if (span->width > maximum_width &&
!char_attributes.is_white) { // whitespaces don't matter, we can put as many as we want at eol +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#ifdef __IFDEBUG TRACE("span %d exceeded scanrun; width = %f chars = %d", span->start.iter_span - para.unbroken_spans.begin(), span->width, char_count); +#endif +#endif return false; }
} while (span->end.char_byte != 0); // while we haven't
wrapped to the next span +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#ifdef __IFDEBUG TRACE("fitted span %d width = %f chars = %d", span->start.iter_span - para.unbroken_spans.begin(), span->width, char_count); +#endif +#endif return true; }
diff -ru inkscape-20051109-0840/src/libnrtype/RasterFont.h inkscape_irix/src/libnrtype/RasterFont.h --- inkscape-20051109-0840/src/libnrtype/RasterFont.h 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/libnrtype/RasterFont.h 2005-11-09 12:18:18.856245600 -0800 @@ -7,7 +7,12 @@ #ifndef my_raster_font #define my_raster_font
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <hash_map> +namespace __gnu_cxx = std; +#else #include <ext/hash_map> +#endif
#include <libnr/nr-forward.h> #include <libnrtype/nrtype-forward.h> diff -ru inkscape-20051109-0840/src/libnrtype/font-instance.h inkscape_irix/src/libnrtype/font-instance.h --- inkscape-20051109-0840/src/libnrtype/font-instance.h 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/libnrtype/font-instance.h 2005-11-09 10:15:21.420976640 -0800 @@ -1,7 +1,12 @@ #ifndef SEEN_LIBNRTYPE_FONT_INSTANCE_H #define SEEN_LIBNRTYPE_FONT_INSTANCE_H
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <hash_map> +namespace __gnu_cxx = std; +#else #include <ext/hash_map> +#endif #include <pango/pango-types.h> #include <pango/pango-font.h> #include <require-config.h> diff -ru inkscape-20051109-0840/src/livarot/int-line.cpp inkscape_irix/src/livarot/int-line.cpp --- inkscape-20051109-0840/src/livarot/int-line.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/livarot/int-line.cpp 2005-11-09 15:02:35.429689680 -0800 @@ -12,7 +12,11 @@ #include <glib/gmem.h> #include <cstdio> #include <cstring> +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <math.h> +#else #include <cmath> +#endif #include "livarot/LivarotDefs.h" #include "livarot/int-line.h" #include "livarot/float-line.h" diff -ru inkscape-20051109-0840/src/marker-status.h inkscape_irix/src/marker-status.h --- inkscape-20051109-0840/src/marker-status.h 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/marker-status.h 2005-11-09 09:24:01.493283920 -0800 @@ -1,7 +1,11 @@ #ifndef SEEN_MARKER_DEBUG_H #define SEEN_MARKER_DEBUG_H
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +void marker_status(char const *format, ...); +#else void marker_status(char const *format, ...) __attribute__((format(__printf__, 1, 2))); +#endif
#endif /* !SEEN_MARKER_DEBUG_H */
diff -ru inkscape-20051109-0840/src/object-edit.cpp inkscape_irix/src/object-edit.cpp --- inkscape-20051109-0840/src/object-edit.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/object-edit.cpp 2005-11-09 09:27:19.650382088 -0800 @@ -936,7 +936,7 @@ double r0; sp_spiral_get_polar (spiral, spiral->t0, &r0, NULL); spiral->rad = rad_new;
spiral->t0 = pow (r0 / spiral->rad, 1/spiral->exp);
spiral->t0 = pow ((float)r0 / spiral->rad, 1/spiral->exp); } if (!isFinite(spiral->t0)) spiral->t0 = 0.0; spiral->t0 = CLAMP (spiral->t0, 0.0, 0.999);
diff -ru inkscape-20051109-0840/src/sp-flowregion.cpp inkscape_irix/src/sp-flowregion.cpp --- inkscape-20051109-0840/src/sp-flowregion.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/sp-flowregion.cpp 2005-11-09 09:51:31.584816160 -0800 @@ -122,7 +122,11 @@ SPFlowregion *group=(SPFlowregion *)object; for (std::vector<Shape*>::iterator it = group->computed.begin() ; it != group->computed.end() ; it++) delete *it; +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + group->computed.~vector(); +#else group->computed.~vector<Shape*>(); +#endif }
static void diff -ru inkscape-20051109-0840/src/sp-guide.h inkscape_irix/src/sp-guide.h --- inkscape-20051109-0840/src/sp-guide.h 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/sp-guide.h 2005-11-09 10:59:15.757378080 -0800 @@ -15,7 +15,12 @@ #include "display/display-forward.h" #include "libnr/nr-point.h" #include "sp-object.h" +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +/* forward declaration not working with MIPSpro */ +#include "sp-guide-attachment.h" +#else class SPGuideAttachment; +#endif
#define SP_TYPE_GUIDE (sp_guide_get_type()) #define SP_GUIDE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_GUIDE, SPGuide)) diff -ru inkscape-20051109-0840/src/sp-item-rm-unsatisfied-cns.cpp inkscape_irix/src/sp-item-rm-unsatisfied-cns.cpp --- inkscape-20051109-0840/src/sp-item-rm-unsatisfied-cns.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/sp-item-rm-unsatisfied-cns.cpp 2005-11-09 11:00:21.437348320 -0800 @@ -9,7 +9,11 @@ #include <sp-guide-constraint.h> #include <sp-item.h> #include <sp-item-rm-unsatisfied-cns.h> +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +using namespace std; +#else using std::vector; +#endif
void sp_item_rm_unsatisfied_cns(SPItem &item) { diff -ru inkscape-20051109-0840/src/sp-item-update-cns.cpp inkscape_irix/src/sp-item-update-cns.cpp --- inkscape-20051109-0840/src/sp-item-update-cns.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/sp-item-update-cns.cpp 2005-11-09 09:57:10.343259120 -0800 @@ -1,5 +1,11 @@ #include "sp-item-update-cns.h" #include <vector> +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <algorithm> +using namespace std; +#else +using std::vector; +#endif
#include <approx-equal.h> #include <libnr/nr-point.h> @@ -9,7 +15,6 @@ #include "sp-guide-constraint.h" #include <sp-guide.h> #include <sp-item.h> -using std::vector;
void sp_item_update_cns(SPItem &item, SPDesktop const &desktop) { diff -ru inkscape-20051109-0840/src/sp-item.h inkscape_irix/src/sp-item.h --- inkscape-20051109-0840/src/sp-item.h 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/sp-item.h 2005-11-09 11:01:39.740721200 -0800 @@ -26,7 +26,14 @@ #include <vector>
namespace Inkscape { class URIReference; } +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +/* forward declaration not working with MIPSpro */ +#include "sp-guide-constraint.h" +#else class SPGuideConstraint; +#endif
enum { SP_EVENT_INVALID, diff -ru inkscape-20051109-0840/src/sp-metadata.cpp inkscape_irix/src/sp-metadata.cpp --- inkscape-20051109-0840/src/sp-metadata.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/sp-metadata.cpp 2005-11-09 10:06:52.149513680 -0800 @@ -24,6 +24,7 @@ #include "sp-item-group.h"
#define noDEBUG_METADATA +#ifdef __GUNC__ #ifdef DEBUG_METADATA # define debug(f, a...) { g_print("%s(%d) %s:", \ __FILE__,__LINE__,__FUNCTION__); \ @@ -33,6 +34,7 @@ #else # define debug(f, a...) /**/ #endif +#endif
/* Metadata base class */
@@ -86,7 +88,9 @@ static void sp_metadata_init (SPMetadata *metadata) { +#ifdef __GNUC__ debug("0x%08x",(unsigned int)metadata); +#endif }
namespace { @@ -114,7 +118,9 @@ { using Inkscape::XML::NodeSiblingIterator;
+#ifdef __GNUC__ debug("0x%08x",(unsigned int)object); +#endif
/* clean up our mess from earlier versions; elements under
rdf:RDF should not * have id= attributes... */ @@ -135,7 +141,9 @@ static void sp_metadata_release (SPObject *object) { +#ifdef __GNUC__ debug("0x%08x",(unsigned int)object); +#endif
/* handle ourself */
@@ -149,8 +157,10 @@ static void sp_metadata_set (SPObject *object, unsigned int key, const gchar *value) { +#ifdef __GNUC__ debug("0x%08x %s(%u): '%s'",(unsigned int)object, sp_attribute_name(key),key,value); +#endif SPMetadata * metadata;
metadata = SP_METADATA (object);
@@ -166,7 +176,9 @@ static void sp_metadata_update(SPObject *object, SPCtx *ctx, guint flags) { +#ifdef __GNUC__ debug("0x%08x",(unsigned int)object); +#endif //SPMetadata *metadata = SP_METADATA(object);
if (flags & (SP_OBJECT_MODIFIED_FLAG |
SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -186,7 +198,9 @@ static Inkscape::XML::Node * sp_metadata_write(SPObject *object, Inkscape::XML::Node *repr, guint flags) { +#ifdef __GNUC__ debug("0x%08x",(unsigned int)object); +#endif //SPMetadata *metadata = SP_METADATA(object);
// only create a repr when we're writing out an Inkscape SVG
diff -ru inkscape-20051109-0840/src/sp-object.cpp inkscape_irix/src/sp-object.cpp --- inkscape-20051109-0840/src/sp-object.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/sp-object.cpp 2005-11-09 10:09:35.425898000 -0800 @@ -61,6 +61,7 @@ #define noSP_OBJECT_DEBUG
#ifdef SP_OBJECT_DEBUG +#ifdef __GNUC__ # define debug(f, a...) { g_print("%s(%d) %s:", \ __FILE__,__LINE__,__FUNCTION__); \ g_print(f, ## a); \ @@ -69,6 +70,7 @@ #else # define debug(f, a...) /**/ #endif +#endif
static void sp_object_class_init(SPObjectClass *klass); static void sp_object_init(SPObject *object); @@ -182,7 +184,9 @@ static void sp_object_init(SPObject *object) { +#ifdef __GNUC__ debug("id=%x, typename=%s",object, g_type_name_from_instance((GTypeInstance*)object)); +#endif
object->hrefcount = 0; object->_total_hrefcount = 0;
@@ -739,7 +743,9 @@ */ static void sp_object_release(SPObject *object) { +#ifdef __GNUC__ debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object)); +#endif while (object->children) { sp_object_detach(object, object->children); } @@ -756,7 +762,9 @@ static void sp_object_remove_child(SPObject *object, Inkscape::XML::Node *child) { +#ifdef __GNUC__ debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object)); +#endif SPObject *ochild = sp_object_get_child_by_repr(object, child); g_return_if_fail(ochild != NULL); sp_object_detach(object, ochild); @@ -792,7 +800,9 @@ sp_object_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) { /* Nothing specific here */ +#ifdef __GNUC__ debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object)); +#endif
sp_object_read_attr(object, "xml:space"); sp_object_read_attr(object, "inkscape:label");
@@ -813,7 +823,9 @@ void sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned) { +#ifdef __GNUC__ debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object)); +#endif
g_assert(object != NULL); g_assert(SP_IS_OBJECT(object));
diff -ru inkscape-20051109-0840/src/splivarot.cpp inkscape_irix/src/splivarot.cpp --- inkscape-20051109-0840/src/splivarot.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/splivarot.cpp 2005-11-09 10:21:02.115572720 -0800 @@ -180,8 +180,13 @@ // extract the livarot Paths from the source objects // also get the winding rule specified in the style int nbOriginaux = g_slist_length (il); +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + Path **originaux; (*originaux) = new (Path *)[nbOriginaux];
- FillRule *origWind = new FillRule[nbOriginaux];
+#else Path *originaux[nbOriginaux]; FillRule origWind[nbOriginaux]; +#endif int curOrig; { curOrig = 0; @@ -395,6 +400,10 @@ delete theShapeA; delete theShapeB; for (int i = 0; i < nbOriginaux; i++) delete originaux[i]; +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + delete (*originaux);
- delete origWind;
+#endif if (res->descr_cmd.size() <= 1) { diff -ru inkscape-20051109-0840/src/streams-jar.cpp inkscape_irix/src/streams-jar.cpp --- inkscape-20051109-0840/src/streams-jar.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/streams-jar.cpp 2005-11-09 10:52:43.501003680 -0800 @@ -30,13 +30,20 @@ #endif //guint32 crc = check_crc(data, flags); +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + gchar *filename = new gchar[filename_length+1]; +#else gchar filename[filename_length+1]; +#endif _urihandle->read(filename, filename_length); filename[filename_length] = '\0';
#ifdef DEBUG_STREAMS std::printf("Filename is %s\n", filename); #endif +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + delete filename; +#endif } catch (std::exception& e) { throw JarHeaderException(); @@ -92,8 +99,15 @@ int ret;
if ((ret = do_consume_and_inflate(nbytes)) == EOF && eflen > 0) {
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + guint8 *efbuf = new guint8[eflen]; +#else guint8 efbuf[eflen]; +#endif _urihandle->read(efbuf, eflen); +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + delete efbuf; +#endif return 1; } @@ -102,13 +116,24 @@
int JarBuffer::consume_uncompressed(int nbytes) { +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + guint8 *data = new guint8[nbytes];
- if (consume(data, nbytes) == EOF) {
delete data;
return EOF;
- }
+#else guint8 data[nbytes]; if (consume(data, nbytes) == EOF) return EOF; +#endif copy_to_get(data, nbytes); compressed_left -= nbytes;
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + delete data; +#endif return nbytes; }
diff -ru inkscape-20051109-0840/src/streams-zlib.cpp inkscape_irix/src/streams-zlib.cpp --- inkscape-20051109-0840/src/streams-zlib.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/streams-zlib.cpp 2005-11-09 10:54:22.835780080 -0800 @@ -105,14 +105,25 @@
int ZlibBuffer::do_consume_and_inflate(int nbytes) { +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + guint8 *buf = new guint8[nbytes];
- if (consume(buf, nbytes) == EOF) {
delete buf;
return EOF;
- }
+#else guint8 buf[nbytes]; if (consume(buf, nbytes) == EOF) return EOF; +#endif GByteArray *gba = inflate(buf, nbytes); copy_to_get(gba->data, gba->len); g_byte_array_free(gba, TRUE); +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 + delete buf; +#endif return 1; }
diff -ru inkscape-20051109-0840/src/svg/round.cpp inkscape_irix/src/svg/round.cpp --- inkscape-20051109-0840/src/svg/round.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/svg/round.cpp 2005-11-09 10:55:05.101353280 -0800 @@ -42,6 +42,6 @@ double rround(double x, int k) { if (k==0) return rround(x);
- else return rround(x*pow(10,k)) / pow(10,k);
- else return rround(x*pow((float)10,k)) / pow((float)10,k);
}
diff -ru inkscape-20051109-0840/src/svg/svg-path.cpp inkscape_irix/src/svg/svg-path.cpp --- inkscape-20051109-0840/src/svg/svg-path.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/svg/svg-path.cpp 2005-11-09 15:07:14.954077440 -0800 @@ -520,7 +520,7 @@ { /* end of number */
val *= sign * pow (10, exp_sign * exp);
val *= sign * pow ((double)10, exp_sign * exp); if (ctx->rel) { /* Handle relative coordinates. This switch
statement attempts diff -ru inkscape-20051109-0840/src/ui/widget/unit-menu.cpp inkscape_irix/src/ui/widget/unit-menu.cpp --- inkscape-20051109-0840/src/ui/widget/unit-menu.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/ui/widget/unit-menu.cpp 2005-11-09 13:42:52.003756080 -0800 @@ -14,7 +14,11 @@ #endif
#include <map> +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <math.h> +#else #include <cmath> +#endif
#include "unit-menu.h"
diff -ru inkscape-20051109-0840/src/util/units.cpp inkscape_irix/src/util/units.cpp --- inkscape-20051109-0840/src/util/units.cpp 2005-11-09 08:40:15.000000000 -0800 +++ inkscape_irix/src/util/units.cpp 2005-11-09 13:47:58.358591760 -0800 @@ -2,7 +2,11 @@ # include <config.h> #endif
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +#include <math.h> +#else #include <cmath> +#endif #include <cerrno> #include <glib/gmessages.h> #include <glib.h> diff -ru inkscape-20051109-0840/src/widgets/desktop-widget.cpp inkscape_irix/src/widgets/desktop-widget.cpp --- inkscape-20051109-0840/src/widgets/desktop-widget.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_irix/src/widgets/desktop-widget.cpp 2005-11-09 15:24:06.354024320 -0800 @@ -25,6 +25,14 @@
#include <gtk/gtk.h>
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 730 +double round(double a) {
- if (a >= 0)
return (a+0.5);
- else return (a-0.5);
+} +#endif
#include "macros.h" #include "forward.h" #include "inkscape-private.h" @@ -258,7 +266,7 @@ gtk_container_add (GTK_CONTAINER (w), GTK_WIDGET (dtw->canvas));
// zoom status spinbutton
- dtw->zoom_status = gtk_spin_button_new_with_range
(log(SP_DESKTOP_ZOOM_MIN)/log(2), log(SP_DESKTOP_ZOOM_MAX)/log(2), 0.1);
- dtw->zoom_status = gtk_spin_button_new_with_range
(log(SP_DESKTOP_ZOOM_MIN)/log((double)2), log(SP_DESKTOP_ZOOM_MAX)/log((double)2), 0.1); gtk_tooltips_set_tip (dtw->tt, dtw->zoom_status, _("Zoom"), NULL); gtk_widget_set_size_request (dtw->zoom_status, STATUS_ZOOM_WIDTH, -1); gtk_entry_set_width_chars (GTK_ENTRY (dtw->zoom_status), 6); @@ -953,7 +961,7 @@ static gdouble sp_dtw_zoom_display_to_value (gdouble value) {
- return log (value / 100.0) / log (2);
- return log (value / 100.0) / log ((double)2);
}
static gint @@ -1093,7 +1101,7 @@ sp_desktop_widget_update_zoom (SPDesktopWidget *dtw) { g_signal_handlers_block_by_func (G_OBJECT (dtw->zoom_status), (gpointer)G_CALLBACK (sp_dtw_zoom_value_changed), dtw);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (dtw->zoom_status),
log(dtw->desktop->current_zoom()) / log(2));
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (dtw->zoom_status),
log(dtw->desktop->current_zoom()) / log((double)2)); g_signal_handlers_unblock_by_func (G_OBJECT (dtw->zoom_status), (gpointer)G_CALLBACK (sp_dtw_zoom_value_changed), dtw); }
diff -ru inkscape-20051109-0840/src/isnan.h inkscape_gcc/src/isnan.h --- inkscape-20051109-0840/src/isnan.h 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_gcc/src/isnan.h 2005-11-09 16:41:15.117038160 -0800 @@ -43,6 +43,8 @@
#if defined(__isfinite) # define isFinite(_a) (__isfinite(_a)) /* MacOSX/Darwin definition < 10.4 */ +#elif defined(__sgi) +# define isFinite(_a) (_isfinite(_a)) #elif defined(isfinite) # define isFinite(_a) (isfinite(_a)) #else diff -ru inkscape-20051109-0840/src/mod360.cpp inkscape_gcc/src/mod360.cpp --- inkscape-20051109-0840/src/mod360.cpp 2005-11-09 08:40:16.000000000 -0800 +++ inkscape_gcc/src/mod360.cpp 2005-11-09 16:33:44.849909600 -0800 @@ -8,6 +8,7 @@ double mod360(double const x) { double const m = fmod(x, 360.0); +#define isnan(_a) (_isnan(_a)) double const ret = ( isnan(m) ? 0.0 : ( m < 0
Jeremy,
I suggest that you build it with GCC and gcc-built tools. What I have done in the past is to get GCC from SGI's Freeware site: http://freeware.sgi.com/
These install to a location like /usr/freeware or something. What I have done with great success is to use a version of GCC and binutils installed at this location, to build and install gcc, binutils, automake, autoconf, gtk, gtkmm, etc, into their 'standard' location at /usr/local. It might be a good idea to use the new gcc and binutils to build another generation of themselves, just to make sure everything is correct.
Last time I checked, binutils still defaults to the standard Irix 'as' and 'ld,' so you will probably not want to force it to use Gnu's versions.
Eventually you can have a nice clean standard Gnu toolchain at /usr/local on your Irix box.
Ooops. I didn't describe this properly. The gist was supposed to be "build everything from source."
Bob