diff options
author | Raja R Harinath <harinath@src.gnome.org> | 1998-03-11 23:17:52 +0000 |
---|---|---|
committer | Raja R Harinath <harinath@src.gnome.org> | 1998-03-11 23:17:52 +0000 |
commit | 1803db77ac366ed85c231edd520547fc96e9531c (patch) | |
tree | 837b0d1440ec2f4a2069f5bdc3aeac68661b2bee /support/getopt.h | |
parent | d7228e812e61b134a51984b7c37454fbac4065c3 (diff) | |
download | gnome-common-1803db77ac366ed85c231edd520547fc96e9531c.tar.gz |
Prototype getopt() for C++ too. (Local fix).
* getopt.h: Prototype getopt() for C++ too. (Local fix).
- Hari
svn path=/trunk/; revision=139
Diffstat (limited to 'support/getopt.h')
-rw-r--r-- | support/getopt.h | 6 |
1 files changed, 4 insertions, 2 deletions
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 (); |