updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / sdcv / sdcv-0.4.2-headers.patch
blob9affec151bfa8f619cb143d3879d6e93ee99a9eb
1 diff -ruN sdcv-0.4.2-orig/src/lib/lib.cpp sdcv-0.4.2/src/lib/lib.cpp
2 --- sdcv-0.4.2-orig/src/lib/lib.cpp 2006-04-24 10:17:27.000000000 +0200
3 +++ sdcv-0.4.2/src/lib/lib.cpp 2009-12-19 21:15:37.000000000 +0100
4 @@ -513,7 +513,7 @@
6 fseek(idxfile, wordoffset[page_idx], SEEK_SET);
7 guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx];
8 - fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
9 + 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.
10 return wordentry_buf;
13 diff -ruN sdcv-0.4.2-orig/src/libwrapper.cpp sdcv-0.4.2/src/libwrapper.cpp
14 --- sdcv-0.4.2-orig/src/libwrapper.cpp 2006-04-24 12:40:29.000000000 +0200
15 +++ sdcv-0.4.2/src/libwrapper.cpp 2009-12-19 21:15:37.000000000 +0100
16 @@ -24,6 +24,7 @@
18 #include <glib/gi18n.h>
19 #include <map>
20 +#include <cstring>
22 #include "utils.hpp"
24 diff -ruN sdcv-0.4.2-orig/src/readline.cpp sdcv-0.4.2/src/readline.cpp
25 --- sdcv-0.4.2-orig/src/readline.cpp 2005-12-07 23:07:23.000000000 +0100
26 +++ sdcv-0.4.2/src/readline.cpp 2009-12-19 21:15:37.000000000 +0100
27 @@ -23,6 +23,7 @@
28 #endif
30 #include <cstdio>
31 +#include <cstdlib>
32 #ifdef WITH_READLINE
33 # include <readline/readline.h>
34 # include <readline/history.h>
35 diff -ruN sdcv-0.4.2-orig/src/utils.cpp sdcv-0.4.2/src/utils.cpp
36 --- sdcv-0.4.2-orig/src/utils.cpp 2006-04-24 11:03:47.000000000 +0200
37 +++ sdcv-0.4.2/src/utils.cpp 2009-12-19 21:15:37.000000000 +0100
38 @@ -22,6 +22,8 @@
39 # include "config.h"
40 #endif
42 +#include <cstdio>
43 +#include <cstdlib>
44 #include <glib.h>
45 #include <glib/gi18n.h>