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.
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-#if HAVE_FILE_OFFSET_BITS
-#define _FILE_OFFSET_BITS 64
-#endif
-#include <stdint.h>
-#include <stdbool.h>
+#include <ccan/tdb2/tdb2.h>
#include <stdlib.h>
#include <stddef.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
-#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <utime.h>
#include <unistd.h>
-#include <ccan/tdb2/tdb2.h>
#include <ccan/likely/likely.h>
-#include <ccan/compiler/compiler.h>
#include <ccan/endian/endian.h>
#ifndef TEST_IT
#endif
#ifndef _SAMBA_BUILD_
+#include "config.h"
+#if HAVE_FILE_OFFSET_BITS
+#define _FILE_OFFSET_BITS 64
+#endif
/* For mode_t */
#include <sys/types.h>
/* For O_* flags. */
/* We save the locks so we can reaquire them. */
+#include <ccan/tdb2/private.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdlib.h>
#include <ccan/tap/tap.h>
-#include <ccan/tdb2/private.h>
#include "lock-tracking.h"
struct lock {
-#include "config.h"
+#include <ccan/tdb2/private.h>
#include <unistd.h>
#include "lock-tracking.h"
-#include "config.h"
+#include <ccan/tdb2/private.h>
#include <unistd.h>
#include "lock-tracking.h"
#include <ccan/tap/tap.h>
-#include "config.h"
+#include <ccan/tdb2/private.h>
#include <unistd.h>
#include "lock-tracking.h"