Mercurial > hg > xemacs-beta
diff lib-src/getopt.h @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | de805c49cfc1 |
children |
line wrap: on
line diff
--- a/lib-src/getopt.h Mon Aug 13 11:19:22 2007 +0200 +++ b/lib-src/getopt.h Mon Aug 13 11:20:41 2007 +0200 @@ -98,14 +98,15 @@ #define required_argument 1 #define optional_argument 2 -#if defined (__GNU_LIBRARY__) || defined (__cplusplus) || defined (CYGWIN) +#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__ || C++ */ +#else /* not __GNU_LIBRARY__ */ extern int getopt (); -#endif /* __GNU_LIBRARY__ || C++ */ +#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, @@ -117,6 +118,13 @@ 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 }