This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: PATCH: Prototype for getopt in system.h


J. David Anglin said:
>The following error occurs building under vax ultrix 4.3:
>
>stage1/xgcc -Bstage1/ -B/usr/local/vax-dec-ultrix4.3/bin/ -c  -DIN_GCC    -g -O3 -W -Wall -Wwrite-strings -Wstrict->prototypes -Wmissing-prototypes   -DHAVE_CONFIG_H    -I. -Ijava -I../../gcc -I../../gcc/java -I../../gcc/config ->I../../gcc/../include ../../gcc/java/gjavah.c -o java/gjavah.o
>../../include/getopt.h:111: conflicting types for `getopt'
>../../gcc/system.h:360: previous declaration of `getopt'
 [ snip]
>--- 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

FWIW, this patch is also required for compiling CVS GCJ under Cygwin.
It would be nice if could be reviewed.

Kelley Cook




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