tdb2: minor changes to SAMBIFY it.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 8 Jun 2011 08:12:41 +0000 (17:42 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 8 Jun 2011 08:12:41 +0000 (17:42 +0930)
This is a bit messy, but it works.  Kept as a separate patch so it's
easier to merge back and forth with CCAN's tdb2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/tdb2/private.h
lib/tdb2/tdb.c
lib/tdb2/tdb2.h
lib/tdb2/tools/tdbtool.c
lib/tdb2/tools/tdbtorture.c

index 60b9e70b5656b25ad2722ded1cd0c625e9c4cee8..5dde988391aafc76a43d325bc839520cb7a30932 100644 (file)
 #if HAVE_FILE_OFFSET_BITS
 #define _FILE_OFFSET_BITS 64
 #endif
+#include <ccan/likely/likely.h>
+#include <ccan/compiler/compiler.h>
+
+#ifdef _SAMBA_BUILD_
+#include "replace.h"
+#include "system/filesys.h"
+#include "system/time.h"
+#include "system/shmem.h"
+#include "system/select.h"
+#include "system/wait.h"
+#else
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.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>
 #if HAVE_BYTESWAP_H
 #include <byteswap.h>
 #endif
+#endif
+#include "tdb2.h"
 
 #ifndef TEST_IT
 #define TEST_IT(cond)
index b8b5aac12881b390d715c93d2e5b849fe57f2d1d..753ccb0c8b2ee68a570bbdf027606a49299f22c9 100644 (file)
@@ -1,6 +1,8 @@
 #include "private.h"
+#ifndef _SAMBA_BUILD_
 #include <ccan/asprintf/asprintf.h>
 #include <stdarg.h>
+#endif
 
 static enum TDB_ERROR update_rec_hdr(struct tdb_context *tdb,
                                     tdb_off_t off,
index c6e09e9f16ebc6b94c79b5344b3199a2a976bde4..3f80793d760fd25124f96165df5b19fe98e1f4e0 100644 (file)
@@ -42,6 +42,8 @@ extern "C" {
 #include <stdbool.h>
 /* For memcmp */
 #include <string.h>
+#else
+#include "replace.h"
 #endif
 #include <ccan/compiler/compiler.h>
 #include <ccan/typesafe_cb/typesafe_cb.h>
index 2aa4c175e0733897105e22fe865dbc3718ccb9ca..5b79b752dff0df77a4900818d6f5504b00760f9f 100644 (file)
@@ -20,7 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <ccan/tdb2/tdb2.h>
+#include <tdb2.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <ctype.h>
index e2f6fda59107c063bb7acda650fddca58797f625..6f26a49efccaca899b0c476a66dea8175d57dd4e 100644 (file)
@@ -2,7 +2,7 @@
    writers - that stresses the locking code.
 */
 
-#include <ccan/tdb2/tdb2.h>
+#include <tdb2.h>
 #include <stdlib.h>
 #include <err.h>
 #include <getopt.h>