diff options
Diffstat (limited to 'source/lib/getopt.h')
-rw-r--r-- | source/lib/getopt.h | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/source/lib/getopt.h b/source/lib/getopt.h index 4ac33b71824..843a32c9786 100644 --- a/source/lib/getopt.h +++ b/source/lib/getopt.h @@ -94,33 +94,13 @@ struct option #define required_argument 1 #define optional_argument 2 -#if defined (__STDC__) && __STDC__ -#ifdef __GNU_LIBRARY__ -/* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in stdlib.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -extern int getopt (int argc, char *const *argv, const char *shortopts); -#else /* not __GNU_LIBRARY__ */ -extern int getopt (); -#endif /* __GNU_LIBRARY__ */ -extern int getopt_long (int argc, char *const *argv, const char *shortopts, - const struct option *longopts, int *longind); -extern int getopt_long_only (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind); - -/* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind, - int long_only); -#else /* not __STDC__ */ -extern int getopt (); -extern int getopt_long (); -extern int getopt_long_only (); - -extern int _getopt_internal (); -#endif /* __STDC__ */ +#ifdef STANDALONE +/*The following definitions come from lib/getopt.c */ + +int getopt(int argc, char *const *argv, const char *optstring); +int getopt_long(int argc, char *const *argv, const char *options, + const struct option *long_options, int *opt_index); +#endif #ifdef __cplusplus } |