1 Index: configure.ac |
|
2 =================================================================== |
|
3 RCS file: /cvsroot/scim/scim-bridge/configure.ac,v |
|
4 retrieving revision 1.40 |
|
5 diff -u -p -r1.40 configure.ac |
|
6 --- configure.ac 10 Feb 2007 16:25:30 -0000 1.40 |
|
7 +++ configure.ac 15 May 2007 09:59:54 -0000 |
|
8 @@ -132,8 +132,8 @@ AC_ARG_ENABLE(qt3-immodule, |
|
9 |
|
10 if test "$enable_debug" = "yes"; then |
|
11 AC_DEFINE(ENABLE_DEBUG,1,[Define this to enable the debug facility in libscim]) |
|
12 - CFLAGS="$CFLAGS -g -Wall -Wmissing-declarations -Wreturn-type" |
|
13 - CXXFLAGS="$CXXFLAGS -g -Wall -Wshadow -Woverloaded-virtual -Wreturn-type" |
|
14 + CFLAGS="$CFLAGS -g" |
|
15 + CXXFLAGS="$CXXFLAGS -g" |
|
16 else |
|
17 enable_debug=no |
|
18 fi |
|
19 Index: agent/scim-bridge-agent-client-listener.cpp |
|
20 =================================================================== |
|
21 RCS file: /cvsroot/scim/scim-bridge/agent/scim-bridge-agent-client-listener.cpp,v |
|
22 retrieving revision 1.29 |
|
23 diff -u -p -r1.29 scim-bridge-agent-client-listener.cpp |
|
24 --- agent/scim-bridge-agent-client-listener.cpp 30 Sep 2006 16:35:20 -0000 1.29 |
|
25 +++ agent/scim-bridge-agent-client-listener.cpp 15 May 2007 09:59:55 -0000 |
|
26 @@ -19,6 +19,7 @@ |
|
27 |
|
28 #include <errno.h> |
|
29 #include <unistd.h> |
|
30 +#include <alloca.h> |
|
31 |
|
32 #include <sys/select.h> |
|
33 #include <sys/socket.h> |
|
34 Index: agent/scim-bridge-agent-imcontext.cpp |
|
35 =================================================================== |
|
36 RCS file: /cvsroot/scim/scim-bridge/agent/scim-bridge-agent-imcontext.cpp,v |
|
37 retrieving revision 1.68 |
|
38 diff -u -p -r1.68 scim-bridge-agent-imcontext.cpp |
|
39 --- agent/scim-bridge-agent-imcontext.cpp 18 Feb 2007 02:15:51 -0000 1.68 |
|
40 +++ agent/scim-bridge-agent-imcontext.cpp 15 May 2007 09:59:56 -0000 |
|
41 @@ -18,7 +18,7 @@ |
|
42 */ |
|
43 |
|
44 #include <assert.h> |
|
45 - |
|
46 +#include <libintl.h> |
|
47 #include <sys/time.h> |
|
48 |
|
49 #include <list> |
|
50 Index: agent/scim-bridge-agent-output.cpp |
|
51 =================================================================== |
|
52 RCS file: /cvsroot/scim/scim-bridge/agent/scim-bridge-agent-output.cpp,v |
|
53 retrieving revision 1.19 |
|
54 diff -u -p -r1.19 scim-bridge-agent-output.cpp |
|
55 --- agent/scim-bridge-agent-output.cpp 24 Sep 2006 04:30:42 -0000 1.19 |
|
56 +++ agent/scim-bridge-agent-output.cpp 15 May 2007 09:59:56 -0000 |
|
57 @@ -71,10 +71,9 @@ static void vxsyslog (int priority, cons |
|
58 { |
|
59 if (!initialized) static_initialize (); |
|
60 |
|
61 - char *expanded_format; |
|
62 - vasprintf (&expanded_format, format, ap); |
|
63 + char expanded_format[1024]; |
|
64 + vsnprintf (expanded_format, sizeof(expanded_format), format, ap); |
|
65 syslog (priority, "%s", expanded_format); |
|
66 - free (expanded_format); |
|
67 } |
|
68 |
|
69 |
|
70 Index: agent/utils/scim-bridge-agent-panel-client.cpp |
|
71 =================================================================== |
|
72 RCS file: /cvsroot/scim/scim-bridge/agent/utils/scim-bridge-agent-panel-client.cpp,v |
|
73 retrieving revision 1.14 |
|
74 diff -u -p -r1.14 scim-bridge-agent-panel-client.cpp |
|
75 --- agent/utils/scim-bridge-agent-panel-client.cpp 10 Dec 2006 05:32:52 -0000 1.14 |
|
76 +++ agent/utils/scim-bridge-agent-panel-client.cpp 15 May 2007 09:59:56 -0000 |
|
77 @@ -171,6 +171,47 @@ ScimBridgeAgentPanelClientImpl::~ScimBri |
|
78 scim_bridge_free_display (display); |
|
79 } |
|
80 |
|
81 +#ifndef HAVE_DAEMON |
|
82 +void closeall(int fd) |
|
83 +{ |
|
84 + int fdlimit = sysconf(_SC_OPEN_MAX); |
|
85 + |
|
86 + while (fd < fdlimit) |
|
87 + close(fd++); |
|
88 +} |
|
89 + |
|
90 +int daemon(int nochdir, int noclose) |
|
91 +{ |
|
92 + switch (fork()) |
|
93 + { |
|
94 + case 0: break; |
|
95 + case -1: return -1; |
|
96 + default: _exit(0); |
|
97 + } |
|
98 + |
|
99 + if (setsid() < 0) |
|
100 + return -1; |
|
101 + |
|
102 + switch (fork()) |
|
103 + { |
|
104 + case 0: break; |
|
105 + case -1: return -1; |
|
106 + default: _exit(0); |
|
107 + } |
|
108 + |
|
109 + if (!nochdir) |
|
110 + chdir("/"); |
|
111 + |
|
112 + if (!noclose) |
|
113 + { |
|
114 + closeall(0); |
|
115 + open("/dev/null",O_RDWR); |
|
116 + dup(0); dup(0); |
|
117 + } |
|
118 + |
|
119 + return 0; |
|
120 +} |
|
121 +#endif |
|
122 |
|
123 retval_t ScimBridgeAgentPanelClientImpl::launch_panel () |
|
124 { |
|
125 Index: common/scim-bridge-display.c |
|
126 =================================================================== |
|
127 RCS file: /cvsroot/scim/scim-bridge/common/scim-bridge-display.c,v |
|
128 retrieving revision 1.7 |
|
129 diff -u -p -r1.7 scim-bridge-display.c |
|
130 --- common/scim-bridge-display.c 24 Sep 2006 10:06:36 -0000 1.7 |
|
131 +++ common/scim-bridge-display.c 15 May 2007 09:59:56 -0000 |
|
132 @@ -20,6 +20,7 @@ |
|
133 #include <malloc.h> |
|
134 #include <stdlib.h> |
|
135 #include <string.h> |
|
136 +#include <strings.h> |
|
137 |
|
138 #include "scim-bridge-display.h" |
|
139 #include "scim-bridge-output.h" |
|
140 Index: common/scim-bridge-string.c |
|
141 =================================================================== |
|
142 RCS file: /cvsroot/scim/scim-bridge/common/scim-bridge-string.c,v |
|
143 retrieving revision 1.12 |
|
144 diff -u -p -r1.12 scim-bridge-string.c |
|
145 --- common/scim-bridge-string.c 23 Nov 2006 01:14:31 -0000 1.12 |
|
146 +++ common/scim-bridge-string.c 15 May 2007 09:59:56 -0000 |
|
147 @@ -24,6 +24,7 @@ |
|
148 #include <stdlib.h> |
|
149 #include <string.h> |
|
150 #include <wchar.h> |
|
151 +#include <alloca.h> |
|
152 |
|
153 #include "scim-bridge-string.h" |
|
154 #include "scim-bridge-output.h" |
|
155 Index: common/scim-bridge-string.h |
|
156 =================================================================== |
|
157 RCS file: /cvsroot/scim/scim-bridge/common/scim-bridge-string.h,v |
|
158 retrieving revision 1.8 |
|
159 diff -u -p -r1.8 scim-bridge-string.h |
|
160 --- common/scim-bridge-string.h 24 Sep 2006 10:06:36 -0000 1.8 |
|
161 +++ common/scim-bridge-string.h 15 May 2007 09:59:56 -0000 |
|
162 @@ -41,7 +41,7 @@ extern "C" |
|
163 /** |
|
164 * The type for wide string. |
|
165 */ |
|
166 - typedef uint32 wchar; |
|
167 + typedef unsigned int wchar; |
|
168 #else |
|
169 /** |
|
170 * The type for wide string. |
|