1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Tue, 1 Nov 2011 15:08:54 +0100
Subject: [PATCH] include and namespace fixes for a stricter compiler
g++-4.3 is a lot stricter with respect to the C++ standard.
This patch adds various includes that used to be implicit.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
src/Tag.hh | 1 +
src/TagStream.cc | 7 ++++---
src/writers/WriterBase.hh | 1 +
src/writers/xpmname.cc | 1 +
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/Tag.hh b/src/Tag.hh
index 2732a3a..d6fe055 100644
--- a/src/Tag.hh
+++ b/src/Tag.hh
@@ -23,6 +23,7 @@
#include <config.h>
#endif
#include <string>
+#include <string.h>
#include <vector>
#include <algorithm> // for find
#include <stdexcept>
diff --git a/src/TagStream.cc b/src/TagStream.cc
index 213ba2d..d220562 100644
--- a/src/TagStream.cc
+++ b/src/TagStream.cc
@@ -18,9 +18,10 @@
*/
#include "TagStream.hh"
+#include <iostream>
#include <cstring>
+#include <algorithm>
#include <unistd.h>
-#include <algo.h>
//#define REMEMBER_EMPTY_SPACE
@@ -73,10 +74,10 @@ std::string TagStream::de_xml(const std::string &cont)
{ std::string ret;
std::string::const_iterator i(cont.begin());
while (i!=cont.end())
- { std::string::const_iterator verbatim(::find(i,cont.end(),'&'));
+ { std::string::const_iterator verbatim(std::find(i,cont.end(),'&'));
ret+=std::string(i,verbatim);
if (verbatim!=cont.end())
- { std::string::const_iterator endtag(::find(verbatim,cont.end(),';'));
+ { std::string::const_iterator endtag(std::find(verbatim,cont.end(),';'));
if (endtag!=cont.end()) ++endtag;
std::string tag(verbatim,endtag);
if (tag[1]=='#' && tag[2]=='x')
diff --git a/src/writers/WriterBase.hh b/src/writers/WriterBase.hh
index 5c6f97d..f1d6e7c 100644
--- a/src/writers/WriterBase.hh
+++ b/src/writers/WriterBase.hh
@@ -22,6 +22,7 @@
#define WRITER_BASE_HH
#include <safemap.hh>
#include <string>
+#include <string.h>
#include "../Enums.hh"
// these are not necessary for all widgets,
// but it's convenient to have them defined
diff --git a/src/writers/xpmname.cc b/src/writers/xpmname.cc
index 626b98e..5c336c2 100644
--- a/src/writers/xpmname.cc
+++ b/src/writers/xpmname.cc
@@ -1,5 +1,6 @@
#include <cstdio>
#include <string>
+#include <string.h>
#include <Configuration.hh>
// parts taken from
|