From: Heikki Orsila <shd@modeemi.cs.tut.fi>
Subject: cksfv 64-bit patch
Date: Mon, 26 Apr 2004 16:30:07 +0300 (EET DST)
Message-ID: <Pine.OSF.4.58.0404261625490.8436@fanta.modeemi.cs.tut.fi>
To: stefan@alfredsson.org
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
        version=2.63

Hello, here is a 64-bit patch for cksfv 1.3. cksfv 1.3 does not work on
64-bit platforms. I am submitting this patch to you directly because I am
unable to contact the author of cksfv. I know debian doesn't have 64-bit
branch yet, but it will have. Applying the patch won't break 32-bit
architectures.

        http://shd.ton.tut.fi/patches/cksfv-1.3-64bit-fix.diff

Quite simply it uses 32-bit variables for crc32 calculation. The crc32 was
computed with longs, which are 64-bit variables on amd64 but 32-bit
variables on i386. Now it uses uint32_t from <stdint.h>. The C standard
specifies that uint32_t can be used when <stdint.h> is included. Debian
gccs are modern enough to support that standard.

This patch has been submitted into gentoo as well.

Please reply.

Heikki Orsila
heikki.orsila@iki.fi
http://ee.tut.fi/~heikki