OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| 1 | fix compile error |
| 2 | |
| 3 | From: Xiangfu Liu <xiangfu@sharism.cc> |
| 4 | |
| 5 | |
| 6 | --- |
| 7 | |
| 8 | src/gconf_file.cpp | 2 ++ |
| 9 | src/inifile.cpp | 1 + |
| 10 | src/lib/common.cpp | 2 ++ |
| 11 | src/lib/data.cpp | 2 ++ |
| 12 | src/lib/http_client.cpp | 1 + |
| 13 | src/lib/pluginmanager.cpp | 2 +- |
| 14 | src/lib/stardict_client.cpp | 2 ++ |
| 15 | src/lib/treedict.cpp | 1 + |
| 16 | src/pangoview.cpp | 2 ++ |
| 17 | src/prefsdlg.cpp | 1 + |
| 18 | src/readword.cpp | 1 + |
| 19 | src/sigc++/signal.h | 2 +- |
| 20 | src/utils.cpp | 2 ++ |
| 21 | src/x11_iskeyspressed.hpp | 2 ++ |
| 22 | .../stardict_dictdotcn.cpp | 2 +- |
| 23 | .../stardict-espeak-tts-plugin/stardict_espeak.cpp | 1 + |
| 24 | .../stardict_gucharmap.cpp | 3 ++- |
| 25 | .../stardict_html_parsedata.cpp | 2 ++ |
| 26 | .../stardict-man-plugin/stardict_man.cpp | 2 +- |
| 27 | .../stardict_powerword_parsedata.cpp | 1 + |
| 28 | .../stardict-qqwry-plugin/stardict_qqwry.cpp | 3 ++- |
| 29 | .../stardict-spell-plugin/stardict_spell.cpp | 1 + |
| 30 | .../stardict_wiki2xml.cpp | 1 + |
| 31 | .../stardict_wiki_parsedata.cpp | 1 + |
| 32 | .../stardict-wordnet-plugin/court_widget.cpp | 1 + |
| 33 | .../stardict-wordnet-plugin/stardict_wordnet.cpp | 1 + |
| 34 | .../stardict_wordnet_parsedata.cpp | 1 + |
| 35 | .../stardict_xdxf_parsedata.cpp | 1 + |
| 36 | tests/t_config_file.cpp | 1 + |
| 37 | tests/t_xml.cpp | 1 + |
| 38 | 30 files changed, 40 insertions(+), 6 deletions(-) |
| 39 | |
| 40 | |
| 41 | diff --git a/src/gconf_file.cpp b/src/gconf_file.cpp |
| 42 | index a5b81c6..e1d43aa 100644 |
| 43 | --- a/src/gconf_file.cpp |
| 44 | +++ b/src/gconf_file.cpp |
| 45 | @@ -22,6 +22,8 @@ |
| 46 | # include "config.h" |
| 47 | #endif |
| 48 | |
| 49 | +#include <memory> |
| 50 | + |
| 51 | #include <glib/gi18n.h> |
| 52 | |
| 53 | #include "gconf_file.hpp" |
| 54 | diff --git a/src/inifile.cpp b/src/inifile.cpp |
| 55 | index 2f73f7b..e652709 100644 |
| 56 | --- a/src/inifile.cpp |
| 57 | +++ b/src/inifile.cpp |
| 58 | @@ -25,6 +25,7 @@ |
| 59 | #include <vector> |
| 60 | #include <cerrno> |
| 61 | #include <cstring> |
| 62 | +#include <cstdlib> |
| 63 | #include <cstdio> |
| 64 | #include <glib/gi18n.h> |
| 65 | #include <glib/gstdio.h> |
| 66 | diff --git a/src/lib/common.cpp b/src/lib/common.cpp |
| 67 | index 6575ad9..29faf9e 100644 |
| 68 | --- a/src/lib/common.cpp |
| 69 | +++ b/src/lib/common.cpp |
| 70 | @@ -24,6 +24,8 @@ |
| 71 | # include "config.h" |
| 72 | #endif |
| 73 | |
| 74 | +#include <cstdlib> |
| 75 | +#include <cstring> |
| 76 | #include "common.hpp" |
| 77 | |
| 78 | static void parse_description(const char *p, long len, std::string &description) |
| 79 | diff --git a/src/lib/data.cpp b/src/lib/data.cpp |
| 80 | index 45c7d1a..a428b37 100644 |
| 81 | --- a/src/lib/data.cpp |
| 82 | +++ b/src/lib/data.cpp |
| 83 | @@ -22,6 +22,8 @@ |
| 84 | # include "config.h" |
| 85 | #endif |
| 86 | |
| 87 | +#include <cstdio> |
| 88 | +#include <cstring> |
| 89 | #include "kmp.h" |
| 90 | |
| 91 | #include "data.hpp" |
| 92 | diff --git a/src/lib/http_client.cpp b/src/lib/http_client.cpp |
| 93 | index 802a469..732f205 100644 |
| 94 | --- a/src/lib/http_client.cpp |
| 95 | +++ b/src/lib/http_client.cpp |
| 96 | @@ -2,6 +2,7 @@ |
| 97 | # include "config.h" |
| 98 | #endif |
| 99 | |
| 100 | +#include <cstring> |
| 101 | #include "http_client.h" |
| 102 | #include "sockets.hpp" |
| 103 | |
| 104 | diff --git a/src/lib/pluginmanager.cpp b/src/lib/pluginmanager.cpp |
| 105 | index de3e92d..28a46c4 100644 |
| 106 | --- a/src/lib/pluginmanager.cpp |
| 107 | +++ b/src/lib/pluginmanager.cpp |
| 108 | @@ -1,6 +1,6 @@ |
| 109 | #include "pluginmanager.h" |
| 110 | #include "file.hpp" |
| 111 | -#include <string> |
| 112 | +#include <cstring> |
| 113 | |
| 114 | StarDictPluginBaseObject::StarDictPluginBaseObject(const char *filename, GModule *module_, plugin_configure_func_t configure_func_): |
| 115 | plugin_filename(filename), module(module_), configure_func(configure_func_) |
| 116 | diff --git a/src/lib/stardict_client.cpp b/src/lib/stardict_client.cpp |
| 117 | index dcae5ce..407a907 100644 |
| 118 | --- a/src/lib/stardict_client.cpp |
| 119 | +++ b/src/lib/stardict_client.cpp |
| 120 | @@ -25,6 +25,8 @@ |
| 121 | #include <glib.h> |
| 122 | #include <glib/gi18n.h> |
| 123 | |
| 124 | +#include <cstdio> |
| 125 | +#include <cstdlib> |
| 126 | #include "sockets.hpp" |
| 127 | #include "md5.h" |
| 128 | #include "getuint32.h" |
| 129 | diff --git a/src/lib/treedict.cpp b/src/lib/treedict.cpp |
| 130 | index 01fa89a..f0b3322 100644 |
| 131 | --- a/src/lib/treedict.cpp |
| 132 | +++ b/src/lib/treedict.cpp |
| 133 | @@ -25,6 +25,7 @@ |
| 134 | # include "config.h" |
| 135 | #endif |
| 136 | |
| 137 | +#include <cstring> |
| 138 | #include "file.hpp" |
| 139 | #include "getuint32.h" |
| 140 | |
| 141 | diff --git a/src/pangoview.cpp b/src/pangoview.cpp |
| 142 | index eb5d34d..e400ac3 100644 |
| 143 | --- a/src/pangoview.cpp |
| 144 | +++ b/src/pangoview.cpp |
| 145 | @@ -22,6 +22,8 @@ |
| 146 | # include "config.h" |
| 147 | #endif |
| 148 | |
| 149 | +#include <cstring> |
| 150 | + |
| 151 | #include "gtktextviewpango.h" |
| 152 | #include "utils.h" |
| 153 | #include "skin.h"//for SkinCursor definition |
| 154 | diff --git a/src/prefsdlg.cpp b/src/prefsdlg.cpp |
| 155 | index 33648ed..14e3f15 100644 |
| 156 | --- a/src/prefsdlg.cpp |
| 157 | +++ b/src/prefsdlg.cpp |
| 158 | @@ -21,6 +21,7 @@ |
| 159 | # include "config.h" |
| 160 | #endif |
| 161 | |
| 162 | +#include <cstdlib> |
| 163 | #include <glib/gi18n.h> |
| 164 | #include <glib/gstdio.h> |
| 165 | |
| 166 | diff --git a/src/readword.cpp b/src/readword.cpp |
| 167 | index 340fbb6..f6efb2c 100644 |
| 168 | --- a/src/readword.cpp |
| 169 | +++ b/src/readword.cpp |
| 170 | @@ -3,6 +3,7 @@ |
| 171 | #endif |
| 172 | |
| 173 | #include <cstring> |
| 174 | +#include <cstdlib> |
| 175 | #include <string> |
| 176 | |
| 177 | #include <glib/gi18n.h> |
| 178 | diff --git a/src/sigc++/signal.h b/src/sigc++/signal.h |
| 179 | index 282a5b1..b103dbf 100644 |
| 180 | --- a/src/sigc++/signal.h |
| 181 | +++ b/src/sigc++/signal.h |
| 182 | @@ -18,7 +18,7 @@ |
| 183 | //Compilers, such as older versions of SUN Forte C++, that do not allow this also often |
| 184 | //do not allow a typedef to have the same name as a class in the typedef's definition. |
| 185 | //For Sun Forte CC 5.7 (SUN Workshop 10), comment this out to fix the build. |
| 186 | - #define SIGC_TYPEDEF_REDEFINE_ALLOWED 1 |
| 187 | +// #define SIGC_TYPEDEF_REDEFINE_ALLOWED 1 |
| 188 | #endif |
| 189 | |
| 190 | namespace sigc { |
| 191 | diff --git a/src/utils.cpp b/src/utils.cpp |
| 192 | index 4a09f30..2ce059b 100644 |
| 193 | --- a/src/utils.cpp |
| 194 | +++ b/src/utils.cpp |
| 195 | @@ -22,6 +22,8 @@ |
| 196 | # include "config.h" |
| 197 | #endif |
| 198 | |
| 199 | +#include <cstring> |
| 200 | + |
| 201 | #include <glib.h> |
| 202 | #include <glib/gi18n.h> |
| 203 | #include <cstdlib> |
| 204 | diff --git a/src/x11_iskeyspressed.hpp b/src/x11_iskeyspressed.hpp |
| 205 | index 9b0d375..f7391ad 100644 |
| 206 | --- a/src/x11_iskeyspressed.hpp |
| 207 | +++ b/src/x11_iskeyspressed.hpp |
| 208 | @@ -1,6 +1,8 @@ |
| 209 | #ifndef _X11_ISKEYSPRESSED_HPP_ |
| 210 | #define _X11_ISKEYSPRESSED_HPP_ |
| 211 | |
| 212 | +#include <memory> |
| 213 | + |
| 214 | #include <gdk/gdkx.h> |
| 215 | #include <X11/keysym.h> |
| 216 | #include <gtk/gtk.h> |
| 217 | diff --git a/stardict-plugins/stardict-dictdotcn-plugin/stardict_dictdotcn.cpp b/stardict-plugins/stardict-dictdotcn-plugin/stardict_dictdotcn.cpp |
| 218 | index b779046..f608fb1 100644 |
| 219 | --- a/stardict-plugins/stardict-dictdotcn-plugin/stardict_dictdotcn.cpp |
| 220 | +++ b/stardict-plugins/stardict-dictdotcn-plugin/stardict_dictdotcn.cpp |
| 221 | @@ -1,6 +1,6 @@ |
| 222 | #include "stardict_dictdotcn.h" |
| 223 | #include <glib/gi18n.h> |
| 224 | -#include <string> |
| 225 | +#include <cstring> |
| 226 | #include <list> |
| 227 | |
| 228 | #ifdef _WIN32 |
| 229 | diff --git a/stardict-plugins/stardict-espeak-tts-plugin/stardict_espeak.cpp b/stardict-plugins/stardict-espeak-tts-plugin/stardict_espeak.cpp |
| 230 | index 08d6f91..340cf5c 100644 |
| 231 | --- a/stardict-plugins/stardict-espeak-tts-plugin/stardict_espeak.cpp |
| 232 | +++ b/stardict-plugins/stardict-espeak-tts-plugin/stardict_espeak.cpp |
| 233 | @@ -1,4 +1,5 @@ |
| 234 | #include "stardict_espeak.h" |
| 235 | +#include <cstring> |
| 236 | #include <espeak/speak_lib.h> |
| 237 | #include <glib/gi18n.h> |
| 238 | |
| 239 | diff --git a/stardict-plugins/stardict-gucharmap-plugin/stardict_gucharmap.cpp b/stardict-plugins/stardict-gucharmap-plugin/stardict_gucharmap.cpp |
| 240 | index f522e07..855c5fd 100644 |
| 241 | --- a/stardict-plugins/stardict-gucharmap-plugin/stardict_gucharmap.cpp |
| 242 | +++ b/stardict-plugins/stardict-gucharmap-plugin/stardict_gucharmap.cpp |
| 243 | @@ -1,7 +1,8 @@ |
| 244 | #include "stardict_gucharmap.h" |
| 245 | #include <glib/gi18n.h> |
| 246 | #include <gucharmap/gucharmap.h> |
| 247 | -#include <string> |
| 248 | +#include <cstring> |
| 249 | +#include <cstdlib> |
| 250 | |
| 251 | static char *build_dictdata(char type, const char *definition) |
| 252 | { |
| 253 | diff --git a/stardict-plugins/stardict-html-parsedata-plugin/stardict_html_parsedata.cpp b/stardict-plugins/stardict-html-parsedata-plugin/stardict_html_parsedata.cpp |
| 254 | index 8bb78e8..1803299 100644 |
| 255 | --- a/stardict-plugins/stardict-html-parsedata-plugin/stardict_html_parsedata.cpp |
| 256 | +++ b/stardict-plugins/stardict-html-parsedata-plugin/stardict_html_parsedata.cpp |
| 257 | @@ -1,4 +1,6 @@ |
| 258 | #include "stardict_html_parsedata.h" |
| 259 | +#include <cstring> |
| 260 | +#include <cstdlib> |
| 261 | #include <glib/gi18n.h> |
| 262 | |
| 263 | #ifdef _WIN32 |
| 264 | diff --git a/stardict-plugins/stardict-man-plugin/stardict_man.cpp b/stardict-plugins/stardict-man-plugin/stardict_man.cpp |
| 265 | index 1587e46..dfd7560 100644 |
| 266 | --- a/stardict-plugins/stardict-man-plugin/stardict_man.cpp |
| 267 | +++ b/stardict-plugins/stardict-man-plugin/stardict_man.cpp |
| 268 | @@ -1,6 +1,6 @@ |
| 269 | #include "stardict_man.h" |
| 270 | #include <glib/gi18n.h> |
| 271 | -#include <string> |
| 272 | +#include <cstring> |
| 273 | |
| 274 | static const StarDictPluginSystemInfo *plugin_info = NULL; |
| 275 | static bool need_prefix; |
| 276 | diff --git a/stardict-plugins/stardict-powerword-parsedata-plugin/stardict_powerword_parsedata.cpp b/stardict-plugins/stardict-powerword-parsedata-plugin/stardict_powerword_parsedata.cpp |
| 277 | index 068ebbe..4da5c81 100644 |
| 278 | --- a/stardict-plugins/stardict-powerword-parsedata-plugin/stardict_powerword_parsedata.cpp |
| 279 | +++ b/stardict-plugins/stardict-powerword-parsedata-plugin/stardict_powerword_parsedata.cpp |
| 280 | @@ -1,4 +1,5 @@ |
| 281 | #include "stardict_powerword_parsedata.h" |
| 282 | +#include <cstring> |
| 283 | #include <glib/gi18n.h> |
| 284 | |
| 285 | #ifdef _WIN32 |
| 286 | diff --git a/stardict-plugins/stardict-qqwry-plugin/stardict_qqwry.cpp b/stardict-plugins/stardict-qqwry-plugin/stardict_qqwry.cpp |
| 287 | index 65234dc..b5a7046 100644 |
| 288 | --- a/stardict-plugins/stardict-qqwry-plugin/stardict_qqwry.cpp |
| 289 | +++ b/stardict-plugins/stardict-qqwry-plugin/stardict_qqwry.cpp |
| 290 | @@ -1,7 +1,8 @@ |
| 291 | #include "stardict_qqwry.h" |
| 292 | #include <glib/gi18n.h> |
| 293 | #include <glib/gstdio.h> |
| 294 | -#include <string> |
| 295 | +#include <cstring> |
| 296 | +#include <cstdlib> |
| 297 | |
| 298 | #ifdef _WIN32 |
| 299 | #include <windows.h> |
| 300 | diff --git a/stardict-plugins/stardict-spell-plugin/stardict_spell.cpp b/stardict-plugins/stardict-spell-plugin/stardict_spell.cpp |
| 301 | index af3e8ae..d5e66af 100644 |
| 302 | --- a/stardict-plugins/stardict-spell-plugin/stardict_spell.cpp |
| 303 | +++ b/stardict-plugins/stardict-spell-plugin/stardict_spell.cpp |
| 304 | @@ -1,4 +1,5 @@ |
| 305 | #include "stardict_spell.h" |
| 306 | +#include <cstring> |
| 307 | #include <glib.h> |
| 308 | #include <glib/gi18n.h> |
| 309 | #include <enchant.h> |
| 310 | diff --git a/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki2xml.cpp b/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki2xml.cpp |
| 311 | index 0cfade9..f1a0277 100644 |
| 312 | --- a/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki2xml.cpp |
| 313 | +++ b/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki2xml.cpp |
| 314 | @@ -1,5 +1,6 @@ |
| 315 | #include "stardict_wiki2xml.h" |
| 316 | #include "WIKI2XML.h" |
| 317 | +#include <cstring> |
| 318 | #include <glib.h> |
| 319 | |
| 320 | std::string wiki2xml(std::string &str) |
| 321 | diff --git a/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki_parsedata.cpp b/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki_parsedata.cpp |
| 322 | index fdf5270..8a6f7b0 100644 |
| 323 | --- a/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki_parsedata.cpp |
| 324 | +++ b/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki_parsedata.cpp |
| 325 | @@ -1,5 +1,6 @@ |
| 326 | #include "stardict_wiki_parsedata.h" |
| 327 | #include "stardict_wiki2xml.h" |
| 328 | +#include <cstring> |
| 329 | #include <glib/gi18n.h> |
| 330 | |
| 331 | #ifdef _WIN32 |
| 332 | diff --git a/stardict-plugins/stardict-wordnet-plugin/court_widget.cpp b/stardict-plugins/stardict-wordnet-plugin/court_widget.cpp |
| 333 | index 37b227e..1e49f90 100644 |
| 334 | --- a/stardict-plugins/stardict-wordnet-plugin/court_widget.cpp |
| 335 | +++ b/stardict-plugins/stardict-wordnet-plugin/court_widget.cpp |
| 336 | @@ -1,4 +1,5 @@ |
| 337 | #include "court_widget.h" |
| 338 | +#include <cstring> |
| 339 | #include <math.h> |
| 340 | #include <list> |
| 341 | |
| 342 | diff --git a/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet.cpp b/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet.cpp |
| 343 | index 043afaf..bc4c9ff 100644 |
| 344 | --- a/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet.cpp |
| 345 | +++ b/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet.cpp |
| 346 | @@ -1,5 +1,6 @@ |
| 347 | #include "stardict_wordnet.h" |
| 348 | #include "court_widget.h" |
| 349 | +#include <cstring> |
| 350 | #include <glib/gi18n.h> |
| 351 | |
| 352 | #ifdef _WIN32 |
| 353 | diff --git a/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet_parsedata.cpp b/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet_parsedata.cpp |
| 354 | index 9f9ab9f..c5397e1 100644 |
| 355 | --- a/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet_parsedata.cpp |
| 356 | +++ b/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet_parsedata.cpp |
| 357 | @@ -1,4 +1,5 @@ |
| 358 | #include "stardict_wordnet_parsedata.h" |
| 359 | +#include <cstring> |
| 360 | #include <glib/gi18n.h> |
| 361 | |
| 362 | #ifdef _WIN32 |
| 363 | diff --git a/stardict-plugins/stardict-xdxf-parsedata-plugin/stardict_xdxf_parsedata.cpp b/stardict-plugins/stardict-xdxf-parsedata-plugin/stardict_xdxf_parsedata.cpp |
| 364 | index 905a01d..b143b90 100644 |
| 365 | --- a/stardict-plugins/stardict-xdxf-parsedata-plugin/stardict_xdxf_parsedata.cpp |
| 366 | +++ b/stardict-plugins/stardict-xdxf-parsedata-plugin/stardict_xdxf_parsedata.cpp |
| 367 | @@ -1,4 +1,5 @@ |
| 368 | #include "stardict_xdxf_parsedata.h" |
| 369 | +#include <cstring> |
| 370 | #include <glib/gi18n.h> |
| 371 | |
| 372 | #ifdef _WIN32 |
| 373 | diff --git a/tests/t_config_file.cpp b/tests/t_config_file.cpp |
| 374 | index 73e2a52..24715cf 100644 |
| 375 | --- a/tests/t_config_file.cpp |
| 376 | +++ b/tests/t_config_file.cpp |
| 377 | @@ -8,6 +8,7 @@ |
| 378 | #include <cstring> |
| 379 | #include <iterator> |
| 380 | #include <iostream> |
| 381 | +#include <memory> |
| 382 | #include <gtk/gtk.h> |
| 383 | |
| 384 | #include "config_file.hpp" |
| 385 | diff --git a/tests/t_xml.cpp b/tests/t_xml.cpp |
| 386 | index a20422d..29b3d2a 100644 |
| 387 | --- a/tests/t_xml.cpp |
| 388 | +++ b/tests/t_xml.cpp |
| 389 | @@ -5,6 +5,7 @@ |
| 390 | #include <glib.h> |
| 391 | #include <cstdlib> |
| 392 | #include <string> |
| 393 | +#include <cstring> |
| 394 | |
| 395 | |
| 396 | static void xml_decode(const char *str, std::string& decoded) |
| 397 |
