OSDN Git Service

PR bootstrap/8351
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Oct 2002 00:54:50 +0000 (00:54 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Oct 2002 00:54:50 +0000 (00:54 +0000)
* getopt.h:  Avoid prototyping getopt with no arguments in C++.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58569 138bc75d-0d04-0410-961f-82ee72b054a4

include/ChangeLog
include/getopt.h

index 424b997..70942c5 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-26  Roger Sayle  <roger@eyesopen.com>
+           DJ Delorie <dj@redhat.com>
+
+       PR bootstrap/8351
+       * getopt.h: Avoid prototyping getopt with no arguments in C++.
+
 2002-10-24  Nathan Tallent  <eraxxon@alumni.rice.edu>
 
        * ansidecl.h (__STDC__): Add (__alpha && __cplusplus) to the
index da09cee..9495a48 100644 (file)
@@ -112,7 +112,9 @@ struct option
    errors, only prototype getopt for the GNU C library.  */
 extern int getopt (int argc, char *const *argv, const char *shortopts);
 #else
+#ifndef __cplusplus
 extern int getopt ();
+#endif /* __cplusplus */
 #endif
 #endif /* !HAVE_DECL_GETOPT */