Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
96 | 96 |
97 #define no_argument 0 | 97 #define no_argument 0 |
98 #define required_argument 1 | 98 #define required_argument 1 |
99 #define optional_argument 2 | 99 #define optional_argument 2 |
100 | 100 |
101 #if defined (__GNU_LIBRARY__) || defined (__cplusplus) || defined (CYGWIN) | 101 #if defined (__STDC__) && __STDC__ |
102 #ifdef __GNU_LIBRARY__ | |
102 /* Many other libraries have conflicting prototypes for getopt, with | 103 /* Many other libraries have conflicting prototypes for getopt, with |
103 differences in the consts, in stdlib.h. To avoid compilation | 104 differences in the consts, in stdlib.h. To avoid compilation |
104 errors, only prototype getopt for the GNU C library. */ | 105 errors, only prototype getopt for the GNU C library. */ |
105 extern int getopt (int argc, char *const *argv, const char *shortopts); | 106 extern int getopt (int argc, char *const *argv, const char *shortopts); |
106 #else /* not __GNU_LIBRARY__ || C++ */ | 107 #else /* not __GNU_LIBRARY__ */ |
107 extern int getopt (); | 108 extern int getopt (); |
108 #endif /* __GNU_LIBRARY__ || C++ */ | 109 #endif /* __GNU_LIBRARY__ */ |
109 extern int getopt_long (int argc, char *const *argv, const char *shortopts, | 110 extern int getopt_long (int argc, char *const *argv, const char *shortopts, |
110 const struct option *longopts, int *longind); | 111 const struct option *longopts, int *longind); |
111 extern int getopt_long_only (int argc, char *const *argv, | 112 extern int getopt_long_only (int argc, char *const *argv, |
112 const char *shortopts, | 113 const char *shortopts, |
113 const struct option *longopts, int *longind); | 114 const struct option *longopts, int *longind); |
115 /* Internal only. Users should not call this directly. */ | 116 /* Internal only. Users should not call this directly. */ |
116 extern int _getopt_internal (int argc, char *const *argv, | 117 extern int _getopt_internal (int argc, char *const *argv, |
117 const char *shortopts, | 118 const char *shortopts, |
118 const struct option *longopts, int *longind, | 119 const struct option *longopts, int *longind, |
119 int long_only); | 120 int long_only); |
121 #else /* not __STDC__ */ | |
122 extern int getopt (); | |
123 extern int getopt_long (); | |
124 extern int getopt_long_only (); | |
125 | |
126 extern int _getopt_internal (); | |
127 #endif /* __STDC__ */ | |
120 | 128 |
121 #ifdef __cplusplus | 129 #ifdef __cplusplus |
122 } | 130 } |
123 #endif | 131 #endif |
124 | 132 |