lib/ntdb optimize includes in ntdb tools
authorChristian Ambach <ambi@samba.org>
Fri, 22 Nov 2013 04:19:16 +0000 (05:19 +0100)
committerChristian Ambach <ambi@samba.org>
Sat, 7 Dec 2013 17:38:21 +0000 (18:38 +0100)
use the private header (which will use libreplace or system headers)
instead of direct includes of system includes

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Rusty Russell <rusty@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Sat Dec  7 18:38:21 CET 2013 on sn-devel-104

lib/ntdb/tools/growtdb-bench.c
lib/ntdb/tools/ntdbbackup.c
lib/ntdb/tools/ntdbdump.c
lib/ntdb/tools/ntdbrestore.c
lib/ntdb/tools/ntdbtool.c
lib/ntdb/tools/ntdbtorture.c
lib/ntdb/tools/speed.c

index aa5a406a543113722d5cbd3ec5edaba669451ceb..28c1de837abb84c900ba993aaf333ff358cd1dc8 100644 (file)
@@ -4,9 +4,6 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <ccan/err/err.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 
 static void logfn(struct ntdb_context *ntdb,
                  enum ntdb_log_level level,
index a76f18491b9e69d71d88ad1226ef7d0c42af770f..c632f0ed84b01caeb1a87f4fb19bfe6d3bc8ec4d 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "config.h"
 #include "ntdb.h"
-#include "system/filesys.h"
+#include "private.h"
 
 #ifdef HAVE_GETOPT_H
 #include <getopt.h>
index 1b1c59eae3684f34c8e8724ded9a4fe0c032040c..fc837967023a641c28b7208d729e26f52d5c036f 100644 (file)
 */
 #include "config.h"
 #include "ntdb.h"
-#ifdef HAVE_LIBREPLACE
-#include <replace.h>
-#include <system/filesys.h>
-#include <system/locale.h>
-#else
-#include <ctype.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#endif
+#include "private.h"
 
 static void print_data(NTDB_DATA d)
 {
index 1df9322e6412533dba3391c151e6052a49dbf493..695af79cb2f8bd01ab6fbd26d76130bd604d3595 100644 (file)
 
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include <assert.h>
-#ifdef HAVE_LIBREPLACE
-#include <replace.h>
-#include <system/filesys.h>
-#else
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#endif
 
 static int read_linehead(FILE *f)
 {
index 7c1ef7df7aac7180480d10ffaf0709427f39ebd9..144cd92f88ce9c800b7214c7964cb878d8f866ba 100644 (file)
 
 #include "config.h"
 #include "ntdb.h"
-#ifdef HAVE_LIBREPLACE
-#include <replace.h>
-#include <system/filesys.h>
-#include <system/time.h>
-#include <system/locale.h>
-#else
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <stdarg.h>
-#endif
+#include "private.h"
 
 static int do_command(void);
 const char *cmdname;
index 7ddb5c3acb648ab934f80f58dcacf5bc0fca2ef2..9fd25ca7c6c9bda38d6f09eafb6ade35c591ece3 100644 (file)
@@ -4,22 +4,8 @@
 
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include <ccan/err/err.h>
-#ifdef HAVE_LIBREPLACE
-#include <replace.h>
-#else
-#include <stdlib.h>
-#include <getopt.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <time.h>
-#include <sys/wait.h>
-#endif
 
 //#define REOPEN_PROB 30
 #define DELETE_PROB 8
index 8928d8c67a37bc933aad99fe9ff5189b266f2f66..a82932186d4568f536ba023911469fcb90124e1f 100644 (file)
@@ -1,8 +1,6 @@
 /* Simple speed test for NTDB */
 #include <ccan/err/err.h>
 #include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <unistd.h>
 #include <sys/time.h>
 #include <fcntl.h>