tdb2: Fix to always use 64-bit offset definition
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 13 Sep 2011 21:36:13 +0000 (07:06 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 13 Sep 2011 21:36:13 +0000 (07:06 +0930)
commite8eebe0fbc3c3c946380a1c554bc1214ae899663
tree77367f8ea8401e6df94150b63cecc31dfcb4279b
parentabb437c0abedc6646927381017666db3f962befd
tdb2: Fix to always use 64-bit offset definition

We use off_t in the tdb2 interface (for tdb_attribute_flock); we need
to make sure that all callers agree on the size.

This also causes a problem in the tests: it's not enough to include
config.h first, we need the _FILE_OFFSET_BITS define from private.h.
Otherwise, we can disagree about the definitions of F_SETLK, F_SETLKW
and off_t, causing strange problems.

(Imported from CCAN commit baa17ee2d5e01a32030f19e566007417d72b4b6e)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/tdb2/private.h
lib/tdb2/private.h.orig [new file with mode: 0644]
lib/tdb2/tdb2.h
lib/tdb2/test/lock-tracking.c
lib/tdb2/test/run-56-open-during-transaction.c
lib/tdb2/test/run-57-die-during-transaction.c
lib/tdb2/test/run-lockall.c