diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-02-21 15:29:12 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-02-21 15:29:12 +1030 |
commit | e6901fa35069e234044c94b87ac9df4064b31d1c (patch) | |
tree | 407c937d52bed64033f0e60e77b8fcd34233f543 /lib/tdb2 | |
parent | fb8cf568caf43615f7a06a623209a0fade629a35 (diff) | |
download | samba-e6901fa35069e234044c94b87ac9df4064b31d1c.tar.gz samba-e6901fa35069e234044c94b87ac9df4064b31d1c.tar.bz2 samba-e6901fa35069e234044c94b87ac9df4064b31d1c.zip |
lib/tdb2: tools should use config.h, and replace where available.
The tdb2 tools should #include "config.h" before tdb2.h (about to
become a requirement) and use libreplace where available.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb2')
-rw-r--r-- | lib/tdb2/tools/tdb2backup.c | 1 | ||||
-rw-r--r-- | lib/tdb2/tools/tdb2dump.c | 7 | ||||
-rw-r--r-- | lib/tdb2/tools/tdb2restore.c | 6 | ||||
-rw-r--r-- | lib/tdb2/tools/tdb2tool.c | 8 | ||||
-rw-r--r-- | lib/tdb2/tools/tdb2torture.c | 7 |
5 files changed, 28 insertions, 1 deletions
diff --git a/lib/tdb2/tools/tdb2backup.c b/lib/tdb2/tools/tdb2backup.c index 531bf29acc..729ae720b4 100644 --- a/lib/tdb2/tools/tdb2backup.c +++ b/lib/tdb2/tools/tdb2backup.c @@ -40,6 +40,7 @@ */ +#include "config.h" #include "tdb2.h" #include "system/filesys.h" diff --git a/lib/tdb2/tools/tdb2dump.c b/lib/tdb2/tools/tdb2dump.c index abe1d9b871..40230a2643 100644 --- a/lib/tdb2/tools/tdb2dump.c +++ b/lib/tdb2/tools/tdb2dump.c @@ -16,7 +16,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "config.h" #include "tdb2.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> @@ -24,6 +30,7 @@ #include <fcntl.h> #include <stdlib.h> #include <unistd.h> +#endif static void print_data(TDB_DATA d) { diff --git a/lib/tdb2/tools/tdb2restore.c b/lib/tdb2/tools/tdb2restore.c index 658215a16c..608b46de18 100644 --- a/lib/tdb2/tools/tdb2restore.c +++ b/lib/tdb2/tools/tdb2restore.c @@ -17,13 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "config.h" #include "tdb2.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 #define debug_fprintf(file, fmt, ...) do {/*nothing*/} while (0) diff --git a/lib/tdb2/tools/tdb2tool.c b/lib/tdb2/tools/tdb2tool.c index 9b3554de6c..ae20971143 100644 --- a/lib/tdb2/tools/tdb2tool.c +++ b/lib/tdb2/tools/tdb2tool.c @@ -20,7 +20,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "config.h" #include "tdb2.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> @@ -31,6 +38,7 @@ #include <errno.h> #include <string.h> #include <stdarg.h> +#endif static int do_command(void); const char *cmdname; diff --git a/lib/tdb2/tools/tdb2torture.c b/lib/tdb2/tools/tdb2torture.c index 83847da027..1c1efc593a 100644 --- a/lib/tdb2/tools/tdb2torture.c +++ b/lib/tdb2/tools/tdb2torture.c @@ -2,9 +2,13 @@ writers - that stresses the locking code. */ +#include "config.h" #include "tdb2.h" -#include <stdlib.h> #include <err.h> +#ifdef HAVE_LIBREPLACE +#include <replace.h> +#else +#include <stdlib.h> #include <getopt.h> #include <stdarg.h> #include <stdio.h> @@ -15,6 +19,7 @@ #include <fcntl.h> #include <time.h> #include <sys/wait.h> +#endif /* Currently we default to creating a tdb1. This will change! */ #define TDB2_IS_DEFAULT false |