jmacd / xdelta

open-source binary diff, delta/differential compression tools, VCDIFF/RFC 3284 delta compression
http://xdelta.org
1.1k stars 184 forks source link

encode_decode_test in examples compile error #210

Closed xiaochengzhong closed 8 years ago

xiaochengzhong commented 8 years ago

What steps will reproduce the problem?

  1. step into examples/
  2. make clean
  3. make encode_decode_test

What is the expected output? What do you see instead?

I saw some warnings and errors:

cc -g -Wall -I.. -DXD3_DEBUG=1 -DNDEBUG=0 encode_decode_test.c -o encode_decode_test
In file included from encode_decode_test.c:11: ../xdelta3.h:27:1: warning: "_POSIX_SOURCE" redefined In file included from /usr/include/stdio.h:28, from encode_decode_test.c:9: /usr/include/features.h:186:1: warning: this is the location of the previous definition In file included from encode_decode_test.c:11: ../xdelta3.h:208:2: #error Bad configure script In file included from encode_decode_test.c:11: ../xdelta3.h:327: error: syntax error before "xoff_t" ../xdelta3.h:575: error: syntax error before "xoff_t" ../xdelta3.h:575: warning: no semicolon at end of struct or union ../xdelta3.h:577: error: syntax error before '}' token ../xdelta3.h:602: error: syntax error before "xoff_t" ../xdelta3.h:602: warning: no semicolon at end of struct or union ../xdelta3.h:603: warning: type defaults to int' in declaration ofposition' ../xdelta3.h:603: warning: data definition has no type or storage class ../xdelta3.h:681: error: syntax error before "xoff_t" ../xdelta3.h:681: warning: no semicolon at end of struct or union ../xdelta3.h:684: error: syntax error before '}' token ../xdelta3.h:700: error: syntax error before "xoff_t" ../xdelta3.h:700: warning: no semicolon at end of struct or union ../xdelta3.h:758: error: syntax error before "xoff_t" ../xdelta3.h:758: warning: no semicolon at end of struct or union ../xdelta3.h:761: warning: type defaults to int' in declaration ofcurblkno' ../xdelta3.h:761: warning: data definition has no type or storage class ../xdelta3.h:771: error: syntax error before "srcbase" ../xdelta3.h:771: warning: type defaults to int' in declaration ofsrcbase' ../xdelta3.h:771: warning: data definition has no type or storage class ../xdelta3.h:775: error: syntax error before "cpyoff_blocks" ../xdelta3.h:775: warning: type defaults to int' in declaration ofcpyoff_blocks' ../xdelta3.h:775: warning: data definition has no type or storage class ../xdelta3.h:778: error: syntax error before "getblkno" ../xdelta3.h:778: warning: type defaults to int' in declaration ofgetblkno' ../xdelta3.h:778: warning: data definition has no type or storage class ../xdelta3.h:782: error: syntax error before "max_blkno" ../xdelta3.h:782: warning: type defaults to int' in declaration ofmax_blkno' ../xdelta3.h:782: warning: data definition has no type or storage class ../xdelta3.h:788: error: syntax error before '}' token ../xdelta3.h:799: error: syntax error before "xoff_t" ../xdelta3.h:799: warning: no semicolon at end of struct or union ../xdelta3.h:806: error: syntax error before "current_window" ../xdelta3.h:806: warning: type defaults to int' in declaration ofcurrent_window' ../xdelta3.h:806: warning: data definition has no type or storage class ../xdelta3.h:807: error: syntax error before "total_out" ../xdelta3.h:807: warning: type defaults to int' in declaration oftotal_out' ../xdelta3.h:807: warning: data definition has no type or storage class ../xdelta3.h:828: error: 'free' redeclared as different kind of symbol ... make: *\ [encode_decode_test] Error 1

What version of the product are you using? On what operating system?

xdelta3-3.0.11 The system is CentOS release 4.3 (Final) with GCC 4.8.2

Please provide any additional information below. below is the full make error log: https://www.dropbox.com/s/ck3qcx1mpw9lze9/error.log?dl=0

xiaochengzhong commented 8 years ago

after read xdelta.h, I resolve it.