This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getopt.h getopt() decl broken for many targets


"Aaron W. LaFramboise" <aaron98wiridge9@aaronwl.com> writes:

> This is due to this code:
> 
> #if !HAVE_DECL_GETOPT
> #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.  */
> extern int getopt (int argc, char *const *argv, const char *shortopts);
> #else
> #ifndef __cplusplus
> extern int getopt ();
> #endif /* __cplusplus */
> #endif
> #endif /* !HAVE_DECL_GETOPT */
> 
> Is the situation described in this comment still true?  Would it be
> possible to turn this whitelist into a blacklist?

Yes, the comment is still true enough that I don't think we should
change it.  Instead, copy the gcc configure code which sets
HAVE_DECL_GETOPT to the binutils.  In fact, I think Nick already did
this, although I don't know whether he checked it in yet.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]