summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2009-02-26 21:28:12 +0000
committertweenk <tweenk@users.sourceforge.net>2009-02-26 21:28:12 +0000
commitf1b7b6decc60830d3a0072f3287d63ef086c936e (patch)
tree2d237781196c25b0db77771215b02364f791156a
parentSpellcheck, snap and filter translation (diff)
downloadinkscape-f1b7b6decc60830d3a0072f3287d63ef086c936e.tar.gz
inkscape-f1b7b6decc60830d3a0072f3287d63ef086c936e.zip
Patch from Lubomir Rintel: fixes for GCC 4.4
(bzr r7380)
-rw-r--r--src/2geom/sbasis-math.cpp5
-rw-r--r--src/dialogs/export.cpp6
-rw-r--r--src/document.cpp2
-rw-r--r--src/dom/domimpl.cpp1
-rw-r--r--src/dom/io/domstream.cpp1
-rw-r--r--src/dom/io/domstream.h2
-rw-r--r--src/dom/io/socket.cpp1
-rw-r--r--src/dom/io/uristream.cpp1
-rw-r--r--src/dom/lsimpl.cpp1
-rw-r--r--src/dom/svgreader.cpp1
-rw-r--r--src/dom/svgtypes.h1
-rw-r--r--src/dom/xpathtoken.h1
-rw-r--r--src/io/gzipstream.cpp1
-rw-r--r--src/io/inkscapestream.h1
-rw-r--r--src/libavoid/vertices.h1
-rw-r--r--src/libnr/nr-matrix-fns.cpp1
-rw-r--r--src/main.cpp5
-rw-r--r--src/prefix.cpp6
-rw-r--r--src/sp-image.cpp4
-rw-r--r--src/xml/event.cpp1
20 files changed, 31 insertions, 12 deletions
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 <stdio.h>
+#include <math.h>
namespace Geom {
-
#include <2geom/d2-sbasis.h>
-#include <stdio.h>
-#include <math.h>
//-|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 <png.h>
+
#include <gtk/gtk.h>
#include <gtkmm/box.h>
#include <gtkmm/buttonbox.h>
@@ -56,7 +59,6 @@
#include "io/sys.h"
#include "helper/png-write.h"
-#include <png.h>
#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 <cstdio>
#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 <cstdio>
#include <math.h>
#include <stdarg.h>
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 <cstdio>
#include <dom/dom.h>
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 <sys/filio.h> // needed on Solaris 8
#endif
+#include <cstdio>
#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 <cstdio>
#include <string.h>
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 <stdarg.h>
+#include <cstdio>
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 <cstdio>
#include <stdarg.h>
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 <cstdio>
#include <math.h>
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 <math.h>
+#include <cstdio>
#include <vector>
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 <cstdio>
#include <cstring>
#include <string>
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 <cstdio>
#include <glibmm.h>
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 <set>
#include <map>
#include <iostream>
+#include <cstdio>
#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 <libnr/nr-matrix-fns.h>
+#include <cstdio>
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 <png.h>
+
#include <gtk/gtkmessagedialog.h>
#ifdef HAVE_IEEEFP_H
@@ -114,8 +117,6 @@ using Inkscape::Extension::Internal::PrintWin32;
#include "widgets/icon.h"
#include "ui/widget/panel.h"
-
-#include <png.h>
#include <errno.h>
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 <png.h>
+
#include <cstring>
#include <string>
#include <libnr/nr-matrix-fns.h>
@@ -45,7 +48,6 @@
#include "libnr/nr-matrix-fns.h"
#include "io/sys.h"
-#include <png.h>
#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 <glib.h> // g_assert()
+#include <cstdio>
#include "event.h"
#include "event-fns.h"