getopt compatibility
This commit is contained in:
parent
853c9ed2d7
commit
05fa1caa61
@ -23,6 +23,11 @@ enum {
|
||||
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 {
|
||||
const char *name;
|
||||
int has_arg;
|
||||
@ -35,6 +40,7 @@ enum {
|
||||
required_argument = 1,
|
||||
optional_argument = 2
|
||||
};
|
||||
#endif /* getopt.h */
|
||||
|
||||
int optc, optred, opterrno = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user