getopt compatibility
This commit is contained in:
@ -23,6 +23,11 @@ enum {
|
|||||||
SETOPTUNKNOWNOPT
|
SETOPTUNKNOWNOPT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Define getopt stuff if it wasnt already
|
||||||
|
// NOTE: this could result in a symbol redefinition error
|
||||||
|
// if someone were to include this header only library
|
||||||
|
// before linked ones for some reason.
|
||||||
|
#ifndef _GETOPT_H
|
||||||
struct option {
|
struct option {
|
||||||
const char *name;
|
const char *name;
|
||||||
int has_arg;
|
int has_arg;
|
||||||
@ -35,6 +40,7 @@ enum {
|
|||||||
required_argument = 1,
|
required_argument = 1,
|
||||||
optional_argument = 2
|
optional_argument = 2
|
||||||
};
|
};
|
||||||
|
#endif /* getopt.h */
|
||||||
|
|
||||||
int optc, optred, opterrno = 0;
|
int optc, optred, opterrno = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user