summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/tools
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/tdb/tools')
-rw-r--r--source4/lib/tdb/tools/tdbbackup.c28
-rw-r--r--source4/lib/tdb/tools/tdbdump.c22
-rw-r--r--source4/lib/tdb/tools/tdbtest.c19
-rw-r--r--source4/lib/tdb/tools/tdbtorture.c23
4 files changed, 5 insertions, 87 deletions
diff --git a/source4/lib/tdb/tools/tdbbackup.c b/source4/lib/tdb/tools/tdbbackup.c
index 872ca99f0d..45beb5e292 100644
--- a/source4/lib/tdb/tools/tdbbackup.c
+++ b/source4/lib/tdb/tools/tdbbackup.c
@@ -41,33 +41,9 @@
*/
-#ifndef _SAMBA_BUILD_
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <fcntl.h>
-#include <time.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <ctype.h>
-#include <signal.h>
-
-#else
-
-#include "includes.h"
-#include "system/filesys.h"
-
-#endif
-
+#include "replace.h"
#include "tdb.h"
+#include "system/filesys.h"
/*
see if one file is newer than another
diff --git a/source4/lib/tdb/tools/tdbdump.c b/source4/lib/tdb/tools/tdbdump.c
index 74ba64fdd9..9111b739ab 100644
--- a/source4/lib/tdb/tools/tdbdump.c
+++ b/source4/lib/tdb/tools/tdbdump.c
@@ -18,31 +18,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifndef _SAMBA_BUILD_
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <fcntl.h>
-#include <time.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <ctype.h>
-#include <signal.h>
+#include "replace.h"
#include "tdb.h"
-
-#else
-
-#include "includes.h"
-#include "lib/tdb/include/tdb.h"
#include "system/locale.h"
#include "system/filesys.h"
-#endif
-
static void print_data(TDB_DATA d)
{
unsigned char *p = (unsigned char *)d.dptr;
diff --git a/source4/lib/tdb/tools/tdbtest.c b/source4/lib/tdb/tools/tdbtest.c
index edf12ecfdd..c7a09789fe 100644
--- a/source4/lib/tdb/tools/tdbtest.c
+++ b/source4/lib/tdb/tools/tdbtest.c
@@ -1,26 +1,9 @@
/* a test program for tdb - the trivial database */
-#ifndef _SAMBA_BUILD_
-#include <stdlib.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <signal.h>
+#include "replace.h"
#include "tdb.h"
-#else
-
-#include "includes.h"
#include "system/filesys.h"
#include "system/time.h"
-#include "lib/tdb/include/tdb.h"
-
-#endif
#include <gdbm.h>
diff --git a/source4/lib/tdb/tools/tdbtorture.c b/source4/lib/tdb/tools/tdbtorture.c
index 9b0a60348c..14a2b48cdc 100644
--- a/source4/lib/tdb/tools/tdbtorture.c
+++ b/source4/lib/tdb/tools/tdbtorture.c
@@ -2,33 +2,12 @@
writers - that stresses the locking code.
*/
-#ifndef _SAMBA_BUILD_
-#define _GNU_SOURCE
-#include <stdlib.h>
-#include <time.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <stdarg.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/wait.h>
+#include "replace.h"
#include "tdb.h"
-
-#else
-
-#include "includes.h"
-#include "lib/tdb/include/tdb.h"
#include "system/time.h"
#include "system/wait.h"
#include "system/filesys.h"
-#endif
-
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif