diff options
Diffstat (limited to 'source4/lib/tdb/tools/tdbtorture.c')
-rw-r--r-- | source4/lib/tdb/tools/tdbtorture.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source4/lib/tdb/tools/tdbtorture.c b/source4/lib/tdb/tools/tdbtorture.c index 3f704e537e..d7c0812800 100644 --- a/source4/lib/tdb/tools/tdbtorture.c +++ b/source4/lib/tdb/tools/tdbtorture.c @@ -1,3 +1,8 @@ +/* this tests tdb by doing lots of ops from several simultaneous + writers - that stresses the locking code. Build with TDB_DEBUG=1 + for best effect */ + +#ifdef STANDALONE #include <stdlib.h> #include <time.h> #include <stdio.h> @@ -13,11 +18,11 @@ #include <sys/wait.h> #include "tdb.h" -/* this tests tdb by doing lots of ops from several simultaneous - writers - that stresses the locking code. Build with TDB_DEBUG=1 - for best effect */ +#else +#include "includes.h" +#endif #define REOPEN_PROB 30 #define DELETE_PROB 8 @@ -32,6 +37,9 @@ static TDB_CONTEXT *db; +#ifdef PRINTF_ATTRIBUTE +static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...) PRINTF_ATTRIBUTE(3,4); +#endif static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...) { va_list ap; @@ -50,7 +58,7 @@ static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...) #endif } -static void fatal(char *why) +static void fatal(const char *why) { perror(why); exit(1); |