From: tweenk Date: Thu, 26 Feb 2009 21:28:12 +0000 (+0000) Subject: Patch from Lubomir Rintel: fixes for GCC 4.4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4cb9ed4c3d183554e888e636844f8e3c2e666c40;p=inkscape.git Patch from Lubomir Rintel: fixes for GCC 4.4 --- diff --git a/src/2geom/sbasis-math.cpp b/src/2geom/sbasis-math.cpp index e08023e84..d7045a3a9 100644 --- a/src/2geom/sbasis-math.cpp +++ b/src/2geom/sbasis-math.cpp @@ -37,13 +37,12 @@ #include <2geom/sbasis-math.h> //#define ZERO 1e-3 +#include +#include namespace Geom { - #include <2geom/d2-sbasis.h> -#include -#include //-|x|----------------------------------------------------------------------- /** Return the absolute value of a function pointwise. diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp index c8a76e4e6..dd96431f0 100644 --- a/src/dialogs/export.cpp +++ b/src/dialogs/export.cpp @@ -16,6 +16,9 @@ # include "config.h" #endif +// This has to be included prior to anything that includes setjmp.h, it croaks otherwise +#include + #include #include #include @@ -56,7 +59,6 @@ #include "io/sys.h" #include "helper/png-write.h" -#include #define SP_EXPORT_MIN_SIZE 1.0 @@ -1034,7 +1036,7 @@ create_progress_dialog (GtkObject *base, gchar *progress_text) { static gchar * filename_add_extension (const gchar *filename, const gchar *extension) { - gchar *dot; + const gchar *dot; dot = strrchr (filename, '.'); if ( !dot ) diff --git a/src/document.cpp b/src/document.cpp index fe6ce011b..2a9014e3e 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -800,7 +800,7 @@ Glib::ustring SPDocument::getLanguage() { } if ( NULL != document_language ) { - gchar *pos = strchr(document_language, '_'); + const char *pos = strchr(document_language, '_'); if ( NULL != pos ) { return Glib::ustring(document_language, pos - document_language); } diff --git a/src/dom/domimpl.cpp b/src/dom/domimpl.cpp index 10daa1582..e12f40714 100644 --- a/src/dom/domimpl.cpp +++ b/src/dom/domimpl.cpp @@ -28,6 +28,7 @@ */ +#include #include "domimpl.h" namespace org diff --git a/src/dom/io/domstream.cpp b/src/dom/io/domstream.cpp index bc3810de0..b38dd5329 100644 --- a/src/dom/io/domstream.cpp +++ b/src/dom/io/domstream.cpp @@ -34,6 +34,7 @@ * */ +#include #include #include diff --git a/src/dom/io/domstream.h b/src/dom/io/domstream.h index 7b999e317..0c60aca7a 100644 --- a/src/dom/io/domstream.h +++ b/src/dom/io/domstream.h @@ -30,7 +30,7 @@ */ - +#include #include namespace org diff --git a/src/dom/io/socket.cpp b/src/dom/io/socket.cpp index b800d7453..e39032040 100644 --- a/src/dom/io/socket.cpp +++ b/src/dom/io/socket.cpp @@ -35,6 +35,7 @@ #include // needed on Solaris 8 #endif +#include #include "socket.h" #include "dom/util/thread.h" diff --git a/src/dom/io/uristream.cpp b/src/dom/io/uristream.cpp index 0dc8423f4..3e47d99e1 100644 --- a/src/dom/io/uristream.cpp +++ b/src/dom/io/uristream.cpp @@ -30,6 +30,7 @@ #include "uristream.h" +#include #include diff --git a/src/dom/lsimpl.cpp b/src/dom/lsimpl.cpp index b3b3f0b20..6ee6d0883 100644 --- a/src/dom/lsimpl.cpp +++ b/src/dom/lsimpl.cpp @@ -33,6 +33,7 @@ #include "lsimpl.h" #include +#include namespace org { diff --git a/src/dom/svgreader.cpp b/src/dom/svgreader.cpp index ea4392f50..4584ba32f 100644 --- a/src/dom/svgreader.cpp +++ b/src/dom/svgreader.cpp @@ -38,6 +38,7 @@ #include "dom/ucd.h" #include "xmlreader.h" +#include #include diff --git a/src/dom/svgtypes.h b/src/dom/svgtypes.h index 9b3d1caf6..09ed00bb5 100644 --- a/src/dom/svgtypes.h +++ b/src/dom/svgtypes.h @@ -57,6 +57,7 @@ #include "dom/smil.h" +#include #include diff --git a/src/dom/xpathtoken.h b/src/dom/xpathtoken.h index 903900627..8683b2ee1 100644 --- a/src/dom/xpathtoken.h +++ b/src/dom/xpathtoken.h @@ -35,6 +35,7 @@ #include +#include #include namespace org diff --git a/src/io/gzipstream.cpp b/src/io/gzipstream.cpp index f19fd327d..ece0ddc67 100644 --- a/src/io/gzipstream.cpp +++ b/src/io/gzipstream.cpp @@ -14,6 +14,7 @@ */ #include "gzipstream.h" +#include #include #include diff --git a/src/io/inkscapestream.h b/src/io/inkscapestream.h index 67c51cc7f..9358b4d51 100644 --- a/src/io/inkscapestream.h +++ b/src/io/inkscapestream.h @@ -12,6 +12,7 @@ */ +#include #include namespace Inkscape diff --git a/src/libavoid/vertices.h b/src/libavoid/vertices.h index e82b163a6..1b0dcf3aa 100644 --- a/src/libavoid/vertices.h +++ b/src/libavoid/vertices.h @@ -27,6 +27,7 @@ #include #include #include +#include #include "libavoid/geomtypes.h" namespace Avoid { diff --git a/src/libnr/nr-matrix-fns.cpp b/src/libnr/nr-matrix-fns.cpp index f392f3213..c8eb986fa 100644 --- a/src/libnr/nr-matrix-fns.cpp +++ b/src/libnr/nr-matrix-fns.cpp @@ -1,4 +1,5 @@ #include +#include namespace NR { diff --git a/src/main.cpp b/src/main.cpp index bfee432ba..991a95add 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,6 +28,9 @@ #endif #include "path-prefix.h" +// This has to be included prior to anything that includes setjmp.h, it croaks otherwise +#include + #include #ifdef HAVE_IEEEFP_H @@ -114,8 +117,6 @@ using Inkscape::Extension::Internal::PrintWin32; #include "widgets/icon.h" #include "ui/widget/panel.h" - -#include #include enum { diff --git a/src/prefix.cpp b/src/prefix.cpp index 3af45269c..f1fa3c2cd 100644 --- a/src/prefix.cpp +++ b/src/prefix.cpp @@ -356,7 +356,8 @@ br_strndup (char *str, size_t size) char * br_extract_dir (const char *path) { - char *end, *result; + const char *end; + char *result; br_return_val_if_fail (path != (char*)NULL, (char*)NULL); @@ -391,7 +392,8 @@ br_extract_dir (const char *path) char * br_extract_prefix (const char *path) { - char *end, *tmp, *result; + const char *end; + char *tmp, *result; br_return_val_if_fail (path != (char*)NULL, (char*)NULL); diff --git a/src/sp-image.cpp b/src/sp-image.cpp index e23dddaf6..49350bd69 100644 --- a/src/sp-image.cpp +++ b/src/sp-image.cpp @@ -15,6 +15,9 @@ # include "config.h" #endif +// This has to be included prior to anything that includes setjmp.h, it croaks otherwise +#include + #include #include #include @@ -45,7 +48,6 @@ #include "libnr/nr-matrix-fns.h" #include "io/sys.h" -#include #if ENABLE_LCMS #include "color-profile-fns.h" #include "color-profile.h" diff --git a/src/xml/event.cpp b/src/xml/event.cpp index ded96e722..23251eac6 100644 --- a/src/xml/event.cpp +++ b/src/xml/event.cpp @@ -14,6 +14,7 @@ */ #include // g_assert() +#include #include "event.h" #include "event-fns.h"