summaryrefslogtreecommitdiff
path: root/community/google-gadgets/google-gadgets-0.11.2-gcc-4.7.patch
blob: 2e77e10fd552101fe18b3509f0630f85af17314c (plain)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
Author: Pino Toscano <pino@debian.org>
Description: Fix building with GCC 4.7
 This patch fixes the two kinds of issues that arise with GCC 4.7:
 - include <unistd.h> for functions like access(), fork(), readlink(), etc
 - fix argument-dependent lookup issues by qualifying the lookup of functions
Forwarded: no
Last-Update: 2012-04-04

--- a/ggadget/scriptable_enumerator.h
+++ b/ggadget/scriptable_enumerator.h
@@ -68,22 +68,22 @@
 
  protected:
   virtual void DoClassRegister() {
-    RegisterMethod("atEnd",
+    this->RegisterMethod("atEnd",
                    NewSlot(&E::AtEnd,
                            &ScriptableEnumerator<E, Wrapper, Param, ClassId>
                                ::enumerator_));
-    RegisterMethod("moveFirst",
+    this->RegisterMethod("moveFirst",
                    NewSlot(&E::MoveFirst,
                            &ScriptableEnumerator<E, Wrapper, Param, ClassId>
                                ::enumerator_));
-    RegisterMethod("moveNext",
+    this->RegisterMethod("moveNext",
                    NewSlot(&E::MoveNext,
                            &ScriptableEnumerator<E, Wrapper, Param, ClassId>
                                ::enumerator_));
-    RegisterMethod("item",
+    this->RegisterMethod("item",
                    NewSlot(&ScriptableEnumerator<E, Wrapper, Param, ClassId>
                                ::GetItem));
-    RegisterProperty("count",
+    this->RegisterProperty("count",
                      NewSlot(&E::GetCount,
                              &ScriptableEnumerator<E, Wrapper, Param, ClassId>
                                  ::enumerator_),
--- a/ggadget/uuid.cc
+++ b/ggadget/uuid.cc
@@ -24,6 +24,7 @@
 #include <cstdlib>
 #include <cstring>
 #include <ctime>
+#include <unistd.h>
 
 #include "string_utils.h"
 
--- a/ggadget/xml_dom.cc
+++ b/ggadget/xml_dom.cc
@@ -1327,15 +1327,15 @@
 
   virtual void DoClassRegister() {
     Super::DoClassRegister();
-    RegisterProperty("data", NewSlot(&DOMCharacterData::GetData),
+    this->RegisterProperty("data", NewSlot(&DOMCharacterData::GetData),
                      NewSlot(&DOMCharacterData::SetData));
-    RegisterProperty("length", NewSlot(&DOMCharacterData::GetLength), NULL);
-    RegisterMethod("substringData",
+    this->RegisterProperty("length", NewSlot(&DOMCharacterData::GetLength), NULL);
+    this->RegisterMethod("substringData",
                    NewSlot(&DOMCharacterData::ScriptSubstringData));
-    RegisterMethod("appendData", NewSlot(&DOMCharacterData::AppendData));
-    RegisterMethod("insertData", NewSlot(&DOMCharacterData::ScriptInsertData));
-    RegisterMethod("deleteData", NewSlot(&DOMCharacterData::ScriptDeleteData));
-    RegisterMethod("replaceData",
+    this->RegisterMethod("appendData", NewSlot(&DOMCharacterData::AppendData));
+    this->RegisterMethod("insertData", NewSlot(&DOMCharacterData::ScriptInsertData));
+    this->RegisterMethod("deleteData", NewSlot(&DOMCharacterData::ScriptDeleteData));
+    this->RegisterMethod("replaceData",
                    NewSlot(&DOMCharacterData::ScriptReplaceData));
   }
 
@@ -1377,20 +1377,20 @@
  private:
   UTF16String ScriptSubstringData(size_t offset, size_t count) {
     UTF16String result;
-    CheckException(SubstringData(offset, count, &result));
+    this->CheckException(SubstringData(offset, count, &result));
     return result;
   }
 
   void ScriptInsertData(size_t offset, const UTF16String &arg) {
-    CheckException(InsertData(offset, arg));
+    this->CheckException(InsertData(offset, arg));
   }
 
   void ScriptDeleteData(size_t offset, size_t count) {
-    CheckException(DeleteData(offset, count));
+    this->CheckException(DeleteData(offset, count));
   }
 
   void ScriptReplaceData(size_t offset, size_t count, const UTF16String &arg) {
-    CheckException(ReplaceData(offset, count, arg));
+    this->CheckException(ReplaceData(offset, count, arg));
   }
 
   DOMCharacterDataImpl impl_;
@@ -1417,10 +1417,10 @@
 
   virtual void DoClassRegister() {
     Super::DoClassRegister();
-    RegisterProperty("name", NewSlot(&DOMAttr::GetName), NULL);
+    this->RegisterProperty("name", NewSlot(&DOMAttr::GetName), NULL);
     // Our DOMAttrs are always specified, because we don't support DTD for now.
-    RegisterConstant("specified", true);
-    RegisterProperty("value", NewSlot(&DOMAttr::GetValue),
+    this->RegisterConstant("specified", true);
+    this->RegisterProperty("value", NewSlot(&DOMAttr::GetValue),
                      NewSlot(&DOMAttr::SetValue));
     // ownerElement is a DOM2 property, so not registered for now.
   }
@@ -1516,19 +1516,19 @@
 
   virtual void DoClassRegister() {
     Super::DoClassRegister();
-    RegisterProperty("tagName", NewSlot(&DOMElement::GetTagName), NULL);
-    RegisterMethod("getAttribute", NewSlot(&DOMElement::GetAttribute));
-    RegisterMethod("setAttribute",
+    this->RegisterProperty("tagName", NewSlot(&DOMElement::GetTagName), NULL);
+    this->RegisterMethod("getAttribute", NewSlot(&DOMElement::GetAttribute));
+    this->RegisterMethod("setAttribute",
                    NewSlot(&DOMElement::ScriptSetAttribute));
-    RegisterMethod("removeAttribute",
+    this->RegisterMethod("removeAttribute",
                    NewSlot(&DOMElement::RemoveAttribute));
-    RegisterMethod("getAttributeNode",
+    this->RegisterMethod("getAttributeNode",
                    NewSlot(&DOMElement::GetAttributeNodeNotConst));
-    RegisterMethod("setAttributeNode",
+    this->RegisterMethod("setAttributeNode",
                    NewSlot(&DOMElement::ScriptSetAttributeNode));
-    RegisterMethod("removeAttributeNode",
+    this->RegisterMethod("removeAttributeNode",
                    NewSlot(&DOMElement::ScriptRemoveAttributeNode));
-    RegisterMethod("getElementsByTagName",
+    this->RegisterMethod("getElementsByTagName",
                    NewSlot(&Super::GetElementsByTagNameNotConst));
   }
 
@@ -1696,16 +1696,16 @@
     }
 
     virtual void DoClassRegister() {
-      RegisterProperty("length", NewSlot(&AttrsNamedMap::GetLength), NULL);
-      RegisterMethod("getNamedItem",
+      this->RegisterProperty("length", NewSlot(&AttrsNamedMap::GetLength), NULL);
+      this->RegisterMethod("getNamedItem",
                      NewSlot(&AttrsNamedMap::GetNamedItemNotConst));
-      RegisterMethod("setNamedItem",
+      this->RegisterMethod("setNamedItem",
                      NewSlot(&AttrsNamedMap::ScriptSetNamedItem));
-      RegisterMethod("removeNamedItem",
+      this->RegisterMethod("removeNamedItem",
                      NewSlot(&AttrsNamedMap::ScriptRemoveNamedItem));
-      RegisterMethod("item", NewSlot(&AttrsNamedMap::GetItemNotConst));
+      this->RegisterMethod("item", NewSlot(&AttrsNamedMap::GetItemNotConst));
       // Microsoft compatibility.
-      RegisterMethod("", NewSlot(&AttrsNamedMap::GetItemNotConst));
+      this->RegisterMethod("", NewSlot(&AttrsNamedMap::GetItemNotConst));
     }
 
     virtual DOMNodeInterface *GetNamedItem(const std::string &name) {
@@ -1875,7 +1875,7 @@
 
   virtual void DoClassRegister() {
     Super::DoClassRegister();
-    RegisterMethod("splitText", NewSlot(&DOMText::ScriptSplitText));
+    this->RegisterMethod("splitText", NewSlot(&DOMText::ScriptSplitText));
   }
 
   virtual NodeType GetNodeType() const { return TEXT_NODE; }
@@ -2060,9 +2060,9 @@
 
   virtual void DoClassRegister() {
     Super::DoClassRegister();
-    RegisterProperty("target",
+    this->RegisterProperty("target",
                      NewSlot(&DOMProcessingInstruction::GetTarget), NULL);
-    RegisterProperty("data", NewSlot(&DOMProcessingInstruction::GetData),
+    this->RegisterProperty("data", NewSlot(&DOMProcessingInstruction::GetData),
                      NewSlot(&DOMProcessingInstruction::SetData));
   }
 
@@ -2109,7 +2109,7 @@
   DEFINE_CLASS_ID(0xd23149a89cf24e12, DOMImplementationInterface);
 
   virtual void DoClassRegister() {
-    RegisterMethod("hasFeature", NewSlot(&DOMImplementation::HasFeature));
+    this->RegisterMethod("hasFeature", NewSlot(&DOMImplementation::HasFeature));
   }
 
   virtual bool HasFeature(const char *feature, const char *version) const {
@@ -2129,13 +2129,13 @@
   void SetCode(int code) { code_ = code; }
 
   virtual void DoClassRegister() {
-    RegisterProperty("errorCode", NewSlot(&ParseError::GetCode), NULL);
-    RegisterConstant("filepos", 0);
-    RegisterConstant("line", 0);
-    RegisterConstant("linepos", 0);
-    RegisterConstant("reason", "");
-    RegisterConstant("srcText", "");
-    RegisterConstant("url", "");
+    this->RegisterProperty("errorCode", NewSlot(&ParseError::GetCode), NULL);
+    this->RegisterConstant("filepos", 0);
+    this->RegisterConstant("line", 0);
+    this->RegisterConstant("linepos", 0);
+    this->RegisterConstant("reason", "");
+    this->RegisterConstant("srcText", "");
+    this->RegisterConstant("url", "");
   }
 
  private:
@@ -2180,45 +2180,45 @@
 
   virtual void DoClassRegister() {
     Super::DoClassRegister();
-    RegisterConstant("doctype", static_cast<ScriptableInterface *>(NULL));
-    RegisterConstant("implementation", &dom_implementation_);
-    RegisterProperty("documentElement",
+    this->RegisterConstant("doctype", static_cast<ScriptableInterface *>(NULL));
+    this->RegisterConstant("implementation", &dom_implementation_);
+    this->RegisterProperty("documentElement",
                      NewSlot(&DOMDocument::GetDocumentElementNotConst), NULL);
-    RegisterMethod("loadXML", NewSlot(&DOMDocument::LoadXML));
-    RegisterMethod("createElement",
+    this->RegisterMethod("loadXML", NewSlot(&DOMDocument::LoadXML));
+    this->RegisterMethod("createElement",
                    NewSlot(&DOMDocument::ScriptCreateElement));
-    RegisterMethod("createDocumentFragment",
+    this->RegisterMethod("createDocumentFragment",
                    NewSlot(&DOMDocument::CreateDocumentFragment));
-    RegisterMethod("createTextNode",
+    this->RegisterMethod("createTextNode",
                    NewSlot(&DOMDocument::CreateTextNode));
-    RegisterMethod("createComment", NewSlot(&DOMDocument::CreateComment));
-    RegisterMethod("createCDATASection",
+    this->RegisterMethod("createComment", NewSlot(&DOMDocument::CreateComment));
+    this->RegisterMethod("createCDATASection",
                    NewSlot(&DOMDocument::CreateCDATASection));
-    RegisterMethod("createProcessingInstruction",
+    this->RegisterMethod("createProcessingInstruction",
                    NewSlot(&DOMDocument::ScriptCreateProcessingInstruction));
-    RegisterMethod("createAttribute",
+    this->RegisterMethod("createAttribute",
                    NewSlot(&DOMDocument::ScriptCreateAttribute));
-    RegisterMethod("createEntityReference",
+    this->RegisterMethod("createEntityReference",
                    NewSlot(&DOMDocument::ScriptCreateEntityReference));
-    RegisterMethod("getElementsByTagName",
+    this->RegisterMethod("getElementsByTagName",
                    NewSlot(&Super::GetElementsByTagNameNotConst));
-    RegisterMethod("importNode", NewSlot(&DOMDocument::ScriptImportNode));
+    this->RegisterMethod("importNode", NewSlot(&DOMDocument::ScriptImportNode));
     // Compatibility with Microsoft DOM.
-    RegisterProperty("parsed", NewFixedGetterSlot(true), NULL);
-    RegisterProperty("parseError", NewSlot(&DOMDocument::GetParseError), NULL);
-    RegisterProperty("resolveExternals", NULL, NewSlot(&DummySetter));
-    RegisterProperty("validateOnParse", NULL, NewSlot(&DummySetter));
-    RegisterProperty("preserveWhiteSpace",
+    this->RegisterProperty("parsed", NewFixedGetterSlot(true), NULL);
+    this->RegisterProperty("parseError", NewSlot(&DOMDocument::GetParseError), NULL);
+    this->RegisterProperty("resolveExternals", NULL, NewSlot(&DummySetter));
+    this->RegisterProperty("validateOnParse", NULL, NewSlot(&DummySetter));
+    this->RegisterProperty("preserveWhiteSpace",
                      NewSlot(&DOMDocument::PreservesWhiteSpace),
                      NewSlot(&DOMDocument::SetPreserveWhiteSpace));
-    RegisterMethod("getProperty", NewSlot(DummyGetProperty));
-    RegisterMethod("setProperty", NewSlot(DummySetProperty));
+    this->RegisterMethod("getProperty", NewSlot(DummyGetProperty));
+    this->RegisterMethod("setProperty", NewSlot(DummySetProperty));
     // Compatibility with Microsoft DOM: XMLHttpRequest functions.
-    RegisterProperty("async", NewSlot(&DOMDocument::IsAsync),
+    this->RegisterProperty("async", NewSlot(&DOMDocument::IsAsync),
                      NewSlot(&DOMDocument::SetAsync));
-    RegisterProperty("readyState", NewSlot(&DOMDocument::GetReadyState), NULL);
-    RegisterMethod("load", NewSlot(&DOMDocument::Load));
-    RegisterClassSignal("onreadystatechange",
+    this->RegisterProperty("readyState", NewSlot(&DOMDocument::GetReadyState), NULL);
+    this->RegisterMethod("load", NewSlot(&DOMDocument::Load));
+    this->RegisterClassSignal("onreadystatechange",
                         &DOMDocument::onreadystatechange_signal_);
   }
 
--- a/ggadget/xdg/icon_theme.cc
+++ b/ggadget/xdg/icon_theme.cc
@@ -16,6 +16,7 @@
 #include <sys/time.h>
 #include <time.h>
 #include <cstdlib>
+#include <unistd.h>
 
 #include <map>
 #include <vector>
--- a/extensions/qt_system_framework/qt_system_framework.cc
+++ b/extensions/qt_system_framework/qt_system_framework.cc
@@ -32,6 +32,7 @@
 #include <ggadget/xdg/desktop_entry.h>
 #include <ggadget/xdg/icon_theme.h>
 #include <ggadget/xdg/utilities.h>
+#include <unistd.h>
 
 #define Initialize qt_system_framework_LTX_Initialize
 #define Finalize qt_system_framework_LTX_Finalize
--- a/extensions/linux_system_framework/process.cc
+++ b/extensions/linux_system_framework/process.cc
@@ -17,6 +17,7 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <cstdlib>
+#include <unistd.h>
 
 #ifdef HAVE_X11
 #include <X11/Xlib.h>
--- a/gadgets/designer/designer_script_utils.cc
+++ b/gadgets/designer/designer_script_utils.cc
@@ -39,6 +39,7 @@
 #include <ggadget/system_utils.h>
 #include <ggadget/uuid.h>
 #include <ggadget/view_interface.h>
+#include <unistd.h>
 
 namespace ggadget {
 namespace designer {