From: Roger Sayle Date: Sun, 3 Nov 2002 23:45:49 +0000 (+0000) Subject: getopt.h: Avoid prototyping getopt with no arguments in C++. X-Git-Tag: releases/gcc-3.2.1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a3ef030618e2ae0a9c0a2355b3c9cbdc89c815d;p=thirdparty%2Fgcc.git getopt.h: Avoid prototyping getopt with no arguments in C++. * getopt.h: Avoid prototyping getopt with no arguments in C++. Co-Authored-By: DJ Delorie From-SVN: r58775 --- diff --git a/include/ChangeLog b/include/ChangeLog index b53311ae40a2..7929b6617f1a 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2002-11-03 Roger Sayle + DJ Delorie + + * getopt.h: Avoid prototyping getopt with no arguments in C++. + 2002-08-14 Release Manager * GCC 3.2 Released. diff --git a/include/getopt.h b/include/getopt.h index cb5feba1160c..04346dd54f51 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -111,7 +111,7 @@ struct option errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ -# if !defined (HAVE_DECL_GETOPT) +# if !defined (HAVE_DECL_GETOPT) && !defined (__cplusplus) extern int getopt (); # endif #endif /* __GNU_LIBRARY__ */