From 63e43c8b19f0d8e475a3ec5cf63a03170de6b63a Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 29 Jan 2014 08:58:15 -0800 Subject: [PATCH] Use apr_getopt_long instead of simply apr_getopt. --- Console.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Console.cpp b/Console.cpp index d91e6d4..f904f08 100644 --- a/Console.cpp +++ b/Console.cpp @@ -631,17 +631,19 @@ int Main(int argc, char const * const argv[], char const * const envp[]) { _aprcall(apr_getopt_init(&state, pool, argc, argv)); for (;;) { - char opt; + int opt; const char *arg; - apr_status_t status(apr_getopt(state, - "cg:n:" + apr_status_t status(apr_getopt_long(state, (apr_getopt_option_t[]) { + {NULL, 'c', false, NULL}, + {NULL, 'g', true, NULL}, + {NULL, 'n', true, NULL}, #ifdef CY_ATTACH - "p:" + {NULL, 'p', true, NULL}, #endif - "r:" - "s" - , &opt, &arg)); + {NULL, 'r', true, NULL}, + {NULL, 's', false, NULL}, + {0, 0, 0, 0}}, &opt, &arg)); switch (status) { case APR_EOF: -- 2.47.2