From 1803db77ac366ed85c231edd520547fc96e9531c Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Wed, 11 Mar 1998 23:17:52 +0000 Subject: [PATCH] Prototype getopt() for C++ too. (Local fix). * getopt.h: Prototype getopt() for C++ too. (Local fix). - Hari svn path=/trunk/; revision=139 --- support/ChangeLog | 2 ++ support/getopt.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/support/ChangeLog b/support/ChangeLog index 73e419c..971dc14 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,5 +1,7 @@ 1998-03-11 Raja R Harinath + * getopt.h: Prototype getopt() for C++ too. (Local fix). + * vsnprintf.c: Actually fill it in. It is from , with one small fix to actually make it compile. diff --git a/support/getopt.h b/support/getopt.h index 68958c1..de4b4e0 100644 --- a/support/getopt.h +++ b/support/getopt.h @@ -97,10 +97,12 @@ struct option #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 (); -- 2.7.4