From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Lipe To: law@cygnus.com Cc: Jakub Jelinek , egcs@cygnus.com Subject: Re: toplev.c Date: Mon, 19 Jan 1998 02:25:00 -0000 Message-id: <19980118152814.29187@dgii.com> References: <199801151510.QAA00160@sunsite.ms.mff.cuni.cz> <9145.885096916@hurl.cygnus.com> X-SW-Source: 1998-01/msg00635.html > > In toplev.c I read: > > > > #ifdef __alpha > > extern char *sbrk (); > > #endif > > > > Now, this prototype is needed not only for alpha, but for all 64bit > > platforms which have sizeof(void *) > sizeof(int). SUSv2 says that sbrk is a void*, not a char *. I don't really know if that means anything to anyone. It also says that this function will be prototyped in . A quick check of system around here (none of which claim to be SUSV2) shows that this does seem to be the case. Regardless of what the vendor provides, if a proto for it is in unistd.h, most of the plumbing is in place to let autoconf take advantage of this. Of course, if __alpha (OpenVMS? DUNIX? Embedded?) doesn't proto it here, this does no good. > Anyone want to fix this up? It shouldn't be all that hard for something > that knows autoconf. Here's a starting place. Of course, the real test is whether it helps whatever system #if __alpha really refers to... Sun Jan 18 15:26:21 1998 Robert Lipe (robertl@dgii.com) * toplev.c (sbrk): get prototype from when available. $ cvs diff toplev.c Index: toplev.c =================================================================== RCS file: /egcs/carton/cvsfiles/egcs/gcc/toplev.c,v retrieving revision 1.28 diff -u -p -r1.28 toplev.c --- toplev.c 1998/01/17 22:39:10 1.28 +++ toplev.c 1998/01/18 21:25:39 @@ -62,6 +62,10 @@ Boston, MA 02111-1307, USA. */ # include #endif +#ifdef HAVE_UNISTD_H +# include +#endif + #include "input.h" #include "tree.h" #include "rtl.h" @@ -189,10 +193,6 @@ int print_single_switch (); void print_switch_values (); /* Length of line when printing switch values. */ #define MAX_LINE 75 - -#ifdef __alpha -extern char *sbrk (); -#endif /* Name of program invoked, sans directories. */ -- Robert Lipe http://www.dgii.com/people/robertl robertl@dgii.com