Mercurial > hg > xemacs-beta
comparison lib-src/getopt.h @ 440:8de8e3f6228a r21-2-28
Import from CVS: tag r21-2-28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:33:38 +0200 |
parents | 3ecd8885ac67 |
children | abe6d1db359e |
comparison
equal
deleted
inserted
replaced
439:357dd071b03c | 440:8de8e3f6228a |
---|---|
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 (__STDC__) && __STDC__ | 101 #if defined (__GNU_LIBRARY__) || defined (__cplusplus) |
102 #ifdef __GNU_LIBRARY__ | |
103 /* Many other libraries have conflicting prototypes for getopt, with | 102 /* Many other libraries have conflicting prototypes for getopt, with |
104 differences in the consts, in stdlib.h. To avoid compilation | 103 differences in the consts, in stdlib.h. To avoid compilation |
105 errors, only prototype getopt for the GNU C library. */ | 104 errors, only prototype getopt for the GNU C library. */ |
106 extern int getopt (int argc, char *const *argv, const char *shortopts); | 105 extern int getopt (int argc, char *const *argv, const char *shortopts); |
107 #else /* not __GNU_LIBRARY__ */ | 106 #else /* not __GNU_LIBRARY__ || C++ */ |
108 extern int getopt (); | 107 extern int getopt (); |
109 #endif /* __GNU_LIBRARY__ */ | 108 #endif /* __GNU_LIBRARY__ || C++ */ |
110 extern int getopt_long (int argc, char *const *argv, const char *shortopts, | 109 extern int getopt_long (int argc, char *const *argv, const char *shortopts, |
111 const struct option *longopts, int *longind); | 110 const struct option *longopts, int *longind); |
112 extern int getopt_long_only (int argc, char *const *argv, | 111 extern int getopt_long_only (int argc, char *const *argv, |
113 const char *shortopts, | 112 const char *shortopts, |
114 const struct option *longopts, int *longind); | 113 const struct option *longopts, int *longind); |
116 /* Internal only. Users should not call this directly. */ | 115 /* Internal only. Users should not call this directly. */ |
117 extern int _getopt_internal (int argc, char *const *argv, | 116 extern int _getopt_internal (int argc, char *const *argv, |
118 const char *shortopts, | 117 const char *shortopts, |
119 const struct option *longopts, int *longind, | 118 const struct option *longopts, int *longind, |
120 int long_only); | 119 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__ */ | |
128 | 120 |
129 #ifdef __cplusplus | 121 #ifdef __cplusplus |
130 } | 122 } |
131 #endif | 123 #endif |
132 | 124 |