Can't compile gcc 2000-12-14 cvs on win2k/pro with cygwin.

R. Kelley Cook Kelley.Cook@home.com
Sun Dec 17 11:53:00 GMT 2000


>stage1/xgcc.exe -Bstage1/ -B/usr/local/i686-pc-cygwin/bin/ -c  -DIN_GCC -g -O2
>-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
>-DHAVE_CONFIG_H    -I. -Ijava -I../../gcc/gcc -I../../gcc/gcc/java -I../../g
>cc/gcc/config
>-I../../gcc/gcc/../include ../../gcc/gcc/java/gjavah.c -o java/gjavah.o
>In file included from ../../gcc/gcc/java/gjavah.c:36:
>../../gcc/include/getopt.h:112: conflicting types for `getopt'
>../../gcc/gcc/system.h:281: previous declaration of `getopt'

This was originally reported for VAX back in November by David Anglin, 
http://gcc.gnu.org/ml/gcc-patches/2000-11/msg00908.html  

It takes a one line patch which I have re-copied below.  It would be
nice if somebody applied it to CVS.

-----------------
2000-11-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
	* system.h: Correct prototype for getopt().

--- system.h.orig	Fri Nov 10 15:47:35 2000
+++ system.h	Sat Nov 18 15:57:01 2000
@@ -357,7 +357,7 @@
 #endif
 
 #if defined (HAVE_DECL_GETOPT) && !HAVE_DECL_GETOPT
-extern int getopt PARAMS ((int, char **, char *));
+extern int getopt PARAMS ((int, char * const *, const char *));
 #endif
 
 #if defined (HAVE_DECL_PUTENV) && !HAVE_DECL_PUTENV

-----------

Note, that in order to fully compile, you will also need to apply the 
patch at http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00815.html
which is now in current CVS.




More information about the Gcc-bugs mailing list