diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-03-03 15:36:17 -0800 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-03-08 13:38:57 -0800 |
commit | 6a16bdb808b02977cc99f84b4adae420f99019d2 (patch) | |
tree | 6fcb706091da63dc24a0e1ecff84aa86e30f0e29 /src/fallback.h | |
parent | 5e09411340b347caf2f81dc65fc9d3a1fefac261 (diff) |
assume getopt/getopt_long is available
There is no longer a good reason to detect whether or not getopt_long()
is available. All UNIX implementations we're likely to run on have it. And
if we ever find one that doesn't the right thing to do is not fallback to
getopt() but to include the getopt_long() source in our package like we
do with the pcre2 library. Since it's licensed under LGPL we can legally
do so if it becomes necessary.
This partially addresses issue #2790.
Diffstat (limited to 'src/fallback.h')
-rw-r--r-- | src/fallback.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/fallback.h b/src/fallback.h index 7d3afa13..e3044449 100644 --- a/src/fallback.h +++ b/src/fallback.h @@ -413,53 +413,6 @@ extern int _nl_msg_cat_cntr; int killpg(int pgr, int sig); #endif - -#ifndef HAVE_WORKING_GETOPT_LONG - -/** - Struct describing a long getopt option - */ -struct option -{ - /** - Name of option - */ - const char *name; - /** - Flag - */ - int has_arg; - /** - Flag - */ - int *flag; - /** - Return value - */ - int val; -} -; - -#ifndef no_argument -#define no_argument 0 -#endif - -#ifndef required_argument -#define required_argument 1 -#endif - -#ifndef optional_argument -#define optional_argument 2 -#endif - -int getopt_long(int argc, - char * const argv[], - const char *optstring, - const struct option *longopts, - int *longindex); - -#endif - #ifndef HAVE_SYSCONF #define _SC_ARG_MAX 1 |