-#include <ccan/tdb2/tdb.c>
-#include <ccan/tdb2/open.c>
-#include <ccan/tdb2/free.c>
-#include <ccan/tdb2/lock.c>
-#include <ccan/tdb2/io.c>
-#include <ccan/tdb2/hash.c>
-#include <ccan/tdb2/transaction.c>
-#include <ccan/tdb2/check.c>
+#include "tdb2-source.h"
#include <ccan/tap/tap.h>
#include "logging.h"
static uint64_t myhash(const void *key, size_t len, uint64_t seed, void *priv)
{
- return *(uint64_t *)key;
+ return *(const uint64_t *)key;
}
static void add_bits(uint64_t *val, unsigned new, unsigned new_bits,
struct tdb_data key = { (unsigned char *)&kdata, sizeof(kdata) };
struct tdb_data dbuf = { (unsigned char *)&kdata, sizeof(kdata) };
union tdb_attribute hattr = { .hash = { .base = { TDB_ATTRIBUTE_HASH },
- .hash_fn = myhash } };
+ .fn = myhash } };
int flags[] = { TDB_INTERNAL, TDB_DEFAULT, TDB_NOMMAP,
TDB_INTERNAL|TDB_CONVERT, TDB_CONVERT,
TDB_NOMMAP|TDB_CONVERT,
for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
struct hash_info h;
- tdb = tdb_open("run-04-basichash.tdb", flags[i],
+ tdb = tdb_open("run-20-growhash.tdb", flags[i],
O_RDWR|O_CREAT|O_TRUNC, 0600, &hattr);
ok1(tdb);
if (!tdb)