Aspseek1.4更新日志
一、make && make install时出现的警告、错误及其修正
错误及警告:
charsets.cpp:475:1: warning: deprecated conversion from string constant to 'char*'
/usr/include/c++/4.5/backward/backward_warning.h:28:2: warning: #warning This file includes at least one
deprecated or antiquated header which may be removed without further notice at a future date. Please use a
non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and
interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
../../include/maps.h:33:9: error: an explicit specialization must be preceded by 'template <>'
../../include/charsets.h:108:9: error: an explicit specialization must be preceded by 'template <>'
../../include/ucharset.h:439:10: error: 'str' was not declared in this scope
../../include/ucharset.h:476:9: error: an explicit specialization must be preceded by 'template <>'
../../include/ucharset.h:569:9: error: an explicit specialization must be preceded by 'template <>'
../../include/sqldb.h:238:10: warning: deprecated conversion from string constant to 'char*'
daemon.cpp:97:18: warning: deprecated conversion from string constant to ‘char*’
daemon.cpp: In function ‘int LoadDaemonConfig(const char*, int)’:
daemon.cpp:244:36: warning: deprecated conversion from string constant to ‘char*’
修正:
(1)warning: deprecated conversion from string constant to ‘char*’
isos编译的时候,这个警告影响编译通过。
解决方法:把 char * 改成 static const char * 的话这个 Warning 就不会出现了。
charsets.cpp :368 const char *sgml;
(2)../../include/charsets.h:108
107 namespace STL_EXT_NAMESPACE {
108 template<> struct hash
同类错误修改同理。
错误:
../include/charsets.h:93:38: error: 'strncpy' was not declared in this scope
../include/charsets.h:98:38: error: 'strncpy' was not declared in this scope
../include/charsets.h:103:36: error: 'strcmp' was not declared in this scope
../include/ucharset.h:187:33: error: 'memset' was not declared in this scope
../include/sock.h:58:9: error: an explicit specialization must be preceded by 'template <>'
aspseek.cpp:100:18: error: 'strlen' was not declared in this scope
aspseek.cpp:102:31: error: 'memcpy' was not declared in this scope
aspseek.cpp:114:25: error: 'memcpy' was not declared in this scope
aspseek.cpp:210:33: error: 'memset' was not declared in this scope
aspseek.cpp:220:18: error: 'strlen' was not declared in this scope
aspseek.cpp:222:31: error: 'memcpy' was not declared in this scope
aspseek.cpp:232:23: error: 'strlen' was not declared in this scope
aspseek.cpp:235:31: error: 'memcpy' was not declared in this scope
aspseek.cpp:247:25: error: 'memcpy' was not declared in this scope
同样的错误省略不显示了
修正:
home/cyh/aspseek/include/charsets.h文件中的
26 #include
错误:
templates.cpp:520:29: error: invalid conversion from 'const char*' to 'char*'
templates.cpp:527:23: error: invalid conversion from 'const void*' to 'void*'
templates.cpp:527:23: error: initializing argument 1 of 'void* memcpy(void*, const void*, size_t)'
templates.cpp:528:11: error: assignment of read-only location '*(s + ((unsigned int)len))'
templates.cpp:529:16: error: invalid conversion from 'const char*' to 'char*'
templates.cpp:529:16: error: initializing argument 1 of 'char* CTag::ParseTag(char*)'
templates.cpp:556:29: error: invalid conversion from 'const char*' to 'char*'
templates.cpp:1219:31: error: invalid conversion from 'const char*' to 'char*'
templates.cpp:1291:30: error: invalid conversion from 'const char*' to 'char*'
filters.cpp:48:31: error: invalid conversion from ‘const char*’ to ‘char*’
修正:
(1)templates.cpp文件中进行以下修改:
520 if (!(s =(char *) strchr(option,'>')))
1219 char* sp =(char *) strchr(psite, ' ');
1291 char* sp =(char *) strchr(px, ' ');
(2)/home/cyh/aspseek/src/filters.cpp文件中进行以下修改:
48 char* pd =(char *) strrchr(param, '.');
错误:
/usr/include/stdlib.h:766:12: error: expected unqualified-id before ‘int’
/usr/include/stdlib.h:766:12: error: expected ‘)’ before ‘int’
/usr/include/stdlib.h:766:12: error: expected ‘)’ before ‘int’
/usr/include/c++/4.5/cstdlib:106:11: error: ‘::abs’ has not been declared
/usr/include/c++/4.5/bits/stl_algo.h:3172:26: error: expected unqualified-id before ‘(’ token
../include/filters.h:81:28: error: ‘strdup’ was not declared in this scope
修正:
(1)/include/filters.h文件中进行以下修改:
28 #include
(2)/home/cyh/aspseek/include/ misc.h文件中进行以下修改:
58 #define MAX(a,b) ((a) > (b) ? (a) : (b))
60 #define MIN(a,b) ((a) < (b) ? (a) : (b))
62 #define ABS(a) ((a) >= 0 ? (a) : -(a))
错误:
aspseek.cpp:1291: 41: error: 'min' was not declared in this scope
datasource.cpp:817:66: error: 'min' was not declared in this scope
filters.cpp:176:37: error: ‘min’ was not declared in this scope
filters.cpp:222:37: error: ‘min’ was not declared in this scope
修正:
(1)aspseek.cpp文件的1291行: res->last = MIN(nFirst, res->counts[2]);
(2)datasource.cpp文件的817行: int read = m_socket.Recv(buf, MIN(len, (int) (sizeof(buf) - 1)));
其他同类错误的修改方法同上。
错误:
./include/resolve.h:121:42: error: ‘memset’ was not declared in this scope
修正:
./include/resolve.h文件中的26行: #include
错误:
deltas.cpp:2407:47: error: ‘max’ was not declared in this scope
deltas.cpp:2451:40: error: ‘max’ was not declared in this scope
deltas.cpp: In member function ‘ULONG CBufferedFile::Read(void*, ULONG)’:
deltas.cpp:2595:18: error: lvalue required as left operand of assignment
deltas.cpp:2614:18: error: lvalue required as left operand of assignment
deltas.cpp:2650:18: error: lvalue required as left operand of assignment
deltas.cpp:2669:18: error: lvalue required as left operand of assignment
wcache.cpp:56:19: error: ‘min’ was not declared in this scope
wcache.cpp:790:32: error: ‘max’ was not declared in this scope
修正:
deltas.cpp文件中的2407行: WORD* times = new WORD[MAX(numUrl, maxUrl + 1)];
/home/cyh/aspseek/src/deltas.cpp文件中的2595行: buf =(void *)((char *)buf+ rd);
其他同类错误修改方法同上。
错误:
../include/content.h:50:9: error: an explicit specialization must be preceded by ‘template <>’
../include/stopwords.h:61:9: error: an explicit specialization must be preceded by ‘template <>’
../include/rank.h:138:9: error: an explicit specialization must be preceded by ‘template <>’
index.cpp:249:29: error: ‘min’ was not declared in this scope
修正:
../include/content.h文件中的50行: template<> struct hash
index.cpp文件中的249行: int c = MIN(prnk - rnk, 10);
其他同类错误修改方法同上。
错误:
misc.cpp:65:58: error: new declaration ‘char* strcasestr(const char*, const char*)
修正:
misc.h文件中添加 #include
注释misc.h中的41行: // char *strcasestr(const char *haystack, const char *needle);
注释misc.cpp文件中65行: // char *strcasestr(const char *haystack, const char *needle)
错误:
mimeconv.cpp:64:26: error: ‘mkstemp’ was not declared in this scope
mimeconv.cpp:83:28: error: ‘mkstemp’ was not declared in this scope
mimeconv.cpp:103:21: error: ‘system’ was not declared in this scope
mimeconv.cpp:217:11: error: ‘exit’ was not declared in this scope
mimeconv.cpp:231:28: error: ‘system’ was not declared in this scope
mimeconv.cpp:231:29: error: ‘exit’ was not declared in this scope
修正:
在/home/cyh/aspseek/include/ mimeconv.h文件中添加 #include
错误:
../include/affix.h:149:9: error: an explicit specialization must be preceded by ‘template <>’
../include/ccom.h:78:3: error: ‘IUnknown’ was not declared in this scope
../include/ccom.h:78:13: error: ‘pTemp’ was not declared in this scope
../include/ccom.h:142:11: error: ‘E_POINTER’ was not declared in this scope
../include/ccom.h:146:10: error: ‘S_OK’ was not declared in this scope
daemon.cpp:1370:38: error: invalid conversion from ‘const char*’ to ‘char*’
../include/ccom.h:103:3: error: ‘assert’ was not declared in this scope
修正:
../include/affix.h文件中的149行: template<> struct hash
错误:
../include/ccom.h:78: error: `IUnknown' was not declared in this scope
修正:
向ccom.h中复制以下代码:
#define S_OK 0
#define E_POINTER 0x80004003L
* IUnknown 接口 */
class IUnknown
{
public:
virtual unsigned int AddRef(void) = 0;
virtual unsigned int Release(void) = 0;
virtual bool QueryInterface( const char* InterfaceName, void ** ppInterface ) = 0;
};
错误:
streams.cpp:81:31: error: ‘min’ was not declared in this scope
search.cpp:171:32: error: ‘max’ was not declared in this scope
search.cpp:172:32: error: ‘min’ was not declared in this scope
search.cpp:179:45: error: ‘min’ was not declared in this scope
search.cpp:183:42: error: ‘max’ was not declared in this scope
search.cpp:385:47: error: ‘min’ was not declared in this scope
search.cpp:1378:46: error: ‘max’ was not declared in this scope
search.cpp:2544:38: error: ‘max’ was not declared in this scope
search.cpp:2545:50: error: ‘min’ was not declared in this scope
search.cpp:2572:43: error: ‘max’ was not declared in this scope
search.cpp:2573:53: error: ‘min’ was not declared in this scope
修正:
search.cpp文件中进行以下修正:
171 mins = MAX(minsite, m_minSite);
172 maxs = MIN(maxsite, m_maxSite);
错误 :
urlfilter.cpp:47:39: error: ‘memcpy’ was not declared in this scope
acl.cpp:64:43: error: ‘memcpy’ was not declared in this scope
修正:
向urlfilter.h中添加: #include "string.h"
向acl.h中添加:#include "string.h"
二、执行postinstall时出现的错误及其修正
错误:
linux-lkkd:/home/cyh/aspseek # /usr/local/aspseek/sbin/aspseek-mysql-postinstall
密码:
修正:
useradd aspseek
在root下执行:linux-lkkd:/home/cyh/aspseek # /usr/local/aspseek/sbin/aspseek-mysql-postinstall
三、执行index时出现的错误及其修正
错误:
执行命令:/usr/local/aspseek/sbin/index时
报错:Don't run ./index with privileged user/group ID (UID < 11, GID < 11)
修正:
passwd aspseek 设置密码
su aspseek 切换到用户aspseek
错误:
Loading configuration from /usr/local/aspseek/etc/db.conf
Can't open charset table file tables/windows-1250.txt: No such file or directory
Charset windows-1250 has not been loaded
Charset iso-8859-1 has not been loaded
Can't open charset table file tables/iso8859-2.txt: No such file or directory
Charset iso-8859-6 has not been loaded
Charset gb2312 has not been loaded
Loading configuration from /usr/local/aspseek/etc/ucharset.conf
Loading configuration from /usr/local/aspseek/etc/stopwords.conf
Address of param: bfdc2100
段错误
修正:
注释index.cpp文件中的以下行:
298行 //long* ref = (long*)DBName1.data() - 2;
1299行 //*ref = 0x40000000;
错误:
Error loading config: Error: can't open config file '/usr/local/aspseek/etc/db.conf': Permission denied
修正:
(1)cp /usr/local/aspseek/lib/libmysqldb-1.3.0pre1.so /usr/lib/mysql
(2)向 /etc/ld.so.conf文件中添加/usr/lib/mysql
(3)注释index.cpp中的以下行:
1298 //long* ref = (long*)DBName1.data() - 2;
1299 //*ref = 0x40000000;
错误:
index: Can't create directory '/usr/local/aspseek/var/aspseek12': Permission denied
修正:
进入:/usr/local/aspseek中
使用:ls –l 查看var文件夹的权限
执行:chmod o+w var 修改var权限
错误:
Error locking mutex(互斥): Invalid argument
修正:
108 CBuddyHeap m_heap; (源代码为CbuddyHeap *m_heap)
116 // m_heap = NULL; (注释该句)
249 wp.m_heap = m_heap; (源代码为wp.m_heap=&m_heap)
执行make后出现的错误:
buddy.cpp:192:25: error: base operand of ‘->’ has non-pointer type ‘CBuddyHeap’
buddy.cpp:200:25: error: base operand of ‘->’ has non-pointer type ‘CBuddyHeap’
buddy.cpp:202:9: error: base operand of ‘->’ has non-pointer type ‘CBuddyHeap’
buddy.cpp:215:9: error: base operand of ‘->’ has non-pointer type ‘CBuddyHeap’
buddy.cpp: 215:9: error: base operand of ‘->’ has non-pointer type ‘CBuddyHeap’
修正:
/home/cyh/aspseek/src/ buddy.cpp中
192 m_data = (WORD*)m_heap.Alloc(0);
200 m_data = (WORD*)m_heap.AllocBytes(m_allocated * sizeof(WORD) << 1);
202 m_heap.FreeBytes(olddata, m_allocated * sizeof(WORD));
215 m_heap.FreeBytes(m_data, m_allocated * sizeof(WORD));
错误:
Adding URL: http://www.xjau.edu.cn
Can't resolve hostname www.xjau.edu.cn: A temporary error occurred on an authoritative name. Try again later。
修正:
Linux没有联网,网络连接使用host-only。
四、运行searchd(开始检索)时的错误以及修改方法
错误:
Not Found
The requested URL /cgi-bin/s.cgi was not found on this server.
修正:
注释/home/cyh/aspseek/src/deamon.cpp文件中的
1338 //static long* ref = (long*)config_name.data() - 2;
1339 //*ref = 0x40000000;
错误:
无法连接
Firefox无法建立到 localhost 服务器的连接。
修正:
需要将s.cgi复制到apache中
cp /usr/local/aspseek/bin/s.cgi /usr/local/apache2/cgi-bin
错误:
An error occured!
Can not connect to search daemon //原因:searchd没有起来,或者启动了多次searchd
修正:
(1)转到目录:/usr/local/aspseek/var
执行(删除):rm -rf *
drop database aspseek12;
(2)ps –aux|grep httpd
ps –aux|grep searchd
查看进程情况
Kill 进程号杀掉多余的进程,或全部进程,再重新启动。
(3)执行:root>; /usr/local/aspseek/sbin/aspseek-mysql-postinstall
转到目录:/usr/local/aspseek/sbin
执行cp /usr/local/aspseek/lib/libmysqldb-1.3.0pre1.so /usr/lib/mysql
将/etc/ld.so.conf 复制到到/usr/lib/mysql
执行:./index -N10
执行:aspseek>; /usr/local/aspseek/sbin/searchd –D
五、以上步骤中出现的警告及其修正
警告:
../include/templates.h:201:2: warning: 'typedef' was ignored in this declaration
templates.cpp:221:78: warning: deprecated conversion from string constant to 'char*'
charsets.cpp:48:1: warning: deprecated conversion from string constant to 'char*'
charsets.cpp:58:1: warning: deprecated conversion from string constant to 'char*'
qldbi.cpp:99:9: warning: deprecated conversion from string constant to ‘char*’
sqldbi.cpp:401:36: warning: deprecated conversion from string constant to ‘char*’
config.cpp:224:38: warning: deprecated conversion from string constant to ‘char*’
../include/stack.h:118:36: warning: deprecated conversion from string constant to ‘char*’
./include/search.h:859:34: warning: deprecated conversion from string constant to ‘char*’
ucharset.cpp:167:28: warning: deprecated conversion from string constant to 'char*'
stopwords.cpp:57:29: warning: deprecated conversion from string constant to ‘char*’
geo.cpp:222:74: warning: deprecated conversion from string constant to ‘char*’
templates.cpp:940:63: warning: deprecated conversion from string constant to 'char*'
index.cpp:1243:27: warning: deprecated conversion from string constant to ‘char*’
../include/misc.h:59:0: warning: "MAX" redefined
parse.cpp:775:22: warning: deprecated conversion from string constant to ‘char*’
daemon.cpp:243:36: warning: deprecated conversion from string constant to ‘char*’
qparser.cpp:53:1: warning: deprecated conversion from string constant to ‘char*’
parser.cpp:109:44: warning: deprecated conversion from string constant to ‘char*’
scanner.cpp:31:7: warning: non-local variable ‘
等警告。
修正:
(1)../include/templates.h文件中的163行:
typedef class CTemplate { à class Ctemplate
(2)src/templates.cpp文件中的:
221 Errormes[ER_STOPWORDS]= Trim(const_cast
221---287改法相同
940 if (LoadTemplate(const_cast
(3)src/sqldbi.cpp文件中的:
99 return ""; ->
401 case 0: return(const_cast
(4)src/config.cpp文件中的:
222 int size = curl.HTTPGetUrl(wcache,&srv, buf, sizeof(buf) - 1, ALLOW,const_cast
(5)src/index.cpp文件中的:
1243 static char *config_name=const_cast
1278 char* logname = const_cast
(6)include/misc.h文件中的:
58 #undef MAX
59 #define MAX(a,b) ((a) > (b) ? (a) : (b))
(7)src/ parse.cpp文件中的:
775 Trim(charset, const_cast
(8)src/ qparser.cpp文件中的:
221 error(const_cast
(9)src/ scanner.cpp文件中的:
30 struct {int type; ScannerVoidFunc func;}
31 funcs[] =
32 {
33 {xBinary1, &CScanner::xBinary},
(10)src/ charsets.cpp文件中的:
50 static ALIAS Aliases[MAX_ALIAS] ={
51 {CHARSET_USASCII,const_cast
52 {CHARSET_USASCII,const_cast
53 {CHARSET_USASCII,const_cast
54 {CHARSET_USASCII,const_cast
55 {CHARSET_USASCII,const_cast
56 {CHARSET_USASCII,const_cast
57 {-1, NULL}
58 };
(11)/usr/local/aspseek/etc/aspseek.conf文件中的:
72 UtfStorage yes
六、使用Apache Module时出现的警告、错误及其修正
警告:
configure: WARNING: unrecognized options: --enable-modules
原因:
“–-enable-module=so”只适用于apache 1.3.x版本不适合于apache 2.0.x
错误:
linux-6rzx:/home/cyh/aspseek # ./configure --enable-apache-module
checking for Apache module support... configure: error:
** Can't find apxs in /usr/lib/mpi/gcc/openmpi/bin /home/cyh/bin /usr/local/bin /usr/bin /sbin /usr/sbin /bin
/usr/bin/X11 /usr/X11R6/bin /usr/games /opt/kde3/bin /usr/lib/mit/bin /usr/lib/mit/sbin /usr/sbin
/usr/local/apache/bin /home/httpd/bin/
修正:
./configure --enable-apache-module=/usr/local/apache2/
错误:
if test "xmod_aspseek.so" != "x"; then \
/bin/sh ../libtool --mode=link --tag=CC /usr/local/apache2/bin/apxs -I../include -c \
-o mod_aspseek.so -DHAVE_CONFIG_H mod_aspseek.c \
libaspseek.la -ldl -lz -lpthread; \
libtool: unrecognized option `--tag=CC'
修正:
756 @APACHEMODULE_TRUE@ $(LIBTOOL) --mode=link gcc $(APXS) $(INCLUDES) -c \
错误:
mod_aspseek.c:29:19: fatal error: httpd.h: No such file or directory
compilation terminated.
修正:
mod_aspseek.c文件进行以下修改:
29 #include "/usr/local/apache2/include/httpd.h"
30 #include "/usr/local/apache2/include/http_log.h"
31 #include "/usr/local/apache2/include/http_config.h"
32 #include "/usr/local/apache2/include/http_protocol.h"
33 #include "/usr/local/apache2/include/http_main.h"
34 #include "/usr/local/apache2/include/ap_config.h"
错误:
In file included from /usr/local/apache2/include/httpd.h:43:0,
from mod_aspseek.c:29:
/usr/local/apache2/include/ap_config.h:25:17: fatal error: apr.h: No such file or directory
compilation terminated.
修正:
/usr/local/apache2/include/ap_config.h文件进行以下修改:
25 #include "/usr/include/apr-1/apr.h"
26 #include "/usr/include/apr-1/apr_hooks.h"
27 #include "/usr/include/apr-1/apr_optional_hooks.h"
错误:
/usr/local/apache2/include/os.h:31:17: fatal error: apr.h: No such file or directory
compilation terminated.
修正:
/usr/local/apache2/include/os.h文件进行以下修改:
31 #include "/usr/include/apr-1/apr.h"
32 #include "/usr/include/apr-1/ap_config.h"
七、使用Php Module时出现的警告、错误及其修正
错误:
inux-6rzx:/usr/local/apache2/bin # ./httpd
httpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf: Cannot load
/usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol:
php_escape_html_entities
修正:
每次重新配置了php后,一定要make clean后再重新make && make install
错误:
inux-6rzx:/home/cyh/aspseek-php-1.0.0-alpha3 # make && make install时报错:
/home/cyh/aspseek-php-1.0.0-alpha3/aspseek.c:216:1: error: ‘OnUpdateInt’ undeclared here (not in a function)
/home/cyh/aspseek-php-1.0.0-alpha3/aspseek.c:217:1: error: ‘OnUpdateInt’ undeclared here (not in a function)
/home/cyh/aspseek-php-1.0.0-alpha3/aspseek.c:218:1: error: ‘OnUpdateInt’ undeclared here (not in a function)
修正:
216行:STD_PHP_INI_BOOLEAN("aspseek.allow_persistent", "1", PHP_INI_SYSTEM, OnUpdateBool,
allow_persistent, zend_aspseek_globals, aspseek_globals)
217行:STD_PHP_INI_ENTRY_EX("aspseek.max_persistent", "-1", PHP_INI_SYSTEM, OnUpdateBool,
max_persistent, zend_aspseek_globals, aspseek_globals, display_link_numbers)
218行:STD_PHP_INI_ENTRY_EX("aspseek.max_links", "-1", PHP_INI_SYSTEM, OnUpdateBool,
max_links, zend_aspseek_globals, aspseek_globals, display_link_numbers)
错误:
php –m :发现aspseek.so没有被挂载到php
修正:
在确保apache可以正常解析(即:test.php中的phpinf()可以正常显示)的前提下,可以重新安装php和php-aspseek
模块,并要确保配置文件正确
错误:
加载字符集配置文件时出错,段错误
修正:
ucharset.cpp文件中的LoadCharsetU2V()函数进行以下修改:
207行:if (sscanf(chp, "%x %x", &code, &ucode) == 2)
错误:
执行index抓取时,显示Error locking mutex:Invalid Argument
修正:
content.h文件中的virtual ~CUrlContent()函数进行以下修改:
222行{
Save();
this->clear();
}
错误:
aspseek@linux-6rzx:/usr/local/apache2/bin> /usr/local/aspseek/sbin/searchd -D
WARNING: Can't open logfile /usr/local/aspseek/var/dlog.log: Permission denied
Starting search daemon from ASPseek v.1.4.0
修正:
linux-6rzx:/usr/local/aspseek # chmod o+w var
错误:
地址栏输入:http://localhost/search.php
Warning: Could not connect to search daemon in /usr/local/apache2/htdocs/search.php on line 29
Warning: ASPseek Connection Failed: Could not connect to search daemon in /usr/local/apache2/htdocs/search.php
on line 29
An error occured!
Could not connect to search daemon
修正:
可能是searchd没有启动或启动了多次,注意aspseek的步骤都要做一遍
错误:
查询结果页面中汉字不能正常显示
修正:
(1)/usr/local/apache2/htdocs/top.inc第3行:header("Content-type: text/html; charset=gb2312");
(2)aspseek.cpp文件中的 1179行添加:
if(cgiQuery.m_charset.size()==0)
cgiQuery.m_charset="gb2312";
(3)ucharset.conf文件中的35行添加:
CharsetAlias gb2312 gbk
错误:
搜索结果无法显示,searchd进入死循环
修正:
daemon.cpp文件中的void AddStat(CBufferedSocket& socket, CSQLDatabase* database)函数
628行起进行以下修改:
if (socket.RecvTime_t(start.tv_sec) <= 0) return;
datasource.cpp文件中的void CTcpDataSource::AddStat函数344行起进行以下修改:
m_socket.SendTime_t(start.tv_sec);
m_socket.SendTime_t(finish.tv_sec);
错误:
快照无法显示
修正:
sqldb.cpp文件中的BYTE* Uncompress()函数进行以下修改:
1249行:
if (cont && (len >= SIZEOF_VOID_P))
{
BYTE* uc;
uLen = *(ULONG*)cont;
if (uLen == 0xFFFFFFFF)
{
uLen = len - SIZEOF_VOID_P;
uc = new BYTE[uLen + 1];
memcpy(uc, cont + SIZEOF_VOID_P, uLen);
}
else
{
uc = new BYTE[uLen + 1];
uncompress(uc, &uLen, cont + SIZEOF_VOID_P, len);
}
错误:
结果分组出错,段错误
修正:
search.cpp文件中的CResult::GetUrls(CUrlWeight2* start, CUrlWeight2*& dst, int gr, int sortBy)函数进行以下修改:
2369行:WORD* url2 = si->m_maxwoffset2 == ~0 ? NULL : (WORD*)((BYTE*)m_urls + si->m_maxwoffset2);
2383行:start->m_urlr2 = si->m_maxwoffset2 == ~0 ? NULL : (WORD*)((BYTE*)m_urls + si->m_maxwoffset2);