tdb: add Bob Jenkins lookup3 hash as helper hash.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 21 Oct 2010 10:02:01 +0000 (12:02 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 21 Oct 2010 12:24:42 +0000 (14:24 +0200)
commit099e8fa30f30367596cee2d57a75cac73efa4d5a
tree1a793efa6fe32446c1a63c57642a21797c0019eb
parent5f546bc640bbf12610cb671a9244c8b0e4867695
tdb: add Bob Jenkins lookup3 hash as helper hash.

This is a better hash than the default: shipping it with tdb makes it easy
for callers to use it as the hash by passing it to tdb_open_ex().

This version taken from CCAN and modified, which took it from
http://www.burtleburtle.net/bob/c/lookup3.c.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked (modified) from commit 3258cf3f11bf7c68a2e69e1808c4551cc899725a)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
lib/tdb/common/hash.c [new file with mode: 0644]
lib/tdb/common/open.c
lib/tdb/common/tdb_private.h
lib/tdb/include/tdb.h