]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
getopt.h: Avoid prototyping getopt with no arguments in C++.
authorRoger Sayle <roger@eyesopen.com>
Sun, 3 Nov 2002 23:45:49 +0000 (23:45 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sun, 3 Nov 2002 23:45:49 +0000 (23:45 +0000)
* getopt.h:  Avoid prototyping getopt with no arguments in C++.

Co-Authored-By: DJ Delorie <dj@redhat.com>
From-SVN: r58775

include/ChangeLog
include/getopt.h

index b53311ae40a2be78c2c6e59e80f9777637465d71..7929b6617f1a13026e9029f9c7fbde76d418f18f 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-03  Roger Sayle  <roger@eyesopen.com>
+           DJ Delorie <dj@redhat.com>
+
+       * getopt.h:  Avoid prototyping getopt with no arguments in C++.
+
 2002-08-14  Release Manager
 
        * GCC 3.2 Released.
index cb5feba1160ca068ed985916914cc49be0299b4c..04346dd54f5168f6e5b59259a4da02d0448a1b02 100644 (file)
@@ -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__ */