1624
|
1 |
Index: xdg/Makefile.am
|
|
2 |
===================================================================
|
|
3 |
--- xdg/Makefile.am (revision 1038)
|
|
4 |
+++ xdg/Makefile.am (working copy)
|
|
5 |
@@ -23,6 +23,7 @@
|
|
6 |
intl_desktop_file_CPPFLAGS= $(PREDEFINED_MACROS)
|
|
7 |
intl_desktop_file_CXXFLAGS= $(DEFAULT_COMPILE_FLAGS)
|
|
8 |
intl_desktop_file_LDADD= $(top_builddir)/ggadget/libggadget@[email protected]
|
|
9 |
+intl_desktop_file_LDFLAGS = -lsocket
|
|
10 |
|
|
11 |
if GGL_DISABLE_SHARED
|
|
12 |
intl_desktop_file_LDADD += \
|
|
13 |
Index: extensions/linux_system_framework/machine.cc
|
|
14 |
===================================================================
|
|
15 |
--- extensions/linux_system_framework/machine.cc (revision 1038)
|
|
16 |
+++ extensions/linux_system_framework/machine.cc (working copy)
|
|
17 |
@@ -144,7 +144,7 @@
|
|
18 |
}
|
|
19 |
|
|
20 |
void Machine::InitArchInfo() {
|
|
21 |
- utsname name;
|
|
22 |
+ struct utsname name;
|
|
23 |
if (uname(&name) == -1) { // indicates error when -1 is returned.
|
|
24 |
sysinfo_[CPU_ARCH] = "";
|
|
25 |
return;
|
|
26 |
Index: extensions/linux_system_framework/process.cc
|
|
27 |
===================================================================
|
|
28 |
--- extensions/linux_system_framework/process.cc (revision 1038)
|
|
29 |
+++ extensions/linux_system_framework/process.cc (working copy)
|
1937
|
30 |
@@ -18,6 +18,9 @@
|
1624
|
31 |
#include <dirent.h>
|
|
32 |
#include <cstdlib>
|
|
33 |
|
|
34 |
+#include <unistd.h>
|
1937
|
35 |
+#include <limits.h>
|
1624
|
36 |
+
|
|
37 |
#ifdef HAVE_X11
|
|
38 |
#include <X11/Xlib.h>
|
|
39 |
#include <X11/Xatom.h>
|
|
40 |
Index: extensions/linux_system_framework/user.cc
|
|
41 |
===================================================================
|
|
42 |
--- extensions/linux_system_framework/user.cc (revision 1038)
|
|
43 |
+++ extensions/linux_system_framework/user.cc (working copy)
|
|
44 |
@@ -160,7 +160,8 @@
|
|
45 |
int new_state = 0;
|
|
46 |
while (fgets(line, sizeof(line), interrupt_file)) {
|
|
47 |
for (size_t i = 0; i < input_devices_.size(); i++) {
|
|
48 |
- if (strcasestr(line, input_devices_[i].c_str()) != NULL) {
|
|
49 |
+// if (strcasestr(line, input_devices_[i].c_str()) != NULL) {
|
|
50 |
+ if (strstr(line, input_devices_[i].c_str()) != NULL) {
|
|
51 |
new_state = GetHash(new_state, line);
|
|
52 |
break;
|
|
53 |
}
|
|
54 |
Index: extensions/linux_system_framework/runtime.cc
|
|
55 |
===================================================================
|
|
56 |
--- extensions/linux_system_framework/runtime.cc (revision 1038)
|
|
57 |
+++ extensions/linux_system_framework/runtime.cc (working copy)
|
|
58 |
@@ -25,7 +25,7 @@
|
|
59 |
|
|
60 |
Runtime::Runtime() {
|
|
61 |
struct utsname uts;
|
|
62 |
- if (uname(&uts)) {
|
|
63 |
+ if (uname(&uts) == -1) {
|
|
64 |
DLOG("Failed to get the system information.");
|
|
65 |
os_name_ = GGL_PLATFORM;
|
|
66 |
} else {
|
|
67 |
Index: extensions/linux_system_framework/Makefile.am
|
|
68 |
===================================================================
|
|
69 |
--- extensions/linux_system_framework/Makefile.am (revision 1038)
|
|
70 |
+++ extensions/linux_system_framework/Makefile.am (working copy)
|
|
71 |
@@ -17,7 +17,7 @@
|
|
72 |
EXTRA_DIST = CMakeLists.txt
|
|
73 |
|
|
74 |
# libggadget-dbus is mandatory for linux-system-framework.
|
|
75 |
-if GGL_HOST_LINUX
|
|
76 |
+if GGL_HOST_SOLARIS
|
|
77 |
|
|
78 |
# Putting . into SBUDIRS list to force building current directory first.
|
|
79 |
SUBDIRS = . tests
|
|
80 |
Index: extensions/google_gadget_manager/gadgets_metadata.h
|
|
81 |
===================================================================
|
|
82 |
--- extensions/google_gadget_manager/gadgets_metadata.h (revision 1038)
|
|
83 |
+++ extensions/google_gadget_manager/gadgets_metadata.h (working copy)
|
|
84 |
@@ -27,6 +27,7 @@
|
|
85 |
class FileManagerInterface;
|
|
86 |
class XMLHttpRequestInterface;
|
|
87 |
template <typename R, typename P1, typename P2> class Slot2;
|
|
88 |
+template <typename P1, typename P2> class Slot2 <void, P1, P2>;
|
|
89 |
|
|
90 |
namespace google {
|
|
91 |
|
|
92 |
Index: extensions/gtkmoz_browser_element/browser_element.cc
|
|
93 |
===================================================================
|
|
94 |
--- extensions/gtkmoz_browser_element/browser_element.cc (revision 1038)
|
|
95 |
+++ extensions/gtkmoz_browser_element/browser_element.cc (working copy)
|
|
96 |
@@ -372,12 +372,19 @@
|
|
97 |
}
|
|
98 |
|
|
99 |
void Write(int fd, const char *data, size_t size) {
|
|
100 |
- sig_t old_handler = signal(SIGPIPE, OnSigPipe);
|
|
101 |
+ struct sigaction act, old_act;
|
|
102 |
+ act.sa_handler = SIG_IGN;
|
|
103 |
+ act.sa_flags = SA_ONSTACK;
|
|
104 |
+ if (sigaction(SIGPIPE, &act, &old_act) < 0)
|
|
105 |
+ return;
|
|
106 |
+// sig_t old_handler = signal(SIGPIPE, OnSigPipe);
|
|
107 |
if (write(fd, data, size) < 0) {
|
|
108 |
LOG("Failed to write to pipe");
|
|
109 |
StopChild(true);
|
|
110 |
}
|
|
111 |
- signal(SIGPIPE, old_handler);
|
|
112 |
+ if (sigaction(SIGPIPE, &old_act, NULL) < 0)
|
|
113 |
+ return;
|
|
114 |
+// signal(SIGPIPE, old_handler);
|
|
115 |
}
|
|
116 |
|
|
117 |
static BrowserController *instance_;
|
|
118 |
Index: extensions/gtkmoz_browser_element/Makefile.am
|
|
119 |
===================================================================
|
|
120 |
--- extensions/gtkmoz_browser_element/Makefile.am (revision 1038)
|
|
121 |
+++ extensions/gtkmoz_browser_element/Makefile.am (working copy)
|
|
122 |
@@ -53,9 +53,9 @@
|
|
123 |
browser_child_internal.cc \
|
|
124 |
../smjs_script_runtime/libmozjs_glue.cc
|
|
125 |
|
|
126 |
-gtkmoz_browser_child_CXXFLAGS = $(DEFAULT_COMPILE_FLAGS) \
|
|
127 |
- -Wno-non-virtual-dtor \
|
|
128 |
- -fno-strict-aliasing
|
|
129 |
+gtkmoz_browser_child_CXXFLAGS = $(DEFAULT_COMPILE_FLAGS)
|
|
130 |
+# -Wno-non-virtual-dtor \
|
|
131 |
+# -fno-strict-aliasing
|
|
132 |
|
|
133 |
gtkmoz_browser_child_CPPFLAGS = $(GTK2_CFLAGS) \
|
|
134 |
$(GTKMOZEMBED_CFLAGS) \
|
|
135 |
Index: extensions/gst_audio_framework/gst_audio_framework.cc
|
|
136 |
===================================================================
|
|
137 |
--- extensions/gst_audio_framework/gst_audio_framework.cc (revision 1038)
|
|
138 |
+++ extensions/gst_audio_framework/gst_audio_framework.cc (working copy)
|
|
139 |
@@ -43,7 +43,7 @@
|
|
140 |
|
|
141 |
static const char *kGstAudioSinks[] = {
|
|
142 |
GGL_DEFAULT_GST_AUDIO_SINK,
|
|
143 |
-#if GGL_HOST_LINUX
|
|
144 |
+#if GGL_HOST_SOLARIS
|
|
145 |
"alsasink",
|
|
146 |
"osssink",
|
|
147 |
#endif
|
|
148 |
Index: extensions/curl_xml_http_request/curl_xml_http_request.cc
|
|
149 |
===================================================================
|
|
150 |
--- extensions/curl_xml_http_request/curl_xml_http_request.cc (revision 1038)
|
|
151 |
+++ extensions/curl_xml_http_request/curl_xml_http_request.cc (working copy)
|
|
152 |
@@ -202,11 +202,14 @@
|
|
153 |
}
|
|
154 |
|
|
155 |
if (is_https) {
|
|
156 |
+ curl_easy_setopt(curl_, CURLOPT_SSL_VERIFYPEER, 0);
|
|
157 |
+#if 0
|
|
158 |
curl_easy_setopt(curl_, CURLOPT_SSL_VERIFYPEER, 1);
|
|
159 |
curl_easy_setopt(curl_, CURLOPT_SSL_VERIFYHOST, 2);
|
|
160 |
// Older versions of libcurl's ca bundle file is also very old, so add
|
|
161 |
// OpenSSL's cert directory. Only for Linux and libcurl-openssl config.
|
|
162 |
curl_easy_setopt(curl_, CURLOPT_CAPATH, "/etc/ssl/certs");
|
|
163 |
+#endif
|
|
164 |
}
|
|
165 |
|
|
166 |
if (!default_user_agent_.empty())
|
|
167 |
Index: extensions/gst_video_element/gst_video_element.cc
|
|
168 |
===================================================================
|
|
169 |
--- extensions/gst_video_element/gst_video_element.cc (revision 1038)
|
|
170 |
+++ extensions/gst_video_element/gst_video_element.cc (working copy)
|
|
171 |
@@ -66,7 +66,7 @@
|
|
172 |
|
|
173 |
static const char *kGstAudioSinks[] = {
|
|
174 |
GGL_DEFAULT_GST_AUDIO_SINK,
|
|
175 |
-#if GGL_HOST_LINUX
|
|
176 |
+#if GGL_HOST_SOLARIS
|
|
177 |
"alsasink",
|
|
178 |
"osssink",
|
|
179 |
#endif
|
|
180 |
Index: extensions/gst_video_element/gadget_videosink.cc
|
|
181 |
===================================================================
|
|
182 |
--- extensions/gst_video_element/gadget_videosink.cc (revision 1038)
|
|
183 |
+++ extensions/gst_video_element/gadget_videosink.cc (working copy)
|
|
184 |
@@ -17,6 +17,10 @@
|
|
185 |
#include "gadget_videosink.h"
|
|
186 |
#include <pthread.h>
|
|
187 |
|
|
188 |
+#include <string.h>
|
|
189 |
+
|
|
190 |
+#define GST_FUNCTION __FILE__
|
|
191 |
+
|
|
192 |
namespace ggadget {
|
|
193 |
namespace gst {
|
|
194 |
|
|
195 |
Index: extensions/smjs_script_runtime/json.cc
|
|
196 |
===================================================================
|
|
197 |
--- extensions/smjs_script_runtime/json.cc (revision 1038)
|
|
198 |
+++ extensions/smjs_script_runtime/json.cc (working copy)
|
|
199 |
@@ -149,7 +149,7 @@
|
|
200 |
std::vector<jsval> *stack) {
|
|
201 |
switch (JS_TypeOfValue(cx, js_val)) {
|
|
202 |
case JSTYPE_OBJECT:
|
|
203 |
- if (find(stack->begin(), stack->end(), js_val) != stack->end()) {
|
|
204 |
+ if (std::find(stack->begin(), stack->end(), js_val) != stack->end()) {
|
|
205 |
// Break the infinite reference loops.
|
|
206 |
(*json) += "null";
|
|
207 |
} else {
|
|
208 |
Index: hosts/gtk/sidebar_gtk_host.cc
|
|
209 |
===================================================================
|
|
210 |
--- hosts/gtk/sidebar_gtk_host.cc (revision 1038)
|
|
211 |
+++ hosts/gtk/sidebar_gtk_host.cc (working copy)
|
|
212 |
@@ -142,7 +142,7 @@
|
|
213 |
gadget_manager_(GetGadgetManager()),
|
|
214 |
on_new_gadget_instance_connection_(NULL),
|
|
215 |
on_remove_gadget_instance_connection_(NULL),
|
|
216 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
217 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
218 |
status_icon_(NULL),
|
|
219 |
status_icon_menu_(NULL),
|
|
220 |
#endif
|
|
221 |
@@ -223,7 +223,7 @@
|
|
222 |
|
|
223 |
delete sidebar_;
|
|
224 |
|
|
225 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
226 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
227 |
g_object_unref(G_OBJECT(status_icon_));
|
|
228 |
if (status_icon_menu_)
|
|
229 |
gtk_widget_destroy(status_icon_menu_);
|
|
230 |
@@ -427,7 +427,7 @@
|
|
231 |
}
|
|
232 |
|
|
233 |
void OnSideBarClose() {
|
|
234 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
235 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
236 |
closed_ = true;
|
|
237 |
ShowOrHideSideBar(false);
|
|
238 |
#else
|
|
239 |
@@ -654,7 +654,7 @@
|
|
240 |
// AdjustSideBar() will be called by this function.
|
|
241 |
OnWorkAreaChange();
|
|
242 |
|
|
243 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
244 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
245 |
std::string icon_data;
|
|
246 |
if (GetGlobalFileManager()->ReadFile(kGadgetsIcon, &icon_data)) {
|
|
247 |
GdkPixbuf *icon_pixbuf = LoadPixbufFromData(icon_data);
|
|
248 |
@@ -683,7 +683,7 @@
|
|
249 |
G_CALLBACK(DragObserverButtonReleaseHandler), this);
|
|
250 |
}
|
|
251 |
|
|
252 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
253 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
254 |
void UpdateStatusIconTooltip() {
|
|
255 |
if (hotkey_grabber_.IsGrabbing()) {
|
|
256 |
gtk_status_icon_set_tooltip(status_icon_,
|
|
257 |
@@ -1265,7 +1265,7 @@
|
|
258 |
|
|
259 |
void ShowOrHideSideBar(bool show) {
|
|
260 |
DLOG("ShowOrHideSideBar(%d)", show);
|
|
261 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
262 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
263 |
if (show && !closed_) {
|
|
264 |
sidebar_->Restore();
|
|
265 |
// AdjustSideBar() will be called by OnSideBarResized().
|
|
266 |
@@ -1641,7 +1641,7 @@
|
|
267 |
hotkey_grabber_.SetHotKey(hotkey);
|
|
268 |
// The hotkey will not be enabled if it's invalid.
|
|
269 |
hotkey_grabber_.SetEnableGrabbing(true);
|
|
270 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
271 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
272 |
UpdateStatusIconTooltip();
|
|
273 |
#endif
|
|
274 |
}
|
|
275 |
@@ -1812,7 +1812,7 @@
|
|
276 |
return FALSE;
|
|
277 |
}
|
|
278 |
|
|
279 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
280 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
281 |
static void StatusIconActivateHandler(GtkWidget *widget, Impl *impl) {
|
|
282 |
if (!impl->gadgets_shown_ ||
|
|
283 |
(!impl->closed_ && impl->sidebar_->IsMinimized()))
|
|
284 |
@@ -1914,7 +1914,7 @@
|
|
285 |
Connection *on_new_gadget_instance_connection_;
|
|
286 |
Connection *on_remove_gadget_instance_connection_;
|
|
287 |
|
|
288 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
289 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
290 |
GtkStatusIcon *status_icon_;
|
|
291 |
GtkWidget *status_icon_menu_;
|
|
292 |
#endif
|
|
293 |
@@ -1931,7 +1931,7 @@
|
|
294 |
debug_console_config)) {
|
|
295 |
impl_->SetupUI();
|
|
296 |
impl_->LoadGadgets();
|
|
297 |
-#if !GTK_CHECK_VERSION(2,10,0) || !defined(GGL_HOST_LINUX)
|
|
298 |
+#if !GTK_CHECK_VERSION(2,10,0) || !defined(GGL_HOST_SOLARIS)
|
|
299 |
impl_->sidebar_host_->ShowView(false, 0, NULL);
|
|
300 |
#endif
|
|
301 |
impl_->ShowOrHideSideBar(impl_->gadgets_shown_ && !impl_->closed_);
|
|
302 |
Index: hosts/gtk/simple_gtk_host.cc
|
|
303 |
===================================================================
|
|
304 |
--- hosts/gtk/simple_gtk_host.cc (revision 1038)
|
|
305 |
+++ hosts/gtk/simple_gtk_host.cc (working copy)
|
|
306 |
@@ -142,7 +142,7 @@
|
|
307 |
}
|
|
308 |
|
|
309 |
gtk_widget_destroy(host_menu_);
|
|
310 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
311 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
312 |
g_object_unref(G_OBJECT(status_icon_));
|
|
313 |
#else
|
|
314 |
gtk_widget_destroy(main_widget_);
|
|
315 |
@@ -193,7 +193,7 @@
|
|
316 |
NewSlot(this, &Impl::ExitMenuCallback),
|
|
317 |
MenuInterface::MENU_ITEM_PRI_HOST);
|
|
318 |
|
|
319 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
320 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
321 |
// FIXME:
|
|
322 |
std::string icon_data;
|
|
323 |
if (GetGlobalFileManager()->ReadFile(kGadgetsIcon, &icon_data)) {
|
|
324 |
@@ -227,7 +227,7 @@
|
|
325 |
#endif
|
|
326 |
}
|
|
327 |
|
|
328 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
329 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
330 |
void UpdateStatusIconTooltip() {
|
|
331 |
if (hotkey_grabber_.IsGrabbing()) {
|
|
332 |
gtk_status_icon_set_tooltip(status_icon_,
|
|
333 |
@@ -438,7 +438,7 @@
|
|
334 |
hotkey_grabber_.SetEnableGrabbing(true);
|
|
335 |
if (options_)
|
|
336 |
options_->PutInternalValue(kOptionHotKey, Variant(hotkey));
|
|
337 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
338 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
339 |
UpdateStatusIconTooltip();
|
|
340 |
#endif
|
|
341 |
}
|
|
342 |
@@ -779,7 +779,7 @@
|
|
343 |
return true;
|
|
344 |
}
|
|
345 |
|
|
346 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
347 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
348 |
static void StatusIconPopupMenuHandler(GtkWidget *widget, guint button,
|
|
349 |
guint activate_time,
|
|
350 |
gpointer user_data) {
|
|
351 |
@@ -849,7 +849,7 @@
|
|
352 |
GadgetManagerInterface *gadget_manager_;
|
|
353 |
Connection *on_new_gadget_instance_connection_;
|
|
354 |
Connection *on_remove_gadget_instance_connection_;
|
|
355 |
-#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
|
|
356 |
+#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_SOLARIS)
|
|
357 |
GtkStatusIcon *status_icon_;
|
|
358 |
#else
|
|
359 |
GtkWidget *main_widget_;
|
|
360 |
Index: hosts/gtk/main.cc
|
|
361 |
===================================================================
|
|
362 |
--- hosts/gtk/main.cc (revision 1038)
|
|
363 |
+++ hosts/gtk/main.cc (working copy)
|
|
364 |
@@ -65,7 +65,7 @@
|
|
365 |
"gst-video-element",
|
|
366 |
"gtk-system-framework",
|
|
367 |
"gst-audio-framework",
|
|
368 |
-#ifdef GGL_HOST_LINUX
|
|
369 |
+#ifdef GGL_HOST_SOLARIS
|
|
370 |
"linux-system-framework",
|
|
371 |
#endif
|
1937
|
372 |
"analytics-usage-collector",
|
1624
|
373 |
@@ -444,8 +444,8 @@
|
|
374 |
|
|
375 |
// Puth the process into background in the early stage to prevent from
|
|
376 |
// printing any log messages.
|
|
377 |
- if (g_arguments.background)
|
|
378 |
- ggadget::Daemonize();
|
|
379 |
+// if (g_arguments.background)
|
|
380 |
+// ggadget::Daemonize();
|
|
381 |
|
|
382 |
// Set global file manager.
|
|
383 |
ggadget::SetupGlobalFileManager(profile_dir.c_str());
|
|
384 |
Index: ggadget/audioclip_interface.h
|
|
385 |
===================================================================
|
|
386 |
--- ggadget/audioclip_interface.h (revision 1038)
|
|
387 |
+++ ggadget/audioclip_interface.h (working copy)
|
|
388 |
@@ -24,6 +24,7 @@
|
|
389 |
|
|
390 |
class Connection;
|
|
391 |
template <typename R, typename P1> class Slot1;
|
|
392 |
+template <typename P1> class Slot1 <void, P1>;
|
|
393 |
|
|
394 |
namespace framework {
|
|
395 |
|
|
396 |
Index: ggadget/variant.h
|
|
397 |
===================================================================
|
|
398 |
--- ggadget/variant.h (revision 1038)
|
|
399 |
+++ ggadget/variant.h (working copy)
|
|
400 |
@@ -30,6 +30,11 @@
|
|
401 |
class Slot;
|
|
402 |
class Connection;
|
|
403 |
|
|
404 |
+static const std::string kNullString("(nil)");;
|
|
405 |
+static const UTF16Char kNullUTF16StringValue[] =
|
|
406 |
+ { '(', 'n', 'i', 'l', ')', 0 };
|
|
407 |
+static const UTF16String kNullUTF16String(kNullUTF16StringValue);
|
|
408 |
+
|
|
409 |
/**
|
|
410 |
* @defgroup Variant Variant
|
|
411 |
* @ingroup ScriptableFoundation
|
|
412 |
@@ -334,8 +339,8 @@
|
|
413 |
// Constants to indicate if a string value is a null pointer.
|
|
414 |
// This depends on the value sharing behavior of the basic_string template
|
|
415 |
// in the standard C++ library.
|
|
416 |
- static const std::string kNullString;
|
|
417 |
- static const UTF16String kNullUTF16String;
|
|
418 |
+// static const std::string kNullString;
|
|
419 |
+// static const UTF16String kNullUTF16String;
|
|
420 |
|
|
421 |
// Value of the Variant.
|
|
422 |
union {
|
|
423 |
@@ -540,7 +545,8 @@
|
|
424 |
return NULL;
|
|
425 |
const std::string *s =
|
|
426 |
reinterpret_cast<const std::string *>(&v.v_.string_place_);
|
|
427 |
- return s->c_str() == Variant::kNullString.c_str() ? NULL : s->c_str();
|
|
428 |
+// return s->c_str() == Variant::kNullString.c_str() ? NULL : s->c_str();
|
|
429 |
+ return s->c_str() == kNullString.c_str() ? NULL : s->c_str();
|
|
430 |
}
|
|
431 |
};
|
|
432 |
|
|
433 |
@@ -558,7 +564,8 @@
|
|
434 |
return "";
|
|
435 |
const std::string *s =
|
|
436 |
reinterpret_cast<const std::string *>(&v.v_.string_place_);
|
|
437 |
- return s->c_str() == Variant::kNullString.c_str() ? std::string() : *s;
|
|
438 |
+// return s->c_str() == Variant::kNullString.c_str() ? std::string() : *s;
|
|
439 |
+ return s->c_str() == kNullString.c_str() ? std::string() : *s;
|
|
440 |
}
|
|
441 |
};
|
|
442 |
|
|
443 |
@@ -591,7 +598,8 @@
|
|
444 |
return NULL;
|
|
445 |
const UTF16String *s =
|
|
446 |
reinterpret_cast<const UTF16String *>(&v.v_.utf16_string_place_);
|
|
447 |
- return s->c_str() == Variant::kNullUTF16String.c_str() ? NULL : s->c_str();
|
|
448 |
+// return s->c_str() == Variant::kNullUTF16String.c_str() ? NULL : s->c_str();
|
|
449 |
+ return s->c_str() == kNullUTF16String.c_str() ? NULL : s->c_str();
|
|
450 |
}
|
|
451 |
};
|
|
452 |
|
|
453 |
@@ -609,7 +617,8 @@
|
|
454 |
return UTF16String();
|
|
455 |
const UTF16String *s =
|
|
456 |
reinterpret_cast<const UTF16String *>(&v.v_.utf16_string_place_);
|
|
457 |
- return s->c_str() == Variant::kNullUTF16String.c_str() ?
|
|
458 |
+// return s->c_str() == Variant::kNullUTF16String.c_str() ?
|
|
459 |
+ return s->c_str() == kNullUTF16String.c_str() ?
|
|
460 |
UTF16String() : *s;
|
|
461 |
}
|
|
462 |
};
|
|
463 |
@@ -641,7 +650,8 @@
|
|
464 |
return JSONString("");
|
|
465 |
const std::string *s =
|
|
466 |
reinterpret_cast<const std::string *>(&v.v_.string_place_);
|
|
467 |
- return JSONString(s->c_str() == Variant::kNullString.c_str() ?
|
|
468 |
+// return JSONString(s->c_str() == Variant::kNullString.c_str() ?
|
|
469 |
+ return JSONString(s->c_str() == kNullString.c_str() ?
|
|
470 |
std::string() : *s);
|
|
471 |
}
|
|
472 |
};
|
|
473 |
Index: ggadget/variant.cc
|
|
474 |
===================================================================
|
|
475 |
--- ggadget/variant.cc (revision 1038)
|
|
476 |
+++ ggadget/variant.cc (working copy)
|
|
477 |
@@ -31,10 +31,12 @@
|
|
478 |
// We choose the value "(nil)" to ease printing (see Print()).
|
|
479 |
// Don't use blank value, because all strings with blank values are shared
|
|
480 |
// in the standard impl of C++ library.
|
|
481 |
+/*
|
|
482 |
const std::string Variant::kNullString("(nil)");
|
|
483 |
static const UTF16Char kNullUTF16StringValue[] =
|
|
484 |
{ '(', 'n', 'i', 'l', ')', 0 };
|
|
485 |
const UTF16String Variant::kNullUTF16String(kNullUTF16StringValue);
|
|
486 |
+*/
|
|
487 |
|
|
488 |
Variant::Variant() : type_(TYPE_VOID) {
|
|
489 |
memset(&v_, 0, sizeof(v_));
|
|
490 |
Index: ggadget/npapi/npapi_plugin.h
|
|
491 |
===================================================================
|
|
492 |
--- ggadget/npapi/npapi_plugin.h (revision 1038)
|
|
493 |
+++ ggadget/npapi/npapi_plugin.h (working copy)
|
|
494 |
@@ -31,6 +31,7 @@
|
|
495 |
class ScriptableInterface;
|
|
496 |
class Connection;
|
|
497 |
template <typename R, typename P1> class Slot1;
|
|
498 |
+template <typename P1> class Slot1 <void, P1>;
|
|
499 |
|
|
500 |
namespace npapi {
|
|
501 |
|
|
502 |
Index: ggadget/uuid.cc
|
|
503 |
===================================================================
|
|
504 |
--- ggadget/uuid.cc (revision 1038)
|
|
505 |
+++ ggadget/uuid.cc (working copy)
|
|
506 |
@@ -25,6 +25,9 @@
|
|
507 |
#include <cstring>
|
|
508 |
#include <ctime>
|
|
509 |
|
|
510 |
+#include <unistd.h>
|
|
511 |
+#include <stdlib.h>
|
|
512 |
+
|
|
513 |
#include "string_utils.h"
|
|
514 |
|
|
515 |
namespace ggadget {
|
|
516 |
Index: ggadget/gadget.h
|
|
517 |
===================================================================
|
|
518 |
--- ggadget/gadget.h (revision 1038)
|
|
519 |
+++ ggadget/gadget.h (working copy)
|
|
520 |
@@ -25,7 +25,9 @@
|
|
521 |
|
|
522 |
template <typename R> class Slot0;
|
|
523 |
template <typename R, typename P1> class Slot1;
|
|
524 |
+template <typename P1> class Slot1 <void, P1>;
|
|
525 |
template <typename R, typename P1, typename P2> class Slot2;
|
|
526 |
+template <typename P1, typename P2> class Slot2 <void, P1, P2>;
|
|
527 |
class HostInterface;
|
|
528 |
class DetailsViewData;
|
|
529 |
class FileManagerInterface;
|
|
530 |
Index: ggadget/string_utils.cc
|
|
531 |
===================================================================
|
|
532 |
--- ggadget/string_utils.cc (revision 1038)
|
|
533 |
+++ ggadget/string_utils.cc (working copy)
|
|
534 |
@@ -22,6 +22,8 @@
|
|
535 |
#include "string_utils.h"
|
|
536 |
#include "common.h"
|
|
537 |
|
|
538 |
+#include <stdlib.h>
|
|
539 |
+
|
|
540 |
namespace ggadget {
|
|
541 |
|
|
542 |
static const char kSlash = '/';
|
|
543 |
Index: ggadget/xdg/icon_theme.cc
|
|
544 |
===================================================================
|
|
545 |
--- ggadget/xdg/icon_theme.cc (revision 1038)
|
|
546 |
+++ ggadget/xdg/icon_theme.cc (working copy)
|
|
547 |
@@ -21,6 +21,9 @@
|
|
548 |
#include <vector>
|
|
549 |
#include <list>
|
|
550 |
|
|
551 |
+#include <unistd.h>
|
|
552 |
+#include <stdlib.h>
|
|
553 |
+
|
|
554 |
#include <ggadget/string_utils.h>
|
|
555 |
#include <ggadget/logger.h>
|
|
556 |
|
|
557 |
Index: ggadget/run_once.cc
|
|
558 |
===================================================================
|
|
559 |
--- ggadget/run_once.cc (revision 1038)
|
|
560 |
+++ ggadget/run_once.cc (working copy)
|
|
561 |
@@ -97,7 +97,12 @@
|
|
562 |
fd_ = RunAsClient();
|
|
563 |
}
|
|
564 |
|
|
565 |
- sig_t old_proc = signal(SIGPIPE, SIG_IGN);
|
|
566 |
+ struct sigaction act, old_act;
|
|
567 |
+ act.sa_handler = SIG_IGN;
|
|
568 |
+ act.sa_flags = SA_ONSTACK;
|
|
569 |
+ if (sigaction(SIGPIPE, &act, &old_act) < 0)
|
|
570 |
+ return 0;
|
|
571 |
+// sig_t old_proc = signal(SIGPIPE, SIG_IGN);
|
|
572 |
|
|
573 |
fd_set fds;
|
|
574 |
FD_ZERO(&fds);
|
|
575 |
@@ -126,7 +131,9 @@
|
|
576 |
FD_CLR(fd_, &fds);
|
|
577 |
close(fd_);
|
|
578 |
fd_ = -1;
|
|
579 |
- signal(SIGPIPE, old_proc);
|
|
580 |
+// signal(SIGPIPE, old_proc);
|
|
581 |
+ if (sigaction(SIGPIPE, &old_act, NULL) < 0)
|
|
582 |
+ return 0;
|
|
583 |
return written;
|
|
584 |
}
|
|
585 |
|
|
586 |
Index: ggadget/logger.h
|
|
587 |
===================================================================
|
|
588 |
--- ggadget/logger.h (revision 1038)
|
|
589 |
+++ ggadget/logger.h (working copy)
|
|
590 |
@@ -67,7 +67,8 @@
|
|
591 |
#define EXPECT_M(x, y)
|
|
592 |
#define VERIFY(x) (x)
|
|
593 |
#define VERIFY_M(x, y) (x)
|
|
594 |
-#define DLOG true ? (void) 0 : LOGT
|
|
595 |
+//#define DLOG true ? (void) 0 : LOGT
|
|
596 |
+#define DLOG LOGT
|
|
597 |
#else // NDEBUG
|
|
598 |
|
|
599 |
/**
|
|
600 |
Index: ggadget/scriptable_holder.h
|
|
601 |
===================================================================
|
|
602 |
--- ggadget/scriptable_holder.h (revision 1038)
|
|
603 |
+++ ggadget/scriptable_holder.h (working copy)
|
|
604 |
@@ -33,8 +33,7 @@
|
|
605 |
private:
|
|
606 |
// Checks at compile time if the argument T is ScriptableInterface or
|
|
607 |
// derived from it.
|
|
608 |
- COMPILE_ASSERT((IsDerived<ScriptableInterface, T>::value),
|
|
609 |
- T_must_be_ScriptableInterface_or_derived_from_it);
|
|
610 |
+// COMPILE_ASSERT((IsDerived<ScriptableInterface, T>::value), T_must_be_ScriptableInterface_or_derived_from_it);
|
|
611 |
public:
|
|
612 |
explicit ScriptableHolder(T *p = NULL)
|
|
613 |
: ptr_(NULL), on_refchange_connection_(NULL) { Reset(p); }
|
|
614 |
Index: gadgets/designer/designer_script_utils.cc
|
|
615 |
===================================================================
|
|
616 |
--- gadgets/designer/designer_script_utils.cc (revision 1038)
|
|
617 |
+++ gadgets/designer/designer_script_utils.cc (working copy)
|
|
618 |
@@ -40,6 +40,8 @@
|
|
619 |
#include <ggadget/uuid.h>
|
|
620 |
#include <ggadget/view_interface.h>
|
|
621 |
|
|
622 |
+#include <unistd.h>
|
|
623 |
+
|
|
624 |
namespace ggadget {
|
|
625 |
namespace designer {
|
|
626 |
|
1937
|
627 |
--- configure.ac.orig 2009-06-04 22:50:24.471326569 +0800
|
|
628 |
+++ configure.ac 2009-06-04 22:52:49.572821483 +0800
|
|
629 |
@@ -454,16 +454,20 @@
|
|
630 |
fi
|
1624
|
631 |
|
|
632 |
if test x$enable_debug = xyes; then
|
|
633 |
- DEFAULT_COMPILE_FLAGS="-g -O0 -Wall"
|
1937
|
634 |
+# DEFAULT_COMPILE_FLAGS="-g -O0 -Wall"
|
1624
|
635 |
+ DEFAULT_COMPILE_FLAGS="-g -xO0"
|
|
636 |
DEBUG_MACROS="_DEBUG";
|
|
637 |
if test x$has_stack_protector = xyes; then
|
|
638 |
- DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS -fstack-protector-all"
|
|
639 |
+# DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS -fstack-protector-all"
|
|
640 |
+ DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS"
|
|
641 |
fi
|
|
642 |
else
|
|
643 |
- DEFAULT_COMPILE_FLAGS="-O2 -Wall"
|
1937
|
644 |
+# DEFAULT_COMPILE_FLAGS="-O2 -Wall"
|
1624
|
645 |
+ DEFAULT_COMPILE_FLAGS="-xO2"
|
|
646 |
DEBUG_MACROS="NDEBUG";
|
|
647 |
if test x$has_stack_protector = xyes; then
|
|
648 |
- DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS -fstack-protector"
|
|
649 |
+# DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS -fstack-protector"
|
|
650 |
+ DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS"
|
|
651 |
fi
|
|
652 |
fi
|
|
653 |
|
1937
|
654 |
@@ -506,6 +510,7 @@
|
1624
|
655 |
PREDEFINED_MACROS="$PREDEFINED_MACROS -DGGL_HOST_SOLARIS=1"
|
|
656 |
GGL_PLATFORM_SHORT="\"solaris\""
|
1937
|
657 |
GGL_PLATFORM="\"solaris\""
|
1624
|
658 |
+ build_linux_system_framework=yes
|
|
659 |
;;
|
|
660 |
* )
|
1937
|
661 |
ggl_host_type=unknown
|
|
662 |
--- ggadget/unicode_utils.h.orig 2009-06-13 00:24:47.316406896 +0800
|
|
663 |
+++ ggadget/unicode_utils.h 2009-06-13 00:24:55.646421178 +0800
|
|
664 |
@@ -27,8 +27,8 @@
|
|
665 |
|
|
666 |
namespace std {
|
|
667 |
/* To meet the ODR(One Definition Rule) requirement */
|
|
668 |
-extern template class std::basic_string<ggadget::UTF16Char>;
|
|
669 |
-extern template class std::basic_string<ggadget::UTF32Char>;
|
|
670 |
+//extern template class std::basic_string<ggadget::UTF16Char>;
|
|
671 |
+//extern template class std::basic_string<ggadget::UTF32Char>;
|
|
672 |
}
|
|
673 |
|
|
674 |
namespace ggadget {
|