Re: Compiling under MSVC ("inline" problems)

"Donovan Baarda" <[email protected]> Mon, 14 Feb 2005 23:15:20 +1100
Newsgroups gmane.network.librsync.devel
Message-ID <[email protected]>
G'day Andreas,

From: "Andreas Wurf" <[email protected]>
[...]
> The problem is: MSVC knows the "inline" keyword. But, according to the
docs,
> when compiling ".c" files, the compiler needs "__inline" instead of
> "inline". So I applied the following patch to librsync-config.h.in:
[...]

The inline problem is known... there should probably be a bug report. I
introduced the inline's thinking inline was universal, but it seems there
are platform issues and they should probably be removed.

> (1) When compiling under cygwin with the MSVC vars set (vcvars32.bat), the
> make target "check" failed.

I believe check failing under win32 is also known... the test framework
assumes unix stuff. I think someone submitted a patch at one point, but it
was rejected becuase it broke testing under Linux. There should probably be
a bug report on this too.

> (2) Because of that, I did some tests on my own. I built three different
> versions of "rdiff" (cygwin native, VC6 and VC.NET2003) and run a few GB
of
> real-life testdata through each version. The results are:
> (2.1) Each version validates the whole cycle (create signature, create
> delta, patch) with it's own signature and delta output.
> (2.2) For some files from the test set, the delta-files produced by each
> version differ from each other and are not interchangeable. The difference
> is quite short (a few bytes in size). Often, the deltas produced by two
> versions are identical (i.e. cygwin == vc6 != vc.net, cygwin != vc6 ==
> vc.net). Could someone give me a clue on this? (maybe alignment problems?)

This is disturbing. I suspect it may have something to do with textmode vs
binary mode files. Or it could be a subtle bug in the delta calculation,
possibly based on signed vs unsigned chars in the rollsum or something.

When you say they are not interchangeable, you mean delta from cygwin will
not work with vc.net, yeah? In that case I would suspect textmode vs
binarymode. If they are interchangeable, then I would suspect the match
finding code in the delta calculation is not quite right. It may be that
vc.net introduces support for 64 bit integers which is triggering something.

----------------------------------------------------------------
Donovan Baarda                http://minkirri.apana.org.au/~abo/
----------------------------------------------------------------



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click