Date:2010-05-30 05:59:38 (13 years 6 months ago)
Author:Xiangfu Liu
Commit:df66aa35e70648155f62f7650c5eade1ec73288f
Message:[sdcv] fix compile errors. thanks to jirka.

Files: sdcv/Makefile (3 diffs)
sdcv/patches/libcpp-retype.patch (1 diff)
sdcv/patches/readline-free.patch (1 diff)

Change Details

sdcv/Makefile
1616
1717PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
1818
19PKG_INSTALL:=1
19PKG_INSTALL:=2
2020
2121include $(INCLUDE_DIR)/package.mk
2222
...... 
2424    TITLE:=sdcv
2525    SECTION:=utils
2626    CATEGORY:=Utilities
27    DEPENDS:=@BROKEN +libintl
27    DEPENDS:=+libintl +libreadline +libiconv
2828    URL:=http://sdcv.sourceforge.net/
2929endef
3030
...... 
3333endef
3434
3535TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/lib/libintl/include
36TARGET_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/libintl/lib
36TARGET_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/libintl/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib
3737
3838CONFIGURE_ARGS +=
3939
sdcv/patches/libcpp-retype.patch
1--- sdcv-0.4.2/src/lib/lib.cpp 2006-04-24 10:17:27.000000000 +0200
2@@ -5,10 +5,12 @@
3 #include <algorithm>
4 #include <cstring>
5 #include <cctype>
6+#include <cstdlib>
7
8 #include <sys/stat.h>
9 #include <zlib.h>
10 #include <glib/gstdio.h>
11+#include <stdlib.h>
12
13 #include "distance.h"
14 #include "file.hpp"
15@@ -513,7 +515,7 @@
16 {
17     fseek(idxfile, wordoffset[page_idx], SEEK_SET);
18     guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx];
19- fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
20+ fread(wordentry_buf, std::min((long)sizeof(wordentry_buf), (long)page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
21     return wordentry_buf;
22 }
23
sdcv/patches/readline-free.patch
1--- sdcv-0.4.2/src/readline.cpp 2005-12-07 23:07:23.000000000 +0100
2@@ -28,6 +28,7 @@
3 # include <readline/history.h>
4 #endif
5 #include <glib.h>
6+#include <stdlib.h>
7
8 #include "utils.hpp"
9

Archive Download the corresponding diff file



interactive