lib/tdb: fix up run-die-during-transaction test cases on Solaris.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 20 Mar 2012 14:27:14 +0000 (00:57 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 22 Mar 2012 00:57:37 +0000 (01:57 +0100)
By using a different include order, we end up with a different version of
FILE_OFFSET_BITS (and probably other things) in parts of the test.  The
different variants get linked together, and the result is weird: the stat
returns 0 size.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/tdb/test/run-die-during-transaction.c
lib/tdb/test/run-nested-traverse.c
lib/tdb/test/run-no-lock-during-traverse.c
lib/tdb/test/run-traverse-in-transaction.c

index e65f81111932610cf466c15f651598bcbd95c9d5..d6502f4ea401adfe2e82d6dabdbfbc7e91459ee0 100644 (file)
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#include "../common/tdb_private.h"
 #include "lock-tracking.h"
 static ssize_t pwrite_check(int fd, const void *buf, size_t count, off_t offset);
 static ssize_t write_check(int fd, const void *buf, size_t count);
@@ -9,7 +9,6 @@ static int ftruncate_check(int fd, off_t length);
 #define fcntl fcntl_with_lockcheck
 #define ftruncate ftruncate_check
 
-#include "../common/tdb_private.h"
 #include "../common/io.c"
 #include "../common/tdb.c"
 #include "../common/lock.c"
index 1742b1110813339e12e608db12abf6d880bf75d6..83efd0d8ca872ecc39193dd1db51c72635907989 100644 (file)
@@ -1,6 +1,6 @@
+#include "../common/tdb_private.h"
 #include "lock-tracking.h"
 #define fcntl fcntl_with_lockcheck
-#include "../common/tdb_private.h"
 #include "../common/io.c"
 #include "../common/tdb.c"
 #include "../common/lock.c"
index 21e6d88e9cf21d8539d93ba5012e669fffe44efd..25d9d784bf58fd12b26f6f8e2a230496e979439e 100644 (file)
@@ -1,8 +1,8 @@
+#include "../common/tdb_private.h"
 #include "lock-tracking.h"
 
 #define fcntl fcntl_with_lockcheck
 
-#include "../common/tdb_private.h"
 #include "../common/io.c"
 #include "../common/tdb.c"
 #include "../common/lock.c"
index 44c3dabc917e33b307d3ee33b3423bfd057405de..d8455176a2457f28e02dced14a83da8b2e4b962c 100644 (file)
@@ -1,6 +1,6 @@
 #include "lock-tracking.h"
-#define fcntl fcntl_with_lockcheck
 #include "../common/tdb_private.h"
+#define fcntl fcntl_with_lockcheck
 #include "../common/io.c"
 #include "../common/tdb.c"
 #include "../common/lock.c"