--- getopt.h.orig Wed Sep 12 14:34:12 2001 +++ getopt.h Wed Sep 12 15:29:40 2001 @@ -32,12 +32,17 @@ */ #ifndef __GETOPT_H__ -#define __GETOPT_H__ + +#ifndef __need_getopt +#define __GETOPT_H__ 1 +#endif #ifdef __cplusplus extern "C" { #endif +#ifndef __need_getopt + struct option { const char *name; int has_arg; @@ -45,6 +50,8 @@ struct option { int val; }; +#endif + extern int opterr; /* if error message should be printed */ extern int optind; /* index into parent argv vector */ extern int optopt; /* character checked for validity */ @@ -53,11 +60,13 @@ extern char *optarg; /* argument as int getopt (int, char * const *, const char *); +#ifndef __need_getopt int getopt_long (int, char **, char *, struct option *, int *); #define no_argument 0 #define required_argument 1 #define optional_argument 2 +#endif #ifdef __cplusplus }