diff options
author | Keith Bostic <keith@wiredtiger.com> | 2014-10-10 08:52:55 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2014-10-10 08:52:55 -0400 |
commit | ee28ec9dda6f88866bf1ac0269d3c823ed2ae116 (patch) | |
tree | 2b3456c0dfd836ce0ed0e6e6347a7bf871c0e07a /test/bloom/test_bloom.c | |
parent | d206f7ba6f58c6ad648af6cd693ce03f8d6fe161 (diff) | |
download | mongo-ee28ec9dda6f88866bf1ac0269d3c823ed2ae116.tar.gz |
Move the utilities/util_getopt.c implementation of getopt(3) into the
WiredTiger library, and convert all of the utilities and test programs
to use it.
Diffstat (limited to 'test/bloom/test_bloom.c')
-rw-r--r-- | test/bloom/test_bloom.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/test/bloom/test_bloom.c b/test/bloom/test_bloom.c index 76e20d552d8..d919060492a 100644 --- a/test/bloom/test_bloom.c +++ b/test/bloom/test_bloom.c @@ -58,6 +58,8 @@ static void usage(void); int main(int argc, char *argv[]) { + extern char *__wt_optarg; + extern int __wt_optind; int ch; if ((g.progname = strrchr(argv[0], '/')) == NULL) @@ -74,29 +76,29 @@ main(int argc, char *argv[]) g.c_srand = 3233456; /* Set values from the command line. */ - while ((ch = getopt(argc, argv, "c:f:k:o:s:")) != EOF) + while ((ch = __wt_getopt(g.progname, argc, argv, "c:f:k:o:s:")) != EOF) switch (ch) { case 'c': /* Cache size */ - g.c_cache = (u_int)atoi(optarg); + g.c_cache = (u_int)atoi(__wt_optarg); break; case 'f': /* Factor */ - g.c_factor = (u_int)atoi(optarg); + g.c_factor = (u_int)atoi(__wt_optarg); break; case 'k': /* Number of hash functions */ - g.c_k = (u_int)atoi(optarg); + g.c_k = (u_int)atoi(__wt_optarg); break; case 'o': /* Number of ops */ - g.c_ops = (u_int)atoi(optarg); + g.c_ops = (u_int)atoi(__wt_optarg); break; case 's': /* Number of ops */ - g.c_srand = (u_int)atoi(optarg); + g.c_srand = (u_int)atoi(__wt_optarg); break; default: usage(); } - argc -= optind; - argv += optind; + argc -= __wt_optind; + argv += __wt_optind; setup(); run(); |