[passepartout] gcc-4.3 fixes



commit ef5578e46199e9e309198763feb3f7368aef2940
Author: Sven Herzberg <herzi lanedo com>
Date:   Wed Apr 15 11:48:24 2009 +0200

    gcc-4.3 fixes
    
    * src/fonts/afm.cc,
    * src/fonts/fontmanager.cc,
    * src/pptout/document/rasterframe.cc,
    * src/ps/encode.h,
    * src/ps/examinepdf.cc,
    * src/ps/pdf.cc,
    * src/util/filesys.cc,
    * src/util/tempfile.cc,
    * src/util/vector.h: include fixes
    * src/pptout/pagesel.cc: fix ambiguous if-if-else
    * src/pptout/view.h: fix typedef usage
---
 src/fonts/afm.cc                   |    7 ++++---
 src/fonts/fontmanager.cc           |    1 +
 src/pptout/document/rasterframe.cc |    1 +
 src/pptout/pagesel.cc              |   16 +++++++++-------
 src/pptout/view.h                  |    2 +-
 src/ps/encode.h                    |    1 +
 src/ps/examinepdf.cc               |    1 +
 src/ps/pdf.cc                      |    3 ++-
 src/util/filesys.cc                |    2 ++
 src/util/tempfile.cc               |    4 +++-
 src/util/vector.h                  |    2 ++
 11 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/src/fonts/afm.cc b/src/fonts/afm.cc
index 1841aa2..fbac750 100644
--- a/src/fonts/afm.cc
+++ b/src/fonts/afm.cc
@@ -2,10 +2,11 @@
 // Copyright (C) 2002 - 2004, Fredrik Arnerup & Rasmus Kaj, See COPYING
 ///
 #include "afm.hh"
-#include <string>
-#include <map>
-#include <iostream>
 #include <fstream>
+#include <iostream>
+#include <limits>
+#include <map>
+#include <string>
 #include "ps/unicode.h"
 #include "util/warning.h"
 #include "util/stringutil.h"
diff --git a/src/fonts/fontmanager.cc b/src/fonts/fontmanager.cc
index 38ace6d..14868cf 100644
--- a/src/fonts/fontmanager.cc
+++ b/src/fonts/fontmanager.cc
@@ -5,6 +5,7 @@
 
 #include <fstream>
 #include <iostream>
+#include <memory>
 #include <fontconfig/fontconfig.h>
 
 #include "afm.hh"
diff --git a/src/pptout/document/rasterframe.cc b/src/pptout/document/rasterframe.cc
index b22cb01..3872b5e 100644
--- a/src/pptout/document/rasterframe.cc
+++ b/src/pptout/document/rasterframe.cc
@@ -3,6 +3,7 @@
 ///
 #include "rasterframe.h"
 #include <cassert>
+#include <ctime>
 #include "util/stringutil.h"
 #include "util/filesys.h"
 #include "util/warning.h"
diff --git a/src/pptout/pagesel.cc b/src/pptout/pagesel.cc
index b2095f5..3c809ce 100644
--- a/src/pptout/pagesel.cc
+++ b/src/pptout/pagesel.cc
@@ -62,13 +62,15 @@ void Pagesel::update() {
       i++;
     }
     if(false) // document->is_doublesided())
-      if(i < (document->get_first_page_num()
-	      + int(document->get_num_of_pages()))) {
-	if(document->get_page(i))
-	  tmp += ", " + document->get_page(i)->get_name();
-	i++;
-      } else
-	tmp += ", -";
+      {
+        if(i < (document->get_first_page_num()
+	        + int(document->get_num_of_pages()))) {
+	  if(document->get_page(i))
+	    tmp += ", " + document->get_page(i)->get_name();
+	  i++;
+        } else
+	  tmp += ", -";
+      }
     pages.append_text(tmp);
   }
   int index = document_view.get_current_page_num()
diff --git a/src/pptout/view.h b/src/pptout/view.h
index bc5bfd9..52b28d2 100644
--- a/src/pptout/view.h
+++ b/src/pptout/view.h
@@ -8,7 +8,7 @@
 #include <libgnomecanvasmm.h>
 
 namespace Color {
-  typedef enum Id { bg, frame, locked, guide, empty };
+  typedef enum { bg, frame, locked, guide, empty } Id;
 }
 
 class View {
diff --git a/src/ps/encode.h b/src/ps/encode.h
index 5958e37..80af9b4 100644
--- a/src/ps/encode.h
+++ b/src/ps/encode.h
@@ -5,6 +5,7 @@
 #ifndef ENCODE_H 
 #define ENCODE_H
 
+#include <cstring>
 #include <iostream>
 #include <string>
 #include <vector>
diff --git a/src/ps/examinepdf.cc b/src/ps/examinepdf.cc
index ec29b47..c13693c 100644
--- a/src/ps/examinepdf.cc
+++ b/src/ps/examinepdf.cc
@@ -4,6 +4,7 @@
 #include "pdfparser.h"
 #include <fstream>
 #include <cassert>		// Todo: other assert!
+#include <cstdlib>
 #include <iostream>
 
 void usage() {}
diff --git a/src/ps/pdf.cc b/src/ps/pdf.cc
index eb5ef1d..27b8da3 100644
--- a/src/ps/pdf.cc
+++ b/src/ps/pdf.cc
@@ -9,12 +9,13 @@
 #include "util/filesys.h"
 #include "util/stringutil.h"
 #include "util/warning.h"
+#include <fstream>
 #include <string>
 #include <iomanip>
 #include <iostream>
 #include <stdexcept>
+#include <typeinfo>
 #include <glibmm/convert.h>
-#include <fstream>
 
 
 namespace {
diff --git a/src/util/filesys.cc b/src/util/filesys.cc
index caf79d2..9e18fc5 100644
--- a/src/util/filesys.cc
+++ b/src/util/filesys.cc
@@ -13,6 +13,8 @@
 #ifndef HAVE_MKDTEMP
 #include <sys/types.h>
 #endif
+#include <cstdlib>
+#include <cstring>
 
 using std::string;
 
diff --git a/src/util/tempfile.cc b/src/util/tempfile.cc
index 8e1cd6a..e7aef10 100644
--- a/src/util/tempfile.cc
+++ b/src/util/tempfile.cc
@@ -5,8 +5,10 @@
 #include "warning.h"
 #include "filesys.h"
 #include "os.h"
-#include <stdexcept>
 #include <unistd.h>
+#include <cstdlib>
+#include <cstring>
+#include <stdexcept>
 
 namespace {
   std::string get_tmplate(std::string base) {
diff --git a/src/util/vector.h b/src/util/vector.h
index 8f3c129..ff6e3e8 100644
--- a/src/util/vector.h
+++ b/src/util/vector.h
@@ -5,6 +5,8 @@
 ///
 #include <algorithm> // max
 #include <cmath> // sqrt
+#include <string>
+
 template<class C> C sqr(const C& c) { return c*c; }
 
 template <class C>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]