Provide fallback version of getopt_long instead of checking for it's presense every time it is used

darcs-hash:20060828114305-ac50b-f4aad19e936fa42bbe84e51e72aa32445a469527.gz
This commit is contained in:
axel
2006-08-28 21:43:05 +10:00
parent 202d29de88
commit 548e379d6a
6 changed files with 48 additions and 24 deletions

View File

@@ -385,5 +385,37 @@ extern int _nl_msg_cat_cntr;
int killpg( int pgr, int sig );
#endif
#ifndef HAVE_WORKING_GETOPT_LONG
struct option
{
const char *name;
int has_arg;
int *flag;
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
#endif