example C code for reading db hash files

C. P. Ghost cpghost at cordula.ws
Tue Apr 6 00:51:49 UTC 2010


On Tue, Apr 6, 2010 at 2:24 AM, Jim Sander <jimsander at mac.com> wrote:

> Thank you - but unfortunately, that doesn't help (it was the first place I
> checked actually) - I assume because of historical changes, but possibly
> because I'm missing something obvious.
>
>
> http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/C/dbopen.html
>        vs.
> man 3 dbopen
>
> Things are *completely* different. Is the "stock BSD" db.h different than
> the Oracle db.h ?


Yes, they are.

According to
  /usr/src/lib/libc/db/README

"This is version 1.85 of the Berkeley DB code."

The BDB version on the Oracle site is A LOT younger than 1.85,
and has a very different API _and_ .db file format.

Before you decide which API to use, you should make sure that
you're reading the right .db file. file(1) will tell you what kind of
.db file it is.

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/


More information about the freebsd-questions mailing list