summaryrefslogtreecommitdiff
path: root/community/sdcv/sdcv-0.4.2-headers.patch
blob: 9affec151bfa8f619cb143d3879d6e93ee99a9eb (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
diff -ruN sdcv-0.4.2-orig/src/lib/lib.cpp sdcv-0.4.2/src/lib/lib.cpp
--- sdcv-0.4.2-orig/src/lib/lib.cpp	2006-04-24 10:17:27.000000000 +0200
+++ sdcv-0.4.2/src/lib/lib.cpp	2009-12-19 21:15:37.000000000 +0100
@@ -513,7 +513,7 @@
 {
 	fseek(idxfile, wordoffset[page_idx], SEEK_SET);
 	guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx];
-	fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
+	fread(wordentry_buf, std::min(sizeof(wordentry_buf), (size_t)page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
 	return wordentry_buf;
 }

diff -ruN sdcv-0.4.2-orig/src/libwrapper.cpp sdcv-0.4.2/src/libwrapper.cpp
--- sdcv-0.4.2-orig/src/libwrapper.cpp	2006-04-24 12:40:29.000000000 +0200
+++ sdcv-0.4.2/src/libwrapper.cpp	2009-12-19 21:15:37.000000000 +0100
@@ -24,6 +24,7 @@
 
 #include <glib/gi18n.h>
 #include <map>
+#include <cstring>
 
 #include "utils.hpp"
 
diff -ruN sdcv-0.4.2-orig/src/readline.cpp sdcv-0.4.2/src/readline.cpp
--- sdcv-0.4.2-orig/src/readline.cpp	2005-12-07 23:07:23.000000000 +0100
+++ sdcv-0.4.2/src/readline.cpp	2009-12-19 21:15:37.000000000 +0100
@@ -23,6 +23,7 @@
 #endif
 
 #include <cstdio>
+#include <cstdlib>
 #ifdef WITH_READLINE
 #  include <readline/readline.h>
 #  include <readline/history.h>
diff -ruN sdcv-0.4.2-orig/src/utils.cpp sdcv-0.4.2/src/utils.cpp
--- sdcv-0.4.2-orig/src/utils.cpp	2006-04-24 11:03:47.000000000 +0200
+++ sdcv-0.4.2/src/utils.cpp	2009-12-19 21:15:37.000000000 +0100
@@ -22,6 +22,8 @@
 #  include "config.h"
 #endif
 
+#include <cstdio>
+#include <cstdlib>
 #include <glib.h>
 #include <glib/gi18n.h>