1998-03-11 Raja R Harinath <harinath@cs.umn.edu>
+ * getopt.h: Prototype getopt() for C++ too. (Local fix).
+
* vsnprintf.c: Actually fill it in. It is from
<URL:http://theos.com/~deraadt/snprintf.c>, with one small fix to
actually make it compile.
#define optional_argument 2
#if defined (__STDC__) && __STDC__
-#ifdef __GNU_LIBRARY__
+#if defined __cplusplus || defined __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. */
+ errors, only prototype getopt for the GNU C library.
+
+ But, C++ is more pedantic, and demands a prototype. */
extern int getopt (int argc, char *const *argv, const char *shortopts);
#else /* not __GNU_LIBRARY__ */
extern int getopt ();