Compiling under MSVC ("inline" problems)

"Andreas Wurf" <[email protected]> Mon, 14 Feb 2005 09:50:05 +0100
Newsgroups gmane.network.librsync.devel
Organization mediaTools GmbH
Message-ID <[email protected]>
hi,

My name is Andreas, I am new to this list (in fact, I am new to SF too ;-).

Trying to compile librsync-0.9.7 under MSVC (v6.0 and VC.NET2003) was
impossible because of the problems with "inline" found in several other
posts on this list.

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:

39a40,49
> /**
>  * \brief MSVC needs "__inline" instead of "inline" in C-source files.
>  *
>  * Andreas Wurf <[email protected]>, 2005-02-11
>  *
>  */
> #if defined( _MSC_VER ) && !defined( __cplusplus )
> # define inline __inline
> #endif // defined( _MSC_VER ) && !defined( __cplusplus )
>

With that, the compiler is happy, everything compiles fine. Basically, rdiff
seems to work. Several problems remain, though:

(1) When compiling under cygwin with the MSVC vars set (vcvars32.bat), the
make target "check" failed.
(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?)

Regards,
    Andreas

--------------------------

mediaTools Schnur & Wurf

  Informatik //
        Neue Medien

Andreas Wurf
[email protected]
Fon: +49-40-56004650
Fax: +49-40-56004656
http://www.mediaTools.de

--------------------------



-------------------------------------------------------
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