diff options
author | Christian Ambach <ambi@samba.org> | 2013-11-22 05:19:16 +0100 |
---|---|---|
committer | Christian Ambach <ambi@samba.org> | 2013-12-07 18:38:21 +0100 |
commit | 5390ff5a26f7868336d8136b0361943080dd7f5b (patch) | |
tree | b1b9187f8d8fc100d64ebf27495be285cf109509 /lib/ntdb | |
parent | 0f41792dc597854f0d53c25c2975f542dd812711 (diff) | |
download | samba-5390ff5a26f7868336d8136b0361943080dd7f5b.tar.gz samba-5390ff5a26f7868336d8136b0361943080dd7f5b.tar.xz samba-5390ff5a26f7868336d8136b0361943080dd7f5b.zip |
lib/ntdb optimize includes in ntdb tools
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
Diffstat (limited to 'lib/ntdb')
-rw-r--r-- | lib/ntdb/tools/growtdb-bench.c | 3 | ||||
-rw-r--r-- | lib/ntdb/tools/ntdbbackup.c | 2 | ||||
-rw-r--r-- | lib/ntdb/tools/ntdbdump.c | 14 | ||||
-rw-r--r-- | lib/ntdb/tools/ntdbrestore.c | 11 | ||||
-rw-r--r-- | lib/ntdb/tools/ntdbtool.c | 18 | ||||
-rw-r--r-- | lib/ntdb/tools/ntdbtorture.c | 16 | ||||
-rw-r--r-- | lib/ntdb/tools/speed.c | 2 |
7 files changed, 5 insertions, 61 deletions
diff --git a/lib/ntdb/tools/growtdb-bench.c b/lib/ntdb/tools/growtdb-bench.c index aa5a406a54..28c1de837a 100644 --- a/lib/ntdb/tools/growtdb-bench.c +++ b/lib/ntdb/tools/growtdb-bench.c @@ -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, diff --git a/lib/ntdb/tools/ntdbbackup.c b/lib/ntdb/tools/ntdbbackup.c index a76f18491b..c632f0ed84 100644 --- a/lib/ntdb/tools/ntdbbackup.c +++ b/lib/ntdb/tools/ntdbbackup.c @@ -42,7 +42,7 @@ #include "config.h" #include "ntdb.h" -#include "system/filesys.h" +#include "private.h" #ifdef HAVE_GETOPT_H #include <getopt.h> diff --git a/lib/ntdb/tools/ntdbdump.c b/lib/ntdb/tools/ntdbdump.c index 1b1c59eae3..fc83796702 100644 --- a/lib/ntdb/tools/ntdbdump.c +++ b/lib/ntdb/tools/ntdbdump.c @@ -18,19 +18,7 @@ */ #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) { diff --git a/lib/ntdb/tools/ntdbrestore.c b/lib/ntdb/tools/ntdbrestore.c index 1df9322e64..695af79cb2 100644 --- a/lib/ntdb/tools/ntdbrestore.c +++ b/lib/ntdb/tools/ntdbrestore.c @@ -20,17 +20,8 @@ #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) { diff --git a/lib/ntdb/tools/ntdbtool.c b/lib/ntdb/tools/ntdbtool.c index 7c1ef7df7a..144cd92f88 100644 --- a/lib/ntdb/tools/ntdbtool.c +++ b/lib/ntdb/tools/ntdbtool.c @@ -22,23 +22,7 @@ #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; diff --git a/lib/ntdb/tools/ntdbtorture.c b/lib/ntdb/tools/ntdbtorture.c index 7ddb5c3acb..9fd25ca7c6 100644 --- a/lib/ntdb/tools/ntdbtorture.c +++ b/lib/ntdb/tools/ntdbtorture.c @@ -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 diff --git a/lib/ntdb/tools/speed.c b/lib/ntdb/tools/speed.c index 8928d8c67a..a82932186d 100644 --- a/lib/ntdb/tools/speed.c +++ b/lib/ntdb/tools/speed.c @@ -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> |