From 595e0965b2769d041fa16b4358f285d3adcf7c2e Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 22 Jul 2013 01:08:38 -0500 Subject: [PATCH] getopt: document what is different about our getopt verses normal netbsd getopt_long. --- getopt_long.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/getopt_long.c b/getopt_long.c index 11c2728..4db51e6 100644 --- a/getopt_long.c +++ b/getopt_long.c @@ -66,6 +66,8 @@ #include #include +#define PKGCONF_HACK_LOGICAL_OR_ALL_VALUES + #if HAVE_STRICT_MODE > 0 # define GNU_COMPATIBLE /* Be more compatible, configure's use us! */ #endif @@ -354,7 +356,11 @@ parse_long_options(char * const *nargv, const char *options, if (idx) *idx = match; if (long_options[match].flag) { +#ifdef PKGCONF_HACK_LOGICAL_OR_ALL_VALUES *long_options[match].flag |= long_options[match].val; +#else + *long_options[match].flag = long_options[match].val; +#endif return (0); } else return (long_options[match].val);