public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* getopt.h getopt() decl broken for many targets
@ 2005-03-25 17:12 Aaron W. LaFramboise
  2005-03-26 17:27 ` Ian Lance Taylor
  2005-03-29 16:42 ` Nick Clifton
  0 siblings, 2 replies; 5+ messages in thread
From: Aaron W. LaFramboise @ 2005-03-25 17:12 UTC (permalink / raw)
  To: binutils, gcc; +Cc: Danny Smith

Targets, such as Windows, that don't have getopt() will probably have
get the following error when compiling binutils.

gcc -DHAVE_CONFIG_H -I.
-I/aaronwl/cs/compilers/binutils/src/cvs/src/binutils -I. -D_GNU_SOURCE
-I. -I/aaronwl/cs/compilers/binutils/src/cvs/src/binutils -I../bfd
-I/aaronwl/cs/compilers/binutils/src/cvs/src/binutils/../bfd
-I/aaronwl/cs/compilers/binutils/src/cvs/src/binutils/../include
-D__USE_MINGW_FSEEK
-I/aaronwl/cs/compilers/binutils/src/cvs/src/binutils/../intl -I../intl
-DLOCALEDIR="\"/aaronwl/cs/env/mingw-head/20040323/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation   -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c
/aaronwl/cs/compilers/binutils/src/cvs/src/binutils/strings.c
In file included from
/aaronwl/cs/compilers/binutils/src/cvs/src/binutils/strings.c:65:
/aaronwl/cs/compilers/binutils/src/cvs/src/binutils/../include/getopt.h:116:
warning: function declaration isn't a prototype
make[4]: *** [strings.o] Error 1

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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-03-29 16:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-25 17:12 getopt.h getopt() decl broken for many targets Aaron W. LaFramboise
2005-03-26 17:27 ` Ian Lance Taylor
2005-03-29 16:42 ` Nick Clifton
2005-03-29 17:45   ` Ian Lance Taylor
2005-03-29 19:17     ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).