Commit cf034621 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1510 Change argv to support getopt, remove const for ease of use.

git-svn-id: file:///svn/toku/tokudb@11400 c7de825b-a66e-492c-adef-691d508d4ae1
parent f47dce49
...@@ -108,7 +108,7 @@ test_shutdown (void) { ...@@ -108,7 +108,7 @@ test_shutdown (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
setup(); setup();
test_abort_abort(); test_abort_abort();
......
...@@ -107,7 +107,7 @@ test_shutdown (void) { ...@@ -107,7 +107,7 @@ test_shutdown (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
setup(); setup();
test_abort_commit(); test_abort_commit();
......
...@@ -103,7 +103,7 @@ test_shutdown (void) { ...@@ -103,7 +103,7 @@ test_shutdown (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
setup(); setup();
test_commit_abort(); test_commit_abort();
......
...@@ -103,7 +103,7 @@ test_shutdown (void) { ...@@ -103,7 +103,7 @@ test_shutdown (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
setup(); setup();
test_commit_commit(); test_commit_commit();
......
...@@ -89,7 +89,7 @@ do_1381 (void) { ...@@ -89,7 +89,7 @@ do_1381 (void) {
} }
int int
test_main (int argc, const char *argv[]) test_main (int argc, char *argv[])
{ {
parse_args(argc, argv); parse_args(argc, argv);
do_1381(); do_1381();
......
...@@ -66,7 +66,7 @@ do_627 (void) { ...@@ -66,7 +66,7 @@ do_627 (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
do_627(); do_627();
return 0; return 0;
......
...@@ -48,7 +48,7 @@ checkpoint1 (void) ...@@ -48,7 +48,7 @@ checkpoint1 (void)
} }
int int
test_main (int argc, const char *argv[]) test_main (int argc, char *argv[])
{ {
parse_args(argc, argv); parse_args(argc, argv);
checkpoint1(); checkpoint1();
......
...@@ -152,7 +152,7 @@ void checkpoint_callback_2(void * extra) { ...@@ -152,7 +152,7 @@ void checkpoint_callback_2(void * extra) {
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
u_int32_t n; u_int32_t n;
int snap; int snap;
......
...@@ -97,7 +97,7 @@ doit (BOOL committed_provdels) { ...@@ -97,7 +97,7 @@ doit (BOOL committed_provdels) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
setup(); setup();
......
...@@ -61,7 +61,7 @@ doit (void) { ...@@ -61,7 +61,7 @@ doit (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test_setup(); test_setup();
......
...@@ -182,7 +182,7 @@ do_writes_that_fail (void) { ...@@ -182,7 +182,7 @@ do_writes_that_fail (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
do_writes_that_fail(); do_writes_that_fail();
return 0; return 0;
......
...@@ -16,7 +16,7 @@ void *startb(void* ignore __attribute__((__unused__))) { ...@@ -16,7 +16,7 @@ void *startb(void* ignore __attribute__((__unused__))) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
pthread_t a,b; pthread_t a,b;
{ int x_l = pthread_create(&a, NULL, starta, NULL); assert(x_l==0); } { int x_l = pthread_create(&a, NULL, starta, NULL); assert(x_l==0); }
......
...@@ -87,7 +87,7 @@ void *startb(void* ignore __attribute__((__unused__))) { ...@@ -87,7 +87,7 @@ void *startb(void* ignore __attribute__((__unused__))) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
pthread_t a,b; pthread_t a,b;
initialize(); initialize();
......
...@@ -87,7 +87,7 @@ void *startb(void* ignore __attribute__((__unused__))) { ...@@ -87,7 +87,7 @@ void *startb(void* ignore __attribute__((__unused__))) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
pthread_t a,b; pthread_t a,b;
initialize(); initialize();
......
...@@ -67,7 +67,7 @@ static void test (void) { ...@@ -67,7 +67,7 @@ static void test (void) {
} }
int int
test_main (int argc , const char *argv[]) { test_main (int argc , char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test(); test();
return 0; return 0;
......
...@@ -90,7 +90,7 @@ static void test (void) { ...@@ -90,7 +90,7 @@ static void test (void) {
} }
int int
test_main (int argc , const char *argv[]) { test_main (int argc , char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test(); test();
return 0; return 0;
......
...@@ -76,7 +76,7 @@ static void test (void) { ...@@ -76,7 +76,7 @@ static void test (void) {
} }
int int
test_main (int argc , const char *argv[]) { test_main (int argc , char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test(); test();
return 0; return 0;
......
...@@ -79,7 +79,7 @@ static void test (void) { ...@@ -79,7 +79,7 @@ static void test (void) {
} }
int int
test_main (int argc , const char *argv[]) { test_main (int argc , char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test(); test();
return 0; return 0;
......
...@@ -74,7 +74,7 @@ doit (void) { ...@@ -74,7 +74,7 @@ doit (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test_setup(); test_setup();
......
...@@ -112,7 +112,7 @@ test_shutdown (void) { ...@@ -112,7 +112,7 @@ test_shutdown (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test_setup(); test_setup();
test_commit_commit(); test_commit_commit();
......
...@@ -87,7 +87,7 @@ static void root_fifo_1(int n) { ...@@ -87,7 +87,7 @@ static void root_fifo_1(int n) {
r = env->close(env, 0); assert(r == 0); env = null_env; r = env->close(env, 0); assert(r == 0); env = null_env;
} }
int test_main(int argc, const char *argv[]) { int test_main(int argc, char *argv[]) {
int i; int i;
int n = -1; int n = -1;
......
...@@ -87,7 +87,7 @@ static void root_fifo_1(int n) { ...@@ -87,7 +87,7 @@ static void root_fifo_1(int n) {
r = env->close(env, 0); assert(r == 0); env = null_env; r = env->close(env, 0); assert(r == 0); env = null_env;
} }
int test_main(int argc, const char *argv[]) { int test_main(int argc, char *argv[]) {
int i; int i;
int n = -1; int n = -1;
......
...@@ -127,7 +127,7 @@ static void root_fifo_31(int n) { ...@@ -127,7 +127,7 @@ static void root_fifo_31(int n) {
r = env->close(env, 0); assert(r == 0); env = null_env; r = env->close(env, 0); assert(r == 0); env = null_env;
} }
int test_main(int argc, const char *argv[]) { int test_main(int argc, char *argv[]) {
int i; int i;
int n = -1; int n = -1;
......
...@@ -127,7 +127,7 @@ static void root_fifo_32(int n) { ...@@ -127,7 +127,7 @@ static void root_fifo_32(int n) {
r = env->close(env, 0); assert(r == 0); env = null_env; r = env->close(env, 0); assert(r == 0); env = null_env;
} }
int test_main(int argc, const char *argv[]) { int test_main(int argc, char *argv[]) {
int i; int i;
int n = -1; int n = -1;
......
...@@ -132,7 +132,7 @@ static void root_fifo_41(int n, int ntxn, BOOL do_populate) { ...@@ -132,7 +132,7 @@ static void root_fifo_41(int n, int ntxn, BOOL do_populate) {
r = env->close(env, 0); assert(r == 0); env = null_env; r = env->close(env, 0); assert(r == 0); env = null_env;
} }
int test_main(int argc, const char *argv[]) { int test_main(int argc, char *argv[]) {
int i; int i;
int n = -1; int n = -1;
int ntxn = -1; int ntxn = -1;
......
...@@ -65,7 +65,7 @@ test_stat64 (unsigned int N) ...@@ -65,7 +65,7 @@ test_stat64 (unsigned int N)
} }
int int
test_main (int argc, const char *argv[]) test_main (int argc, char *argv[])
{ {
parse_args(argc, argv); parse_args(argc, argv);
test_stat64(40000); test_stat64(40000);
......
...@@ -52,7 +52,7 @@ static void test (void) { ...@@ -52,7 +52,7 @@ static void test (void) {
} }
int int
test_main (int argc __attribute__((__unused__)), const char *argv[] __attribute__((__unused__))) { test_main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
test(); test();
return 0; return 0;
} }
......
...@@ -69,7 +69,7 @@ static void test (void) { ...@@ -69,7 +69,7 @@ static void test (void) {
} }
int int
test_main (int argc __attribute__((__unused__)), const char *argv[] __attribute__((__unused__))) { test_main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
test(); test();
return 0; return 0;
} }
......
...@@ -82,7 +82,7 @@ static void test (void) { ...@@ -82,7 +82,7 @@ static void test (void) {
} }
int int
test_main (int argc __attribute__((__unused__)), const char *argv[] __attribute__((__unused__))) { test_main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
test(); test();
return 0; return 0;
} }
......
...@@ -42,7 +42,7 @@ int verbose=0; ...@@ -42,7 +42,7 @@ int verbose=0;
#endif #endif
static __attribute__((__unused__)) void static __attribute__((__unused__)) void
parse_args (int argc, const char *argv[]) { parse_args (int argc, char *argv[]) {
const char *argv0=argv[0]; const char *argv0=argv[0];
while (argc>1) { while (argc>1) {
int resultcode=0; int resultcode=0;
...@@ -139,9 +139,9 @@ typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL; ...@@ -139,9 +139,9 @@ typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL;
#endif #endif
#include <memory.h> #include <memory.h>
int test_main (int argc, const char *argv[]); int test_main (int argc, char *argv[]);
int int
main(int argc, const char *argv[]) { main(int argc, char *argv[]) {
int r; int r;
#if IS_TDB && (defined(_WIN32) || defined(_WIN64)) #if IS_TDB && (defined(_WIN32) || defined(_WIN64))
toku_ydb_init(); toku_ydb_init();
......
...@@ -69,7 +69,7 @@ do_1324 (int moreflags) ...@@ -69,7 +69,7 @@ do_1324 (int moreflags)
} }
int int
test_main (int argc, const char *argv[]) test_main (int argc, char *argv[])
{ {
parse_args(argc, argv); parse_args(argc, argv);
do_1324(DB_INIT_LOG); do_1324(DB_INIT_LOG);
......
...@@ -97,7 +97,7 @@ do_insert_delete_fifo (void) ...@@ -97,7 +97,7 @@ do_insert_delete_fifo (void)
} }
int int
test_main (int argc, const char *argv[]) test_main (int argc, char *argv[])
{ {
parse_args(argc, argv); parse_args(argc, argv);
do_insert_delete_fifo(); do_insert_delete_fifo();
......
...@@ -61,7 +61,7 @@ four_billion_subtransactions (int do_something_in_children, int use_big_incremen ...@@ -61,7 +61,7 @@ four_billion_subtransactions (int do_something_in_children, int use_big_incremen
} }
int int
test_main (int argc, const char *argv[]) test_main (int argc, char *argv[])
{ {
parse_args(argc, argv); parse_args(argc, argv);
four_billion_subtransactions(0, 0); four_billion_subtransactions(0, 0);
......
...@@ -118,7 +118,7 @@ run (int choice) { ...@@ -118,7 +118,7 @@ run (int choice) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
......
...@@ -50,7 +50,7 @@ run (void) { ...@@ -50,7 +50,7 @@ run (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
......
...@@ -51,7 +51,7 @@ run (void) { ...@@ -51,7 +51,7 @@ run (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
......
...@@ -108,7 +108,7 @@ run (int choice) { ...@@ -108,7 +108,7 @@ run (int choice) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
......
...@@ -105,7 +105,7 @@ run (int choice) { ...@@ -105,7 +105,7 @@ run (int choice) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
......
...@@ -137,7 +137,7 @@ test_789(void) { ...@@ -137,7 +137,7 @@ test_789(void) {
} }
int int
test_main(int UU(argc), const char UU(*argv[])) { test_main(int UU(argc), char UU(*argv[])) {
test_789(); test_789();
return 0; return 0;
} }
...@@ -79,7 +79,7 @@ testit (const int klen, const int vlen, const int n, const int lastvlen) { ...@@ -79,7 +79,7 @@ testit (const int klen, const int vlen, const int n, const int lastvlen) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
const int meg = 1024*1024; const int meg = 1024*1024;
const int headeroverhead = 12*4; const int headeroverhead = 12*4;
......
...@@ -157,7 +157,7 @@ test_db_put_aborts (void) { ...@@ -157,7 +157,7 @@ test_db_put_aborts (void) {
} }
int int
test_main (int UU(argc), const char UU(*argv[])) { test_main (int UU(argc), char UU(*argv[])) {
test_db_open_aborts(); test_db_open_aborts();
test_db_put_aborts(); test_db_put_aborts();
return 0; return 0;
......
...@@ -111,7 +111,7 @@ do_test_abort2 (void) { ...@@ -111,7 +111,7 @@ do_test_abort2 (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
do_test_abort2(); do_test_abort2();
return 0; return 0;
......
...@@ -161,7 +161,7 @@ test_abort3 (void) { ...@@ -161,7 +161,7 @@ test_abort3 (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test_abort3(); test_abort3();
return 0; return 0;
......
...@@ -156,7 +156,7 @@ runtests(u_int32_t dup_flags) { ...@@ -156,7 +156,7 @@ runtests(u_int32_t dup_flags) {
} }
int int
test_main (int UU(argc), const char UU(*argv[])) { test_main (int UU(argc), char UU(*argv[])) {
runtests(0); runtests(0);
runtests(DB_DUPSORT|DB_DUP); runtests(DB_DUPSORT|DB_DUP);
return 0; return 0;
......
...@@ -196,7 +196,7 @@ runtests(u_int32_t dup_flags, int abort_type) { ...@@ -196,7 +196,7 @@ runtests(u_int32_t dup_flags, int abort_type) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
int abort_type; int abort_type;
for (abort_type = 0; abort_type<3; abort_type++) { for (abort_type = 0; abort_type<3; abort_type++) {
......
...@@ -124,7 +124,7 @@ do_abort_delete_first_or_last(int N, ...@@ -124,7 +124,7 @@ do_abort_delete_first_or_last(int N,
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
int f; int f;
for (f=0; f<2; f++) { for (f=0; f<2; f++) {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV *env; DB_ENV *env;
DB *db; DB *db;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <memory.h> #include <memory.h>
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV *env; DB_ENV *env;
DB *db; DB *db;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <sys/stat.h> #include <sys/stat.h>
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV *env; DB_ENV *env;
DB *db, *db2; DB *db, *db2;
......
...@@ -79,7 +79,7 @@ test_cachesize (void) { ...@@ -79,7 +79,7 @@ test_cachesize (void) {
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test_cachesize(); test_cachesize();
......
...@@ -78,7 +78,7 @@ test_cursor (void) { ...@@ -78,7 +78,7 @@ test_cursor (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -90,7 +90,7 @@ test (void) { ...@@ -90,7 +90,7 @@ test (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -177,7 +177,7 @@ static void run_test(u_int32_t dup_flags) { ...@@ -177,7 +177,7 @@ static void run_test(u_int32_t dup_flags) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -113,7 +113,7 @@ test_reopen (void) { ...@@ -113,7 +113,7 @@ test_reopen (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
......
...@@ -154,7 +154,7 @@ test_cursor_delete_dupsort (void) { ...@@ -154,7 +154,7 @@ test_cursor_delete_dupsort (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test_cursor_delete(0); test_cursor_delete(0);
......
...@@ -60,7 +60,7 @@ test_cursor_delete2 (void) { ...@@ -60,7 +60,7 @@ test_cursor_delete2 (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -62,7 +62,7 @@ test_cursor_delete2 (void) { ...@@ -62,7 +62,7 @@ test_cursor_delete2 (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -68,7 +68,7 @@ cursor_range_with_delete (u_int32_t flag) { ...@@ -68,7 +68,7 @@ cursor_range_with_delete (u_int32_t flag) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
setup_db("next.db"); setup_db("next.db");
insert(); insert();
......
...@@ -41,7 +41,7 @@ test_cursor_flags (int cursor_flags, int expectr) { ...@@ -41,7 +41,7 @@ test_cursor_flags (int cursor_flags, int expectr) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -89,7 +89,7 @@ test_cursor_nonleaf_expand (int n, int reverse) { ...@@ -89,7 +89,7 @@ test_cursor_nonleaf_expand (int n, int reverse) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
int i; int i;
......
...@@ -171,7 +171,7 @@ test (u_int32_t dup_flags) { ...@@ -171,7 +171,7 @@ test (u_int32_t dup_flags) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test(0); test(0);
test(DB_DUP | DB_DUPSORT); test(DB_DUP | DB_DUPSORT);
......
...@@ -77,7 +77,7 @@ test_cursor_sticky (int n, int dup_mode) { ...@@ -77,7 +77,7 @@ test_cursor_sticky (int n, int dup_mode) {
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
int i; int i;
// setvbuf(stdout, NULL, _IONBF, 0); // setvbuf(stdout, NULL, _IONBF, 0);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// ENVDIR is defined in the Makefile // ENVDIR is defined in the Makefile
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV * const null_env = 0; DB_ENV * const null_env = 0;
DB *db; DB *db;
......
...@@ -16,7 +16,7 @@ DB_ENV *env; ...@@ -16,7 +16,7 @@ DB_ENV *env;
DB *db; DB *db;
int int
test_main (int UU(argc), const char UU(*argv[])) { test_main (int UU(argc), char UU(*argv[])) {
int r; int r;
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
......
...@@ -17,7 +17,7 @@ DB *db; ...@@ -17,7 +17,7 @@ DB *db;
DB_TXN* null_txn = NULL; DB_TXN* null_txn = NULL;
int int
test_main (int UU(argc), const char UU(*argv[])) { test_main (int UU(argc), char UU(*argv[])) {
int r; int r;
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
......
...@@ -57,7 +57,7 @@ close_dbs (void) { ...@@ -57,7 +57,7 @@ close_dbs (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
int i; int i;
int r; int r;
......
...@@ -162,7 +162,7 @@ test_db_delboth (int n, int dup_mode) { ...@@ -162,7 +162,7 @@ test_db_delboth (int n, int dup_mode) {
#endif //USE_TDB #endif //USE_TDB
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -135,7 +135,7 @@ test_db_get_datasize0 (void) { ...@@ -135,7 +135,7 @@ test_db_get_datasize0 (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test_db_get_datasize0(); test_db_get_datasize0();
......
...@@ -208,7 +208,7 @@ runtest(void) { ...@@ -208,7 +208,7 @@ runtest(void) {
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
for (abort_type = 0; abort_type < 3; abort_type++) { for (abort_type = 0; abort_type < 3; abort_type++) {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <db.h> #include <db.h>
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV *dbenv; DB_ENV *dbenv;
int r; int r;
......
...@@ -68,7 +68,7 @@ reinit_config (int set_home, int set_DB_ENVIRON, int set_DB_HOME) { ...@@ -68,7 +68,7 @@ reinit_config (int set_home, int set_DB_ENVIRON, int set_DB_HOME) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV *env; DB_ENV *env;
DB_TXN * const null_txn = 0; DB_TXN * const null_txn = 0;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
// ENVDIR is defined in the Makefile // ENVDIR is defined in the Makefile
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV *dbenv; DB_ENV *dbenv;
int r; int r;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// ENVDIR is defined in the Makefile // ENVDIR is defined in the Makefile
int int
test_main(int argc, const char** argv) { test_main(int argc, char** argv) {
DB_ENV *dbenv; DB_ENV *dbenv;
int r; int r;
if (argc == 2 && !strcmp(argv[1], "-v")) verbose = 1; if (argc == 2 && !strcmp(argv[1], "-v")) verbose = 1;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// ENVDIR is defined in the Makefile // ENVDIR is defined in the Makefile
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV *dbenv; DB_ENV *dbenv;
int r; int r;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// ENVDIR is defined in the Makefile // ENVDIR is defined in the Makefile
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV *dbenv; DB_ENV *dbenv;
int r; int r;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// ENVDIR is defined in the Makefile // ENVDIR is defined in the Makefile
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV *dbenv; DB_ENV *dbenv;
int r; int r;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// ENVDIR is defined in the Makefile // ENVDIR is defined in the Makefile
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV *dbenv; DB_ENV *dbenv;
int r; int r;
......
...@@ -16,7 +16,7 @@ DB_ENV *env; ...@@ -16,7 +16,7 @@ DB_ENV *env;
DB *db; DB *db;
int int
test_main (int UU(argc), const char UU(*argv[])) { test_main (int UU(argc), char UU(*argv[])) {
int r; int r;
r=system("rm -rf " ENVDIR); assert(r==0); r=system("rm -rf " ENVDIR); assert(r==0);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
......
...@@ -129,7 +129,7 @@ GET_TEST get_tests[] = { ...@@ -129,7 +129,7 @@ GET_TEST get_tests[] = {
const int num_get = sizeof(get_tests) / sizeof(get_tests[0]); const int num_get = sizeof(get_tests) / sizeof(get_tests[0]);
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
int i; int i;
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -90,7 +90,7 @@ runtest(void) { ...@@ -90,7 +90,7 @@ runtest(void) {
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
runtest(); runtest();
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
int int
test_main (int UU(argc), const char UU(*argv[])) { test_main (int UU(argc), char UU(*argv[])) {
DB *db; DB *db;
int r; int r;
r = db_create(&db, 0, 0); r = db_create(&db, 0, 0);
......
...@@ -16,7 +16,7 @@ DB_ENV *env; ...@@ -16,7 +16,7 @@ DB_ENV *env;
DB *db; DB *db;
int int
test_main (int UU(argc), const char UU(*argv[])) { test_main (int UU(argc), char UU(*argv[])) {
int r; int r;
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
......
...@@ -35,7 +35,7 @@ void test_db_remove (void) { ...@@ -35,7 +35,7 @@ void test_db_remove (void) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test_db_remove(); test_db_remove();
......
...@@ -19,7 +19,7 @@ DBT key; ...@@ -19,7 +19,7 @@ DBT key;
DBT data; DBT data;
int int
test_main (int UU(argc), const char UU(*argv[])) { test_main (int UU(argc), char UU(*argv[])) {
int r; int r;
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
......
...@@ -19,7 +19,7 @@ DBT key; ...@@ -19,7 +19,7 @@ DBT key;
DBT data; DBT data;
int int
test_main (int UU(argc), const char UU(*argv[])) { test_main (int UU(argc), char UU(*argv[])) {
int r; int r;
system("rm -rf " ENVDIR); system("rm -rf " ENVDIR);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
......
...@@ -34,7 +34,7 @@ test_db_set_flags (int flags, int expectr, int flags2, int expectr2) { ...@@ -34,7 +34,7 @@ test_db_set_flags (int flags, int expectr, int flags2, int expectr2) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// ENVDIR is defined in the Makefile // ENVDIR is defined in the Makefile
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV * env = 0; DB_ENV * env = 0;
DB *db; DB *db;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// ENVDIR is defined in the Makefile // ENVDIR is defined in the Makefile
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
DB_ENV * env = 0; DB_ENV * env = 0;
DB *db; DB *db;
......
...@@ -424,7 +424,7 @@ test (u_int32_t dup_flags) { ...@@ -424,7 +424,7 @@ test (u_int32_t dup_flags) {
int int
test_main(int argc, const char* argv[]) { test_main(int argc, char* argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
if (!IS_TDB) { if (!IS_TDB) {
if (verbose) { if (verbose) {
......
...@@ -682,7 +682,7 @@ test (u_int32_t dup_flags) { ...@@ -682,7 +682,7 @@ test (u_int32_t dup_flags) {
int int
test_main(int argc, const char* argv[]) { test_main(int argc, char* argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
if (!IS_TDB) { if (!IS_TDB) {
if (verbose) { if (verbose) {
......
...@@ -218,7 +218,7 @@ test (u_int32_t dup_flags) { ...@@ -218,7 +218,7 @@ test (u_int32_t dup_flags) {
int int
test_main(int argc, const char* argv[]) { test_main(int argc, char* argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test(0); test(0);
test(DB_DUP | DB_DUPSORT); test(DB_DUP | DB_DUPSORT);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
const char *v; const char *v;
int major, minor, patch; int major, minor, patch;
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -47,7 +47,7 @@ delete_db(char *name) { ...@@ -47,7 +47,7 @@ delete_db(char *name) {
} }
int int
test_main (int UU(argc), const char UU(*argv[])) { test_main (int UU(argc), char UU(*argv[])) {
int r; int r;
r=system("rm -rf " ENVDIR); r=system("rm -rf " ENVDIR);
CKERR(r); CKERR(r);
......
...@@ -704,7 +704,7 @@ test_i0i1ci0_search (int n, int dup_mode) { ...@@ -704,7 +704,7 @@ test_i0i1ci0_search (int n, int dup_mode) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
int i; int i;
int r; int r;
......
...@@ -221,7 +221,7 @@ test_put_00_01_01 (int dup_mode, u_int32_t put_flags) { ...@@ -221,7 +221,7 @@ test_put_00_01_01 (int dup_mode, u_int32_t put_flags) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
int yes_overwrite=0; int yes_overwrite=0;
if (IS_TDB) if (IS_TDB)
......
...@@ -69,7 +69,7 @@ test_dup_flags (u_int32_t dup_flags) { ...@@ -69,7 +69,7 @@ test_dup_flags (u_int32_t dup_flags) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -251,7 +251,7 @@ test_nonleaf_insert (int n, int dup_mode) { ...@@ -251,7 +251,7 @@ test_nonleaf_insert (int n, int dup_mode) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
int i; int i;
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -119,7 +119,7 @@ test_dup_next (int n, int dup_mode) { ...@@ -119,7 +119,7 @@ test_dup_next (int n, int dup_mode) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
int i; int i;
for (i = 1; i < argc; i++) { for (i = 1; i < argc; i++) {
const char *arg = argv[i]; const char *arg = argv[i];
......
...@@ -321,7 +321,7 @@ test_reverse_search (int n, int dup_mode) { ...@@ -321,7 +321,7 @@ test_reverse_search (int n, int dup_mode) {
} }
int int
test_main(int argc, const char *argv[]) { test_main(int argc, char *argv[]) {
int i; int i;
parse_args(argc, argv); parse_args(argc, argv);
......
...@@ -101,7 +101,7 @@ test_dupsort_del (void) { ...@@ -101,7 +101,7 @@ test_dupsort_del (void) {
} }
int int
test_main (int argc, const char *argv[]) { test_main (int argc, char *argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
test_dupsort_del(); test_dupsort_del();
return 0; return 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment