X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lib-src%2Fgetopt.h;h=6bf8e080115fa882da3e763c6b9940c8915ac253;hp=69256fd3864782dd4f5074ba87a3269217085e8c;hb=efdb31fd4c8db81d2414c32d491f1bf994263c74;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910 diff --git a/lib-src/getopt.h b/lib-src/getopt.h index 69256fd..6bf8e08 100644 --- a/lib-src/getopt.h +++ b/lib-src/getopt.h @@ -98,15 +98,14 @@ struct option #define required_argument 1 #define optional_argument 2 -#if defined (__STDC__) && __STDC__ -#ifdef __GNU_LIBRARY__ +#if defined (__GNU_LIBRARY__) || defined (__cplusplus) || defined (CYGWIN) /* 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__ */ +#else /* not __GNU_LIBRARY__ || C++ */ extern int getopt (); -#endif /* __GNU_LIBRARY__ */ +#endif /* __GNU_LIBRARY__ || C++ */ 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, @@ -118,13 +117,6 @@ 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 __cplusplus }