]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
(getopt): Allow full prototype when builind under FreeBSD.
authorNick Clifton <nickc@redhat.com>
Wed, 23 Mar 2005 14:46:13 +0000 (14:46 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 23 Mar 2005 14:46:13 +0000 (14:46 +0000)
include/ChangeLog
include/getopt.h

index 4c8d105093ee5933810d3bb13e80e0e5f8319e27..9eabc52f4fa96d71b08dce48c4f57665b7c85166 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-23  Vladimir Merzliakov  <wanderer@rsu.ru>
+
+       * getopt.h (getopt): Allow full prototype when builind under
+       FreeBSD.
+
 2005-03-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC.
index a99a2290159a9d60cf28c4627cee8cbe28a62a97..e5470e625fa5de9c5e3ab8a638ae6f1489551292 100644 (file)
@@ -106,10 +106,12 @@ struct option
    to find the declaration so provide a fully prototyped one.  If it
    is 1, we found it so don't provide any declaration at all.  */
 #if !HAVE_DECL_GETOPT
+#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT) || defined (__FreeBSD__)
 #if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT)
 /* Many other libraries have conflicting prototypes for getopt, with
    differences in the consts, in unistd.h.  To avoid compilation
-   errors, only prototype getopt for the GNU C library.  */
+   errors, only prototype getopt for environments where we know that
+   there will ben o conflicts.  */
 extern int getopt (int argc, char *const *argv, const char *shortopts);
 #else
 #ifndef __cplusplus