On Mon, 2009-05-11 at 10:05 +0800, Daniel.Li wrote: > > When I add an function, compiler prints some error, see below: > > And I have found that proto.h is generated automatically. So what I have > missed here in configuration (adding those six extra files)
OK, I have found the problem. If I move the defination of "struct diff_file_list" to rsync.h, then it's OK. I think it might be something to do with OLDNEWS #line 642 since 3.0.0, see below: > - The proto.h file is now built using a simple perl script rather > than a > complex awk script, which proved to be more widely compatible. but I don't know why, can anyone help to explain? Thanks. > > > I'm really appreciated any help form you. Thanks in advance. > > > gcc -std=gnu99 -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c diff.c -o diff.o > > In file included from rsync.h:915, > > from diff.h:27, > > from diff.c:25: > > proto.h:62: warning: ‘struct diff_file_list’ declared inside parameter list > > proto.h:62: warning: its scope is only this definition or declaration, > > which is probably not what you want > > diff.c: In function ‘init_diff_idx’: > > diff.c:56: warning: unused parameter ‘pdiffidx_file’ > > diff.c: At top level: > > diff.c:65: error: conflicting types for ‘update_diff_idx’ > > proto.h:62: error: previous declaration of ‘update_diff_idx’ was here > > diff.c: In function ‘update_diff_idx’: > > diff.c:65: warning: unused parameter ‘pdifflist’ > > diff.c: In function ‘check_diff_idx’: > > diff.c:74: warning: unused parameter ‘pdiffidx_file’ > > make: *** [diff.o] Error 1 > > -- > Daniel > -- Daniel -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html