775029c
Fixes compilation with recent GCC which is more strict about C++.
775029c
http://sourceforge.net/tracker/index.php?func=detail&aid=2125955&group_id=122858&atid=694730
775029c
--- a/src/readline.cpp
775029c
+++ b/src/readline.cpp
775029c
@@ -23,6 +23,7 @@
775029c
 #endif
775029c
 
775029c
 #include <cstdio>
775029c
+#include <cstdlib>
775029c
 #ifdef WITH_READLINE
775029c
 #  include <readline/readline.h>
775029c
 #  include <readline/history.h>
775029c
--- a/src/libwrapper.cpp
775029c
+++ b/src/libwrapper.cpp
775029c
@@ -24,6 +24,7 @@
775029c
 
775029c
 #include <glib/gi18n.h>
775029c
 #include <map>
775029c
+#include <cstring>
775029c
 
775029c
 #include "utils.hpp"
775029c
 
775029c
--- a/src/utils.cpp
775029c
+++ b/src/utils.cpp
775029c
@@ -22,6 +22,8 @@
775029c
 #  include "config.h"
775029c
 #endif
775029c
 
775029c
+#include <cstdio>
775029c
+#include <cstdlib>
775029c
 #include <glib.h>
775029c
 #include <glib/gi18n.h>
775029c
 
775029c
--- a/src/lib/lib.cpp
775029c
+++ b/src/lib/lib.cpp
775029c
@@ -513,7 +513,7 @@
775029c
 {
775029c
 	fseek(idxfile, wordoffset[page_idx], SEEK_SET);
775029c
 	guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx];
775029c
-	fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
775029c
+	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.
775029c
 	return wordentry_buf;
775029c
 }
775029c