some definitions from kissdb.h