Subject: GDBM
From: [email-masked] (David Elworthy)

28 Nov 1997 16:25:12 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]

A little while ago there was a discussion on getting gdbm to work with
gnuwin32. If you do it blindly, you get fatal read errors, and the
proposed cure was to mount the filesystem with the gdbm database file on
it as binary using mount -b.

A simpler solution is this: edit gdbmopen.c, and in every open call, add
"|O_BINARY" to the second parameter, so you get things like
dbf->desc = open(dbf->name, O_RDONLY|O_BINARY, 0);
There's about 4 places you need to make the change. After doing this, it
should work no matter how the file system was mounted. I've only tried
this on a couple of small examples, but it seemed to work OK.

-- David Elworthy

_______________________________________________________________________
David Elworthy <[email-masked]>
Canon Research Centre Europe Ltd., Guildford, Surrey, UK
URL: http://www.cre.canon.co.uk/
Phone: +44 1483 448844; Fax: +44 1483 448845
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".