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

R. Kelley Cook
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
>-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,  

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  <>
	* 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 @@
-extern int getopt PARAMS ((int, char **, char *));
+extern int getopt PARAMS ((int, char * const *, const char *));


Note, that in order to fully compile, you will also need to apply the 
patch at
which is now in current CVS.

More information about the Gcc-bugs mailing list