diff options
author | Andreas Schneider <asn@cynapses.org> | 2010-09-03 15:44:41 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cynapses.org> | 2010-09-03 15:44:41 +0200 |
commit | d71d6afa348a45983160ace327e14e3c5c121ad5 (patch) | |
tree | f2fada4b916574a2f82ea247279ab5de371097ae /tests | |
parent | 2f8f230f617c4de1a2bd75352f4777f3592a1916 (diff) | |
download | libssh-d71d6afa348a45983160ace327e14e3c5c121ad5.tar.gz libssh-d71d6afa348a45983160ace327e14e3c5c121ad5.tar.xz libssh-d71d6afa348a45983160ace327e14e3c5c121ad5.zip |
tests: Disable options parsing if argp isn't available.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cmdline.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/cmdline.c b/tests/cmdline.c index ea1c90b4..c3a0bd9c 100644 --- a/tests/cmdline.c +++ b/tests/cmdline.c @@ -1,6 +1,8 @@ +#include "torture.h" + +#ifdef HAVE_ARGP_H #include <argp.h> -#include "torture.h" const char *argp_program_version = "check test 0.1"; const char *argp_program_bug_address = "<csync-devel@csync.org>"; @@ -63,12 +65,15 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) { /* Our argp parser. */ /* static struct argp argp = {options, parse_opt, args_doc, doc, NULL, NULL, NULL}; */ static struct argp argp = {options, parse_opt, NULL, doc, NULL, NULL, NULL}; +#endif /* HAVE_ARGP_H */ void torture_cmdline_parse(int argc, char **argv, struct argument_s *arguments) { /* * Parse our arguments; every option seen by parse_opt will * be reflected in arguments. */ +#ifdef HAVE_ARGP_H argp_parse(&argp, argc, argv, 0, 0, arguments); +#endif /* HAVE_ARGP_H */ } |