forked from ariadne/pkgconf
getopt: document what is different about our getopt verses normal netbsd getopt_long.
parent
fe8186aa8f
commit
595e0965b2
|
@ -66,6 +66,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#define PKGCONF_HACK_LOGICAL_OR_ALL_VALUES
|
||||||
|
|
||||||
#if HAVE_STRICT_MODE > 0
|
#if HAVE_STRICT_MODE > 0
|
||||||
# define GNU_COMPATIBLE /* Be more compatible, configure's use us! */
|
# define GNU_COMPATIBLE /* Be more compatible, configure's use us! */
|
||||||
#endif
|
#endif
|
||||||
|
@ -354,7 +356,11 @@ parse_long_options(char * const *nargv, const char *options,
|
||||||
if (idx)
|
if (idx)
|
||||||
*idx = match;
|
*idx = match;
|
||||||
if (long_options[match].flag) {
|
if (long_options[match].flag) {
|
||||||
|
#ifdef PKGCONF_HACK_LOGICAL_OR_ALL_VALUES
|
||||||
*long_options[match].flag |= long_options[match].val;
|
*long_options[match].flag |= long_options[match].val;
|
||||||
|
#else
|
||||||
|
*long_options[match].flag = long_options[match].val;
|
||||||
|
#endif
|
||||||
return (0);
|
return (0);
|
||||||
} else
|
} else
|
||||||
return (long_options[match].val);
|
return (long_options[match].val);
|
||||||
|
|
Loading…
Reference in New Issue