getopt.h getopt() decl broken for many targets
Nick Clifton
nickc@redhat.com
Tue Mar 29 16:42:00 GMT 2005
Hi Aaron,
> Targets, such as Windows, that don't have getopt() will probably have
> get the following error when compiling binutils.
> /aaronwl/cs/compilers/binutils/src/cvs/src/binutils/../include/getopt.h:116:
> warning: function declaration isn't a prototype
> Is the situation described in this comment still true? Would it be
> possible to turn this whitelist into a blacklist?
If your build-time environment does provide a prototype for getopt()
which is compatible with the one in include/getopt.h then you may find
that the attached two patches help. The first one fixes the configure
system in the binutils/ subdirectory so that it checks for a working
getopt() prototype. (You will need to regenerate the configure files
after applying the patch). The second patch fixes the sources for
addr2line.c so that the config.h file is included before bfd.h so that
it can pick up the definition of HAVE_DECL_GETOPT which should now be in
config.h.
Note - this issue is being discussed on a thread on the
bug-binutils@gnu.org mailing list started by Vladimir Merzliakov.
Unfortunately it appears that this list is not being archived at the
moment so I cannot give you a URL to follow.
Cheers
Nick
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: addr2line.c.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20050329/340385cb/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils.config.patch.supplimental.bz2
Type: application/x-bzip2
Size: 2396 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20050329/340385cb/attachment.bz2>
More information about the Binutils
mailing list