Re: cdb++ on a 64-bit machine?

Jeff King <[email protected]> Wed, 9 Apr 2003 16:50:51 -0400 (EDT)
Newsgroups gmane.comp.djb.cdb
Message-ID <[email protected]>
On Wed, 9 Apr 2003, [email protected] wrote:

> Hope this is the right list for this question.

As far as I can tell, cdb++ is a separate implementation of cdb for
vmailmgr. It should probably be discussed on the vmailmgr list or the
bgware list, described at <URL:http://lists.em.ca/>.

> I am attempting to run vmailmgr which uses cdb++ on my
> Ultra Sparc/10 using NetBSD.  This is a 64-bit processor.
> I have tracked my problems down to the cdb++ code.
> As I can figure, the cdb_reader is using 32 bit integers
> to calculate the positioning within the cdb file and this is
> mixing everything up since an int on my system is 64bit.
> [...]
> My question is, has anyone already made changes to the cdb code
> for use on a 64-bit system, before I proceed to do it myself?

I haven't looked through the code extensively, but after about 10
seconds of examining it, I noticed this in cdb++.h:

typedef unsigned long uint32;

Changing that line appropriately (find out which type is 32-bit for your
compiler) may clear up your problems. I don't have a 64-bit machine to
test.

-Peff